Course 4 of 9
Probability and Statistics for AI
After this course you can reason about uncertainty, say where loss functions come from, and judge whether a measured result is real.
12 lessons, 4 labs and a project. About 1 h 15 min of video.
Start with lesson 1- ProbabilityA probability is a share of all the cases; "or" adds shares when both can't happen, and "and" multiplies them when one tells you nothing about the other.7 min
- Conditional probability and Bayes' ruleA chance once you know something is a share of a smaller pile, and turning it around gives another pile, whose answer depends on how common the cause is.6 min
- Random variables and distributionsA distribution gives every outcome its chance, all adding up to 1; drawing from it gives a different outcome each time, and for a number that can land anywhere, a chance is an area.6 min
- Lab 1Check an AI detector by drawingYou will draw 100,000 essays and each one's score from its own bars, count how often the detector's flag is right, and see Bayes' rule agree with the count.35 min
- Expectation and varianceA distribution's centre is the best single guess, each value times its chance, and its spread says how wrong that guess still is.6 min
- Samples, averages and the normal distributionA score is an average of many draws, so it moves from test to test; averages pile into a bell, and four times the draws make the bell half as wide.6 min
- CorrelationOne number from −1 to 1 says how tightly two things rise or fall together, and it never says which one moves the other.7 min
- Lab 2Scan the penguins before a modelYou will find each penguin column's average and spread, put every column on one scale, see how far an average of ten moves, and find which columns move with mass, over all and inside each species.40 min
- Maximum likelihoodPick the setting that makes the data you saw the likeliest; minus the log of that likelihood is the loss a model is trained on.8 min
- EntropyAn outcome's surprise is how many yes/no questions it takes, in bits; entropy is the average surprise, and it measures how unsure a guess is.6 min
- Cross-entropy and KL divergenceA model pays its surprise at what really came; averaged, that is cross-entropy, the loss language models train on, and KL is the part it could have avoided.7 min
- Lab 3Score a language model's guessesYou will find the like-rate that makes the ratings likeliest, measure in bits how unsure a real model is of its next word, score it on a sentence, and split a coin's cost into entropy and KL.40 min
- Confidence intervals and the bootstrapTo see how far a score could move, draw its own answers again with repeats, many times: the middle 95% of those scores is its error bar.7 min
- A/B tests and p-valuesA p-value says how often luck alone would give a result as big as yours if nothing were going on: rare means there is something to see, and common means you can't tell yet.7 min
- Lab 4An A/B test of two promptsYou will give each prompt's thumbs-up rate its error bar, give the gap its own, run the shuffle test, count how often peeking every day calls a copy better, and read a second test on your own.45 min
- ReviewQuestions from the whole course9 questions from 9 lessons, in a mixed order. See what you still remember.
- EndingWhat can you build with probability and statistics?The course's project: give two real models the same test, and find out if the higher score is real or just luck. The labs and quizzes are there too.1 min
- ProjectIs model A really better than model B?You build a notebook that runs two sentiment models on the same 872 sentences, puts an error bar on each score and on the gap between them, runs the shuffle test, says whether the gap is real and how many sentences it would take to tell, then does the same for two models you pick.3 h
