๐Ÿ“Š Self-paced course

Statistics for AI, GenAI & LLMs

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.

19 lessons Sequential โ€” each builds on the last No prerequisites Quizzes included

Part 1 โ€” Statistics for AI

  1. Why Statistics Powers AI

    A tour of where statistics shows up when you build, train, and evaluate AI systems. No math yet, just the map.

  2. Describing Data: Mean, Variance & Distribution Shape

    The four numbers to compute first on any dataset. AI datasets lie if you look at only one of them.

  3. Probability Foundations & Bayes' Theorem

    Reasoning over outcomes you haven't seen yet โ€” the math every classifier, spam filter, and hallucination detector runs on.

  4. The Distributions That Run Machine Learning

    Four named shapes of uncertainty โ€” and the one that's quietly running every single token your LLM ever generates.

  5. From Sample to Population: Estimation & the CLT

    You never have all the data. Here is how much that should worry you, and how models turn observations into a fitted distribution.

  6. Correlation, Regression & Why Models "Fit" Data

    Two variables that move together, and a line that summarizes the pattern. Fitting that line is a small version of training.

  7. Information Theory: Entropy, Cross-Entropy & KL Divergence

    Three quantities that measure how surprised a model is. They include the loss function inside every LLM's training loop.

  8. The Statistics Behind Training a Model

    What happens when a model shrinks its loss over millions of steps, and the two ways that process goes wrong.

  9. Evaluating AI Models Rigorously

    You built a model. Now: is it actually good, or does it just look good on the one number you checked?

  10. The Statistics Unique to LLMs

    Where it all converges: perplexity, sampling and temperature, calibration, and the statistical shape of hallucination.

Part 2 โ€” Probability, inference & modelling fundamentals

  1. Counting & Combinatorics: How Big Is the Space of Possibilities?

    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.

  2. Random Variables: Expectation, Variance & the Rules for Combining Them

    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.

  3. Continuous Distributions: Density, the CDF, and the Shapes Beyond the Bell Curve

    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.

  4. Joint Distributions: Several Variables at Once, Independence & Covariance

    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.

  5. Limit Theorems & Hypothesis Testing: When Is a Difference Real?

    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.

  6. Bayesian Inference: Updating Beliefs About a Model, Not Just a Message

    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.

  7. Study Design: Randomization, Confounding & Data Leakage

    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.

  8. Resampling: The Bootstrap & Cross-Validation

    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.

  9. Beyond a Single Line: Multiple Regression, Logistic Regression & ANOVA

    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.

Also in this repo

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.