Probability is the mathematics of uncertainty and the engine under every statistical test. This chapter builds from the basic rules to Bayes' theorem — the tool for updating beliefs with evidence, and the source of one of the most counter-intuitive results in all of statistics.
Probability basics
A probability is a number from 0 (impossible) to 1 (certain). For equally-likely outcomes, it's favourable ÷ total. The probabilities of all possible outcomes sum to 1, so P(not A) = 1 − P(A).
Addition & multiplication rules
# OR (addition) — P(A or B)P(A or B) = P(A) + P(B) - P(A and B) # subtract the overlap# AND (multiplication) — for INDEPENDENT eventsP(A and B) = P(A) * P(B)# Independent = one doesn't affect the other (two coin flips).
Conditional probability
P(A | B) — "the probability of A given that B happened" — is how probability updates with information:
P(A | B) = P(A and B) / P(B)# If A and B are independent, P(A | B) = P(A) — B tells you nothing about A.
Bayes' theorem
Bayes' theorem flips a conditional probability around — turning "P(test positive given sick)" into "P(sick given test positive)". It's the basis of spam filters, medical diagnosis and modern AI:
P(A | B) = P(B | A) * P(A) / P(B)# The famous result: a 99%-accurate test for a rare disease (1 in 1000)# still gives mostly FALSE positives, because the disease is so rare.# P(sick | positive) ≈ 9%, not 99% — the base rate dominates.
Practice
Compute the probability of at least one head in three coin flips (via the complement). Work the classic disease example: a 99%-accurate test, a 0.1% prevalence — what's the probability someone who tests positive is actually sick? Be surprised.
Key takeaways
- 01A probability is 0–1; P(not A) = 1 − P(A).
- 02Addition: P(A or B) = P(A) + P(B) − P(A and B). Multiplication (independent): P(A and B) = P(A)·P(B).
- 03Conditional probability P(A|B) = P(A and B)/P(B) — how probability updates with information.
- 04Bayes' theorem flips a conditional: P(A|B) = P(B|A)·P(A)/P(B).
- 05Base rates dominate: an accurate test for a rare event still yields mostly false positives.
