Bayes : Python :: Frequentist : Perl

Bayesian statistics is to Python as frequentist statistics is to Perl.

Perl has the slogan “There’s more than one way to do it,” abbreviated TMTOWTDI and pronounced “tim toady.” Perl prides itself on variety.

Python takes the opposite approach. The Zen of Python says “There should be one — and preferably only one — obvious way to do it.” Python prides itself on consistency.

Frequentist statistics has a variety of approaches and criteria for various problems. Bayesian critics call this “adhockery.”

Bayesian statistics has one way to do everything: write down a likelihood function and prior distribution, then add data and compute a posterior distribution. This is sometimes called “turning the Bayesian crank.”

6 thoughts on “Bayes : Python :: Frequentist : Perl

  1. I’d say Ruby for frequentists instead Perl; it also abides to “There’s more than one way to do it” and python came first just like Bayesians (asaik).

  2. Christian Walde

    Perl only has “tim toady” because it makes it easier to eventually coalesce into an optimum solution. As an example for this: Perl has currently (to my knowledge) the most powerful object system of any language available. This came about because there was not one predetermined by the language itself, so many people made object systems and over time newer implementations threw away more errors and adapted more advantages.

    The result? Starting from TIMTOWTDI it, Perl’s premier object system grew organically and is nowadays the one and obvious way to do it. (So obvious in fact that old timers are complaining about others looking down on them for not adapting.)

    If anything, Perl is that what it always strives to be, the best of all words, bayesian or frequentist.

  3. John:

    I can’t comment on python or perl because I don’t speak either one (I’m not proud of my ignorance, it’s just the way it is right now). But I will say that Bayes is in many ways more diverse than classical statistics. Suppose you’re fitting a nonlinear regression using Bayes. You can use splines or other basis functions, or Gaussian processes, or Bart, or you can come up with your own model. In practice there’s not just one way of doing it. Just program it up on Stan or whatever and go.

  4. Andrew: Bayesian statistics is diverse in its application, but it all fits into one framework. You could argue that the unity at the top is what makes the diversity at the bottom possible.

    Similarly, there’s a lot of software written in Python, too. And in my opinion, the plainness of the language’s syntax channels creativity into more productive areas.

  5. Interesting analogy… although it seems to make more sense stated as “Bayes is to Frequentism as Python is to Perl” =\

  6. I find it arrogant and a bit clumsy the idea of driving (not only strictly with a particular vision, the syntax but) the whole process of building programs. I think Python’s author didn’t get the Perl/ruby message that came from another reason

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>