IB Diploma Mathematics AI · Statistics and probability
Probability
1Basic probability
The probability of an event is a number from 0 (impossible) to 1 (certain).
$$P(A) = \frac{n(A)}{n(U)}$$
for equally likely outcomes, where $n(A)$ is the number of outcomes in $A$ and $n(U)$ is the total number of outcomes.
- The complement $A'$ means "not $A$": $P(A') = 1 - P(A)$.
- Expected number of times an event happens in $n$ trials: $n \times P(A)$.
- Experimental probability (relative frequency) uses results of trials: $\frac{\text{number of successes}}{\text{number of trials}}$. It gets closer to the true probability as the number of trials increases.
Rolling a fair die 60 times, the expected number of sixes is $60 \times \frac{1}{6} = 10$.
Check yourself
The probability of rain tomorrow is 0.35. What is the probability it does not rain?
Show the answer
0.65
P(A′) = 1 − 0.35.
2Venn diagrams
A Venn diagram shows events as overlapping circles inside a rectangle (the sample space).
- $A \cap B$ ("A and B") is the overlap.
- $A \cup B$ ("A or B, or both") is everything inside either circle.
- $P(A \cup B) = P(A) + P(B) - P(A \cap B)$. Subtract the overlap so it is not counted twice.
A Venn diagram of the class survey: start with the overlap
A class survey
- In a class of 30, 12 play football, 15 play music and 5 do both.
- Football only: $12 - 5 = 7$. Music only: $15 - 5 = 10$. Neither: $30 - 7 - 5 - 10 = 8$.
- $P(\text{football or music}) = \frac{22}{30} = 0.733$.
Check yourself
P(A) = 0.5, P(B) = 0.4 and P(A ∩ B) = 0.2. What is P(A ∪ B)?
Show the answer
0.7
0.5 + 0.4 − 0.2 = 0.7.
3Conditional probability and independence
Conditional probability is the probability of $A$ given that $B$ has happened:
$$P(A \mid B) = \frac{P(A \cap B)}{P(B)}$$
In a Venn diagram or table, "given $B$" means only look inside $B$.
Given football
- From the class survey: $P(\text{music} \mid \text{football}) = \frac{5}{12} = 0.417$.
- Only the 12 football players count, and 5 of them play music.
Two events are independent if one does not affect the other:
$$P(A \cap B) = P(A) \times P(B), \quad \text{equivalently } P(A \mid B) = P(A)$$
Two events are mutually exclusive if they cannot both happen: $P(A \cap B) = 0$.
Check yourself
P(A) = 0.5, P(B) = 0.4 and P(A ∩ B) = 0.2. Are A and B independent?
Show the answer
Yes, because 0.5 × 0.4 = 0.2
The product of the probabilities equals P(A ∩ B).
4Tree diagrams and tables
A tree diagram shows two or more stages. Multiply along the branches for "and"; add the results of different paths for "or".
Two counters without replacement from 5 red and 3 blue
Without replacement
- A bag has 5 red and 3 blue counters. Two are taken without replacement.
- $P(\text{both red}) = \frac{5}{8} \times \frac{4}{7} = \frac{20}{56} = \frac{5}{14} = 0.357$.
- $P(\text{one of each}) = \frac{5}{8} \times \frac{3}{7} + \frac{3}{8} \times \frac{5}{7} = \frac{30}{56} = 0.536$.
Without replacement, the second-stage probabilities change, because there is one counter fewer.
A two-way table (contingency table) shows counts for two categories. Probabilities come straight from the counts: divide by the grand total, or by a row or column total for conditional probability.
Check yourself
On a tree diagram, how do you find the probability of following one path?
Show the answer
Multiply the probabilities along the branches
Each stage happens "and" the next.
5Complementary events
The probability that an event does not happen is $P(A') = 1 - P(A)$.
This is especially useful for "at least one" questions.
At least one six in four rolls of a die
- $P(\text{no six in one roll}) = \frac{5}{6}$.
- $P(\text{no six in four rolls}) = \left(\frac{5}{6}\right)^4 \approx 0.482$.
- $P(\text{at least one six}) = 1 - 0.482 = 0.518$.
Check yourself
If $P(A) = 0.35$, what is $P(A')$?
Show the answer
0.65
$1 - 0.35$.
6The addition rule
$P(A \cup B) = P(A) + P(B) - P(A \cap B)$.
Worked example
- In a class, $P(\text{plays football}) = 0.5$, $P(\text{plays tennis}) = 0.3$, $P(\text{both}) = 0.1$.
- $P(\text{football or tennis}) = 0.5 + 0.3 - 0.1 = 0.7$.
- $P(\text{neither}) = 1 - 0.7 = 0.3$.
For mutually exclusive events, $P(A \cap B) = 0$, so $P(A \cup B) = P(A) + P(B)$.
Check yourself
Why is $P(A \cap B)$ subtracted in the addition rule?
Show the answer
To avoid counting the overlap twice
Double counting.
7Going deeper: a two-way table and repeated events worked in full
Worked example (two-way table): 200 workers were asked how they travel and whether they were late today. Of the 120 who drive, 18 were late. Of the 80 who take the bus, 20 were late.
- $P(\text{late}) = \frac{18 + 20}{200} = 0.19$.
- $P(\text{late} \mid \text{bus}) = \frac{20}{80} = 0.25$.
- $P(\text{bus} \mid \text{late}) = \frac{20}{38} \approx 0.526$.
- Steps 2 and 3 answer different questions. The words after "given" tell you which row or column to use as the total.
- Independence: $P(\text{late} \mid \text{car}) = \frac{18}{120} = 0.15$, which differs from $P(\text{late}) = 0.19$. Lateness and method of travel are not independent.
- Expected number: among 50 bus users, expect $50 \times 0.25 = 12.5$ to be late.
Worked example (repeated independent events): the probability of rain on any day is 0.3, independently.
- Rain on both of two days: $0.3 \times 0.3 = 0.09$.
- Rain on exactly one of two days: $0.3 \times 0.7 + 0.7 \times 0.3 = 0.42$.
- Rain on at least one of three days: $1 - 0.7^3 = 1 - 0.343 = 0.657$.
- "At least one" is nearly always done with the complement.
The rules
- Complement: $P(A') = 1 - P(A)$.
- Addition: $P(A \cup B) = P(A) + P(B) - P(A \cap B)$.
- Mutually exclusive: $P(A \cap B) = 0$.
- Independent: $P(A \cap B) = P(A) \times P(B)$.
- Conditional: $P(A \mid B) = \frac{P(A \cap B)}{P(B)}$.
Worked example (Venn diagram): in a survey of 50 people, 28 like tea, 30 like coffee and 12 like both.
- Tea only: 16. Coffee only: 18. Both: 12.
- Neither: $50 - 46 = 4$.
- $P(\text{tea or coffee}) = \frac{46}{50} = 0.92$.
- $P(\text{coffee} \mid \text{tea}) = \frac{12}{28} \approx 0.429$.
Experimental and theoretical probability
- Theoretical: from equally likely outcomes.
- Experimental (relative frequency): from data. It gets closer to the true probability as the number of trials grows.
Common mistakes
- Using the grand total as the denominator for a conditional probability.
- Confusing "mutually exclusive" with "independent".
- Adding probabilities along the branches of a tree.
- Forgetting that without replacement the second probability changes.
Check yourself
A and B are independent, with P(A) = 0.6 and P(B) = 0.5. What is P(A ∪ B)?
Show the answer
0.8
P(A ∩ B) = 0.6 × 0.5 = 0.3, so P(A ∪ B) = 0.6 + 0.5 − 0.3.
Now test yourself
This lesson has a 8-question quiz and 5 exam-style questions with mark schemes in Impera. Free, with your progress saved.
Practise in Impera