Chapter 7
Probability
Events, random variables, distributions, expectation, variance, conditional probability, and Bayes' rule.
What this chapter does
Probability gives uncertainty a precise language. This chapter moves from events to random variables and distributions, then uses expectation, variance, conditioning, and Bayes' rule to reason about data and model outputs.
Lessons
Read these in order.
Start with the chapter introduction, then move through the topic lessons. The order is chosen so each page can reuse ideas from the pages before it.
- 01Introduction
Why probability is the language of uncertainty in machine learning.
- 02Sample Spaces and Events
Outcomes, events, and probability as a measure of event size.
- 03Probability Rules
Complements, addition, overlap, and consistency rules.
- 04Random Variables
Turning uncertain outcomes into quantities we can compute with.
- 05Distributions
How probability is assigned to possible values.
- 06Expectation
Probability-weighted averages and expected loss.
- 07Variance and Covariance
Spread, standard deviation, and variables moving together.
- 08Independence
When one event does not change another event's probability.
- 09Conditional Probability
Probability after context or evidence is known.
- 10Bayes' Rule
Updating probability after evidence.
- 11Common Distributions
Bernoulli, categorical, multinomial, and Gaussian distributions.
Review and practice
Close the chapter deliberately.
Use the conclusion and revision notes before the chapter exercises. Hints and solutions are collected here, while lesson-level exercises reveal their own help inline.
What Chapter 7 accomplished and how probability prepares numerical computation.
Summary and Revision NotesA compact review of probability rules, distributions, expectation, and Bayes' rule.
ExercisesChapter-level practice for events, distributions, expectation, evidence, and Bayes' rule.
HintsLow-spoiler nudges for the Chapter 7 exercises.
SolutionsExplained solutions for the Chapter 7 exercises.
Before moving on
- Interpret model outputs probabilistically.
- Use distributions to reason about data and uncertainty.
- Distinguish events, random variables, and distributions.
- Read conditional probability and Bayes' rule as update language.
Where this leads
- Statistics
- Information Theory