Applied Bayesian Inference with PyMC
summary
AB test of blue vs green buttons uses PyMC to build Bayesian models for PA and PB, fits Bernoulli observations with uniform priors, and produces posterior samples via Metropolis-Hastings MCMC (example run 25,000 iterations, 5,000 burn-in). With 1,500 visitors and 68 clicks posterior PA concentrates (90% interval ≈ 3.5–5.4%), with 50 visitors and 2 clicks interval widens (≈1.6–11%). A computed Delta posterior gives P(PA>PB)=89% for balanced data and drops to 73% when PB has far fewer users.
AI-written summary · about
chapters (11)
- 0:00Introduction to Bayesian A/B testing
- 1:25Frequentist vs Bayesian probability
- 3:55Bayesian workflow and PyMC basics
- 6:25Single page A/B test with PyMC
- 10:34Posterior distribution analysis
- 12:39Impact of sample size on confidence
- 14:23Two-page A/B test with PyMC
- 17:54Unbalanced sample size effects
- 18:58Monte Carlo sampling explained
- 21:05PyMC diagnostics and tools
- 22:32Conclusion and recommendations
