Chapter 17

17. Probability & Statistics

College

Probability 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.

At a glance
Core ideaProbability measures chance in [0, 1]; statistics summarises data.
Key termStandard deviation σ: the typical distance of data from the mean.
You can…Compute probabilities, means and spread, and read the normal distribution.
Watch outIndependent events have no memory — beware the gambler's fallacy.
01 · Theory

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:

Complement:   P(not A) = 1 − P(A)
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.

02 · Explanation

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.

03 · Practical

Worked example: mean, standard deviation, and a dice probability

Problem A — summary statistics

Find the mean and (population) standard deviation of 4, 8, 6, 5, 7.

  1. Mean: (4 + 8 + 6 + 5 + 7)/5 = 30/5 = 6.
  2. Deviations from 6: −2, 2, 0, −1, 1. Square them: 4, 4, 0, 1, 1.
  3. Variance = mean of squared deviations: (4+4+0+1+1)/5 = 10/5 = 2.
  4. Standard deviation: σ = √2 ≈ 1.41.
Problem B — probability

Two fair dice are rolled. What is the probability the sum is 7?

  1. Total outcomes: 6 × 6 = 36.
  2. Ways to make 7: (1,6),(2,5),(3,4),(4,3),(5,2),(6,1) — 6 outcomes.
  3. Probability: 6/36 = 1/6 ≈ 0.167. (7 is the most likely sum.)
04 · Q&A

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.

Concept mind map

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.

Probability rulesMeanMedianStandard deviationIndependent eventsData spreadProbability and Statistics
Infographic

The key facts, visualised

P in [0,1]
Probability lies between 0 and 1
Mean
Sum of values divided by count
P(A and B)
For independent events, P(A) x P(B)
Std dev
Typical distance from the mean
Solved examples

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.

  1. Add the values: 4 + 8 + 6 + 2 = 20
  2. Divide by the count 4
  3. Mean = 20/4 = 5

Example 2A fair die is rolled. Find P(rolling a number greater than 4).

  1. Favourable outcomes are 5 and 6
  2. That is 2 of 6 outcomes
  3. P = 2/6 = 1/3
Practice problem set

Now you try

Work each one out first, then tap to reveal the worked answer.

1Find the median of 3, 7, 9, 2, 5.
Ordered: 2,3,5,7,9; the middle value is 5.
2A coin is tossed twice. Find P(two heads).
Independent, so (1/2)(1/2) = 1/4.
3What is the probability of drawing a red card from a standard deck?
26 of 52 cards are red, so 1/2.
4Find the mean of 10, 20, 30.
Sum 60 divided by 3 gives 20.
5What is the range of 4, 9, 2, 15?
Largest minus smallest: 15 - 2 = 13.
6A bag has 3 red and 2 blue balls. Find P(red).
3 of 5 balls are red, so P = 3/5.