Interactive tutorials that teach you to match statistical models to your data's characteristics
Many introductory statistics courses teach only one model: ordinary least squares regression
(R's lm(), Python's LinearRegression()). This works fine for continuous,
normally-distributed outcomes. But what about...
Using the wrong model isn't just statistically incorrect—it can give you impossible predictions (negative probabilities, fractional counts) and misleading inferences (wrong standard errors, invalid confidence intervals).
| Data Type | Example Outcome | OLS Prediction Problem | GLM Solution |
|---|---|---|---|
| Binary (0/1) | Heart disease (yes/no) | Can predict P = 1.3 or P = -0.2 | Logistic: bounds to (0,1) |
| Count | Bike rentals per day | Can predict -50 rentals | Poisson/NegBin: non-negative integers |
| Positive continuous | Insurance claim amount | Can predict negative costs | Gamma: strictly positive |
The Two-Part GLM Structure (after King, Tomz & Wittenberg, 2000):
Every statistical model from linear regression to logistic regression fits this two-part structure. The tutorials help you choose appropriate $f(\cdot)$ and $g(\cdot)$ for your data.
Each tutorial presents a real dataset and decision problem. Your task is to figure out the appropriate model.
Predict a patient's maximum heart rate during exercise from their characteristics.
Classify whether a patient has heart disease based on diagnostic measurements.
Predict daily bike rental demand from weather and calendar variables.
The model from Tutorial 3 has a problem. Can you diagnose and fix it?
Predict resting blood pressure—a strictly positive, continuous outcome.
Each tutorial walks through the same 6-step process:
How do algorithms find the best parameters? Our interactive visualisations show you how MLE algorithms navigate parameter space—from simple 1D problems to the high-dimensional challenges faced by modern AI.
Watch gradient descent, Newton-Raphson, and analytic solutions in action. See why we need algorithms when visualisation fails.
Explore Optimisation →This tutorial series is in active development. If you encounter any issues or have ideas for improvements, please let us know through GitHub:
Requires a GitHub account. Your feedback helps improve these tutorials for everyone.