finds.dev← search

// the find

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

★ 28,185 · Jupyter Notebook · MIT · updated Jun 2024

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 ;)

A free, interactive book teaching Bayesian inference through PyMC, built entirely in Jupyter notebooks. It takes the position that you should understand sampling and computation before you worry about conjugate priors and closed-form math — which turns out to be the right order for most working developers. The examples are concrete and grounded: Challenger disaster, Reddit comment ranking, A/B testing.

The pedagogy is genuinely good — it builds intuition through runnable examples rather than equations, and the progression from 'what is probability' to 'multi-armed bandits' holds together. The MCMC chapter actually explains what the sampler is doing instead of treating it as a black box. Multiple PyMC version branches (PyMC2, PyMC3, current) and alternative framework ports (Pyro, TFP) exist side by side so you can follow along with whatever you have installed. 28k stars with active forks means the notebooks have been battle-tested by a lot of people who found real bugs.

Last push was June 2024 and the 'current' PyMC notebooks appear to lag behind PyMC v5's API changes, so some cells will throw deprecation warnings or fail outright without manual fixes. The book stops at six chapters and never got the planned extensions — there's no coverage of hierarchical models, variational inference, or model comparison, which is where most real use starts. The printed Addison-Wesley edition has extra content (A/B testing chapter, answers to exercises) that the free version doesn't, which is a legitimate reason to buy it but also a mild bait-and-switch for people who find it through GitHub. Setup instructions still point at a 2012-era Windows pre-compiled binaries page.

View on GitHub → Homepage ↗

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →