Clusterf*ck: A Practical Guide to Bayesian Hierarchical Modeling in PyMC3
summary
Predicts Kenyan maize yield with PyMC3 using a log transform (added 0.1) on 110,789 rows, comparing pooled, unpooled (30 counties × 2 thetas = 60 posteriors) and hierarchical models with 30 varying intercepts and a common slope. Finds hybrid seeds have posterior mean b ≈ 0.44 (exp → ×1.6 effect) with a narrow 94% HDI, shows unpooled estimates flip sign or blow up under small samples, and demonstrates posterior predictive checks and shrinkage that meaningfully improve stability.
AI-written summary · about
chapters (18)
- 0:00Intro
- 2:17Real-world example: predicting yield
- 4:54How do we address hierarchical data?
- 6:57Use-case with real world data
- 8:13Bayesian framework
- 9:35Bayesian data analysis an overview
- 12:53Code example
- 13:46Step 1 - setting up the probability model
- 14:20Choosing distributions
- 15:42Data transformations
- 16:13Setting priors
- 22:05Step 2&3 - interpret the posterior and evaluate model fit
- 24:11Step 1 - setting up the full probabilty model
- 26:14Step 2 - Interpret the posterior distribution
- 27:57Comparison of the three methods
- 29:22What else can we do?
- 30:37References
- 31:43Questions?
related talks
42mBayesian Non-parametric Models for Data Science using PyMC3
44mAn introduction to PyMC3
30mFighting Gerrymandering with PyMC3
34mFast, beautiful and easy Bayesian modelling: Can you have it all?
39mProbablistic Programming Data Science with PyMC3
35mWhat we learned by running a large custom Bayesian...
01h 26mProbabilistic Programming and Bayesian Computing with PyMC
01h 31mProbabilistic Programming and Bayesian Inference in Python
