17. Probability & Statistics
CollegeProbability quantifies uncertainty; statistics extracts truth from data. Together they are how mathematics reasons about a world that is never fully known — the foundation of science, risk and machine learning.
Probability rules and describing data
For equally likely outcomes, the probability of an event is favourable outcomes over total outcomes, a number in [0, 1]. Core rules:
Addition: P(A or B) = P(A) + P(B) − P(A and B)
Multiplication (independent): P(A and B) = P(A)·P(B)
Conditional: P(A | B) = P(A and B) / P(B)
Descriptive statistics summarise data. Measures of centre: mean (average), median (middle value), mode (most frequent). Measures of spread: range, variance and its square root the standard deviation σ. Much real data follows the bell-shaped normal distribution, where about 68% of values lie within one standard deviation of the mean and 95% within two.
Taming chance and summarising the crowd
Probability is common sense made precise. "Impossible" is 0, "certain" is 1, and everything uncertain sits between. The one rule people most often get wrong is independence: a fair coin has no memory, so after five heads the next flip is still 50/50 — believing it is "due" for tails is the gambler's fallacy. Independent events multiply; the small chance of several things all happening is the product of their individual chances.
Statistics answers the opposite problem: given data, what is really going on? The mean tells you the centre, but the standard deviation tells you how much to trust it — a class averaging 70% with everyone near 70 is very different from one averaging 70% split between 40s and 100s. This is why a single average can mislead, and why spread matters as much as centre.
Mean (average)
- Add all values, divide by how many there are.
- Uses every single data point.
- Gets pulled toward outliers and skew.
- Best for symmetric data with no extremes.
Median (middle)
- The middle value once the data is sorted.
- Ignores how extreme the tails are.
- Resistant to outliers.
- Best for skewed data like incomes or house prices.
The third measure of centre is the mode — the value that occurs most often — which is the only one that also works for non-numeric categories.
Worked example: mean, standard deviation, and a dice probability
Find the mean and (population) standard deviation of 4, 8, 6, 5, 7.
- Mean: (4 + 8 + 6 + 5 + 7)/5 = 30/5 = 6.
- Deviations from 6: −2, 2, 0, −1, 1. Square them: 4, 4, 0, 1, 1.
- Variance = mean of squared deviations: (4+4+0+1+1)/5 = 10/5 = 2.
- Standard deviation: σ = √2 ≈ 1.41.
Two fair dice are rolled. What is the probability the sum is 7?
- Total outcomes: 6 × 6 = 36.
- Ways to make 7: (1,6),(2,5),(3,4),(4,3),(5,2),(6,1) — 6 outcomes.
- Probability: 6/36 = 1/6 ≈ 0.167. (7 is the most likely sum.)
Test your understanding
A coin lands heads 5 times in a row. What is P(heads) on the next flip?
Still 1/2. Each flip of a fair coin is independent, with no memory of the past. The gambler's fallacy is believing tails is "overdue." (What is unlikely, in advance, is getting six heads in a row: (1/2)⁶ = 1/64 — but once five have happened, the sixth is a fresh 50/50.)
When should you use the median instead of the mean?
When the data has outliers or is skewed. The mean is pulled toward extreme values, but the median (the middle) is not. For incomes, where a few very high earners distort the average, the median gives a truer sense of the "typical" value. For symmetric data with no outliers, mean and median roughly agree.
A test is 99% accurate for a disease affecting 1 in 1000 people. You test positive — is it likely you have it?
Surprisingly, no. Imagine 100,000 people: 100 have the disease (≈99 test positive), but 1% of the 99,900 healthy people — about 999 — also test positive. So of ~1098 positives, only 99 are truly ill: roughly 9%. This is Bayes' theorem in action, and why rare-condition screening produces many false positives.
What does a standard deviation of 0 mean?
That there is no spread at all — every data point is identical and equal to the mean. Standard deviation measures typical distance from the mean; if that distance is zero for all points, the values do not vary. Any non-zero σ means the data is spread out, and larger σ means more spread.
How the ideas connect
Every key idea in this chapter, branching from the core concept — use it to see the whole picture at a glance.
The key facts, visualised
Worked problems, step by step
Follow each solution line by line, then try to reproduce it on paper before moving on.
Example 1Find the mean of 4, 8, 6, 2.
- Add the values: 4 + 8 + 6 + 2 = 20
- Divide by the count 4
- Mean = 20/4 = 5
Example 2A fair die is rolled. Find P(rolling a number greater than 4).
- Favourable outcomes are 5 and 6
- That is 2 of 6 outcomes
- P = 2/6 = 1/3
Now you try
Work each one out first, then tap to reveal the worked answer.