๐ Self-paced course
The statistics you need to build, evaluate, and reason about AI, generative models, and LLMs. Every example comes from AI work, not dice and coins.
A tour of where statistics shows up when you build, train, and evaluate AI systems. No math yet, just the map.
The four numbers to compute first on any dataset. AI datasets lie if you look at only one of them.
Reasoning over outcomes you haven't seen yet โ the math every classifier, spam filter, and hallucination detector runs on.
Four named shapes of uncertainty โ and the one that's quietly running every single token your LLM ever generates.
You never have all the data. Here is how much that should worry you, and how models turn observations into a fitted distribution.
Two variables that move together, and a line that summarizes the pattern. Fitting that line is a small version of training.
Three quantities that measure how surprised a model is. They include the loss function inside every LLM's training loop.
What happens when a model shrinks its loss over millions of steps, and the two ways that process goes wrong.
You built a model. Now: is it actually good, or does it just look good on the one number you checked?
Where it all converges: perplexity, sampling and temperature, calibration, and the statistical shape of hallucination.
Before you can say how likely something is, you need to know how many things could happen. Why you can never brute-force an LLM's output space. The binomial turns "k correct out of n" into a probability.
Token counts, latencies, and 0/1 scores as random variables. Learn the mean and spread that describe them, and the rules for scaling, adding, and averaging them.
Why a latency has probability zero at any exact value. A density and a CDF turn that into areas and percentiles. Then four shapes: uniform, exponential, gamma, and beta. They model init ranges, request gaps, batch waits, and uncertainty about a model's true accuracy.
Describe several quantities at once with joint tables, independence, and covariance. The chain rule then lets an LLM assign a probability to a whole sentence.
Averages settle, and a p-value puts a number on "is this gap luck?" Worked tests on pass rates and latency. A huge test set makes tiny gaps significant. Trying 20 prompts guarantees a false winner.
Move Bayes' theorem from events to parameters. Put a Beta prior on a model's true accuracy, update it with an eval, and read off a credible interval. See why a tiny eval stays near the prior and why L2 regularization is a Gaussian prior. Then forecast the next prompt.
Statistical tests assume a fair comparison. See how convenience samples, confounders, Simpson's paradox, uneven A/B splits, and leaked test sets bend an eval number. Get a checklist for reading any AI evaluation claim.
Put an interval on any statistic by resampling your data with replacement. Compare two prompts on the same items with a paired bootstrap. Estimate out-of-sample performance with k-fold cross-validation. Includes the 63.2% fact, the leakage trap, and the test set you touch once.
Several features at once, a yes/no outcome, and three prompts to compare. Worked examples of multiple regression with collinearity, a logistic prediction read as an odds ratio, and a hand-computed ANOVA. It ends with the sigmoid that closes every neural network.
76 flashcards โ four per lesson, written for active recall rather than definition-matching. Anki-importable, readable as plain Markdown either way.
A memory map โ a 99-node JSON Canvas laying out how the nineteen lessons connect. Renders in Obsidian.
A companion course: Math for AI covers the vectors, matrices, derivatives and integrals underneath all of this in seven lessons.
See the README for how to use each.