import pymc as pm
import arviz as az
import numpy as np
import matplotlib.pyplot as plt
print(f"PyMC: {pm.__version__}")
print(f"ArviZ: {az.__version__}")
print(f"NumPy: {np.__version__}")PyMC: 5.25.1
ArviZ: 0.23.4
NumPy: 2.2.6
From First Principles to Practice
You took a statistics course in grad school. You learned about \(p\)-values, confidence intervals, maximum likelihood, and maybe even heard the word “Bayesian” in a lecture or two. Then you spent a decade building things — writing Python, wrangling data, shipping models. The statistics got rusty. The Bayesian part never quite stuck.
This book fixes that. It teaches Bayesian modeling with PyMC from first principles, assuming you know Python and have a faded memory of statistics. Every concept is introduced through code you can run, not notation you have to decode. Every model is built step by step, with explanations of why each choice is made — not just what buttons to push.
Who this book is for. Junior developers building data pipelines, beginning data analysts who want to move beyond point estimates, and fresh (or not-so-fresh) graduate students who need a clean, modern introduction to Bayesian methods. You should be comfortable with Python, NumPy, and pandas. Prior experience with PyMC is not assumed.
What you will learn:
What this book is based on. The content draws on over 40 talks from the PyMC and PyData communities, given by the creators and core developers of PyMC (Thomas Wiecki, Chris Fonnesbeck, Austin Rochford, and many others). We distilled their collective wisdom into a structured tutorial that builds from basics to advanced methods.
Each chapter follows a consistent pattern:
All code targets PyMC 5.x with ArviZ for diagnostics.
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txtimport pymc as pm
import arviz as az
import numpy as np
import matplotlib.pyplot as plt
print(f"PyMC: {pm.__version__}")
print(f"ArviZ: {az.__version__}")
print(f"NumPy: {np.__version__}")PyMC: 5.25.1
ArviZ: 0.23.4
NumPy: 2.2.6