CamDavidsonPilon / Probabilistic-Programming-and-Bayesian-Methods-for-Hackers

aka "Bayesian Methods for Hackers": An introduction to Bayesian methods + probabilistic programming with a computation/understanding-first, mathematics-second point of view. All in pure Python ;)
http://camdavidsonpilon.github.io/Probabilistic-Programming-and-Bayesian-Methods-for-Hackers/
MIT License
26.67k stars 7.86k forks source link

Why do we automatically (arbitrarily?) choose an exponential distribution? #351

Closed vegabook closed 6 years ago

vegabook commented 6 years ago

I've bought the book, and I love it, but I'm just wondering, in Chapter 1, why an exponential distribution is chosen with the somewhat arbitrary reasoning that "As we saw earlier, the exponential distribution provides a continuous density function for positive numbers, so it might be a good choice for modeling λi".

Why not a uniform distribution? Why not some other distribution? Why this one?

CamDavidsonPilon commented 6 years ago

It's part of the modellers choice (a degree of freedom). I chose exponential for a few reasons:

1) I suspected the unknowns to be near 20-30, but I didn't want to force them into that range (which would happen if I used a Uniform) 2) Allows for tapering: 30 is possible, 31 less so, 32 less than that, and so on. This reflects my intuition. (However a consequence of this means that I suspect it is 0 with the most chance) 3) Good introduction to non-trivial priors, and connects back the material just learned.

You're right though, I could have used Uniforms, and this is something that can be tested as well. If we derive the same or similar inference, that just gives more evidence that the original inference is robust.