Events as subsets
Think of all the students in the survey as one big set. An event is a smaller group inside it: the students who play football is event F, the students who like chess is event C. An event is a subset of everyone.
- F and C (written F ∩ C): students in both groups. This is the overlap.
- F or C (F ∪ C): students in at least one group.
- not F (F′): everyone outside F.
The chance of an event is the size of its group divided by the size of everyone: P(F) = 60 / 100 = 0.6.
Two-way tables
A two-way table sorts the same people by two questions at once. One question gives the rows, the other gives the columns. Each box (a cell) counts the people in both.
| Football | No football | Total | |
|---|---|---|---|
| Chess | 18 | 12 | 30 |
| No chess | 42 | 28 | 70 |
| Total | 60 | 40 | 100 |
The inside cells give joint counts (F and C = 18). The edges give totals for one question only. Always check that the cells add up to the grand total.
Conditional probability: keep only one group
P(C | F) is read "the probability of C given F". We already know the student plays football, so we look only at the football column. The new total is 60, not 100.
P(C | F) = P(C and F) ÷ P(F) = 18/100 ÷ 60/100 = 18/60 = 0.30.
Use the cell count on top and the column or row total of the condition at the bottom. Careful: P(F | C) = 18/30 = 0.60 is a different question, because the condition is now chess.
Independence: the test
Two events are independent if knowing one does not change the chance of the other. We test it with numbers:
- P(C | F) = P(C), or
- P(F and C) = P(F) × P(C).
Here P(C | F) = 0.30 and P(C) = 30/100 = 0.30. They match, so football and chess are independent in this survey. Also P(F) × P(C) = 0.6 × 0.3 = 0.18 = P(F and C).
In data B the football-and-chess cell is 27. Then P(C | F) = 27/60 = 0.45, which is not 0.30. Knowing football changes the chance, so the events are not independent.
Do not mix up independent with mutually exclusive. Mutually exclusive events share no cell. Independent events usually share one.
Try it: make your own table
Ask 20 people at home two yes/no questions, for example "Do you like tea?" and "Do you like coffee?". Make a 2 by 2 table. Then work out P(coffee), P(coffee | tea) and compare. Before you calculate, guess: will they be equal? Then check. Real data is rarely perfectly independent, so small differences are normal.
Key formulas and definitions
- P(A) = (number in A) / (total)
- P(A and B) = (number in both) / (total)
- P(A | B) = P(A and B) / P(B) = (number in both) / (number in B)
- Independent if P(A | B) = P(A)
- Independent if P(A and B) = P(A) × P(B)
Worked examples
1. In a survey of 100 students, 60 play football and 18 play football and like chess. Find P(football and chess).
P = 18 / 100 = 0.18.
2. Of 200 commuters, 120 take the bus and 30 take the bus and also cycle. Find P(cycle | bus).
Keep only the 120 bus users. P = 30 / 120 = 0.25.
3. Using the 100-student table, find P(football or chess).
Add the groups and remove the overlap counted twice: (60 + 30 - 18) / 100 = 72 / 100 = 0.72.
4. Using the same table, find P(football | chess) and compare it with P(chess | football).
P(football | chess) = 18 / 30 = 0.60. P(chess | football) = 18 / 60 = 0.30. They are different because the condition is different.
5. Of 50 students, 20 wear glasses. Of the 30 girls, 12 wear glasses. Are 'girl' and 'glasses' independent?
P(glasses) = 20/50 = 0.40. P(glasses | girl) = 12/30 = 0.40. They are equal, so the events are independent.
6. P(A) = 0.4, P(B) = 0.5 and P(A and B) = 0.3. Are A and B independent?
P(A) × P(B) = 0.4 × 0.5 = 0.20, but P(A and B) = 0.30. They are not equal, so A and B are not independent.
Common mistakes
- Dividing by the grand total instead of the condition's total: P(C | F) uses 60, not 100.
- Swapping the condition: P(A | B) and P(B | A) are usually different numbers.
- Thinking independent means the events cannot happen together. That is mutually exclusive.
- Adding P(A) + P(B) for "A or B" and forgetting to subtract the overlap.