This notebook introduces the language of statistical model notation used to describe Bayesian models, demonstrating how mathematical notation translates directly into executable PyMC code. Using a real-world example of Vancouver Island Coastal Wolves (a recently discovered subspecies known for displaying distinguished behaviour from other wolf populations such the ability to swim great distances or the significant prevelance of marine organisms in their diet), we build a Bayesian model to estimate gender ratios from limited sample data to emphasize how posterior distributions reveal the full range of plausible outcomes rather than single point estimates.
Topics covered:
- Statistical model notation fundamentals (stochastic relationships, parameters vs data)
- Translating model notation into
PyMCsyntax (pm.Uniform,pm.Binomial,pm.sample) - Understanding posterior distributions as ranked plausibilities
- Visualizing uncertainty with
ArviZtrace plots and HDI intervals - Prior predictive simulations with binomial and uniform distributions
Click the Colab badge below to run the notebook interactively:
