This project aims to reproduce analyses done in the book Bayesian Data Analysis (Gelman et al, 3rd Edition) in Python without relying on black-box Bayesian inference libraries, so that I can familiarize myself with conducting Bayesian inference in Python. Hopefully this is a useful resource for other people as well.
Here is the list of notebooks I wrote:
- Hierarchical Bayesian Inference of Binomial Probabilities (on rat tumor data, Chapter 5.3)
- Hierarchical Bayesian Inference of Group Normal Means (on SAT coaching data and beta-blocker data, Chapter 5.4, 5.5, 5.6, 6.5, 7.3)
- Basic Monte-Carlo Markov Chain (MCMC) Sampling (on bivariate normal distribution, Chapter 11.1, 11.3, 11.4)
- MCMC sampling on Hierarchical Normal Model with Unknown Standard Deviation (Chapter 11.6)
- Logistic regression with grid sampling (Chapter 3.7), mode-based approximation (Chapter 4.1), and Expectation Propagation (Chapter 13.8)
- Hierarchical Bayesian Linear Regression (Chapter 15.2)