Print or save as PDF — or build a custom worksheet from any module's questions.
In your class, some students play sport AND music, some play only one, and some play neither. How would you organise this information in a table so it's easy to count each combination?
A two-way table is a powerful tool for organising data about two categorical variables at once. Each cell counts how many people or items fall into both categories. Totals in the margins reveal the full picture.
Every row total must equal the sum of its cells. Every column total must equal the sum of its cells. And the grand total must equal both the sum of all row totals AND the sum of all column totals. If these don't match, you have made an error somewhere. Always check: row totals + column totals = grand total.
Rows represent one categorical variable (e.g. Sport / No Sport). Columns represent another (e.g. Music / No Music). Each cell holds the count of people who belong to both categories.
The grand total always equals the total number of people surveyed. Use it as your denominator when calculating relative frequencies.
120 students were surveyed about sport and music participation:
| Music | No Music | Row Total | |
|---|---|---|---|
| Sport | 35 | 45 | 80 |
| No Sport | 25 | 15 | 40 |
| Col Total | 60 | 60 | 120 |
From the table: 35 students play both sport AND music. 80 students play sport (regardless of music). 60 students play music (regardless of sport). Grand total = 120.
Relative frequency = $\dfrac{\text{count}}{\text{grand total}}$, expressed as a fraction, decimal, or percentage.
From our table (grand total = 120):
Sometimes we want to compare within a row. This gives a conditional distribution — the percentage breakdown for people who share one characteristic.
Of those who play sport (row total = 80):
$P(\text{Music} \mid \text{Sport}) = \dfrac{35}{80} = 43.75\%$
Of those who do NOT play sport (row total = 40):
$P(\text{Music} \mid \text{No Sport}) = \dfrac{25}{40} = 62.5\%$
Interesting! Students who don't play sport are more likely to play music than those who do. This is the kind of insight two-way tables reveal.
Two-Way Table — key formulas:
$$\text{Relative frequency} = \frac{\text{cell count}}{\text{grand total}}$$
$$P(A \mid B) = \frac{\text{count of A and B}}{\text{row total for B}} \quad \text{(conditional — within a row)}$$
Check: all row totals sum to grand total. All column totals sum to grand total.
Using the Sport/Music table (Sport+Music=35, Sport+No Music=45, No Sport+Music=25, No Sport+No Music=15, Grand Total=120): How many students play sport but NOT music?
Using the same table: What is the row total for students who play sport?
What is the relative frequency of students who play both sport and music (to the nearest percent)?
Given that a student plays sport, what is the probability they also play music?
A two-way table has: No Sport row total = 40; No Sport + No Music = 15. What value belongs in the No Sport + Music cell?
Q6. Complete the two-way table below, then find one relative frequency.
80 students were asked if they have a pet (Yes/No) and if they prefer cats or dogs.
Pets+Cats = 18, Pets+Dogs = 27, No Pets+Dogs = 15, No Pets column total = 35, Grand Total = 80.
(a) Find the missing values to complete the table.
(b) Calculate P(has a pet AND prefers cats) as a percentage.
Q7. A two-way table shows 150 students surveyed about screen time and sleep:
High Screen + Good Sleep = 12, High Screen + Poor Sleep = 48, Low Screen + Good Sleep = 54, Low Screen + Poor Sleep = 36.
(a) Find P(High Screen AND Poor Sleep).
(b) Find P(Low Screen only — regardless of sleep).
(c) Find P(neither High Screen nor Poor Sleep) — i.e. P(Low Screen AND Good Sleep).
Q8. 200 students were surveyed on handedness (Left/Right) and preferred hand for sport.
Right-handed + Right sport = 140, Right-handed + Left sport = 20, Left-handed + Right sport = 10, Left-handed + Left sport = 30.
(a) Calculate all four row percentages (within each handedness group).
(b) Comment on any pattern you notice — is handedness linked to sport preference in this data?
No Pets total = 35; No Pets+Dogs = 15; so No Pets+Cats = 35 − 15 = 20.
Pets total = 80 − 35 = 45; Pets+Dogs = 27; Pets+Cats = 18 ✓ (18+27=45).
Cats total = 18+20 = 38. Dogs total = 27+15 = 42.
P(Pets AND Cats) = 18/80 = 22.5%.
Grand total = 12+48+54+36 = 150.
(a) P(High Screen AND Poor Sleep) = 48/150 = 32%.
(b) Low Screen total = 54+36 = 90; P(Low Screen) = 90/150 = 60%.
(c) P(Low Screen AND Good Sleep) = 54/150 = 36%.
Right-handed total = 160; row %: Right sport = 140/160 = 87.5%, Left sport = 20/160 = 12.5%.
Left-handed total = 40; row %: Right sport = 10/40 = 25%, Left sport = 30/40 = 75%.
Pattern: Right-handed students strongly prefer their right hand for sport (87.5%), while left-handed students strongly prefer their left hand for sport (75%). Handedness appears strongly linked to sport hand preference.
200 people were surveyed on car ownership and public transport use.
PT + Car = 40, PT + No Car = 80, No PT + Car = 60, No PT + No Car = 20.
(a) Construct the complete two-way table with all row totals, column totals, and grand total.
(b) Find P(uses PT | has a car) — the conditional probability. Use the correct denominator.
(c) Find P(uses PT | no car) — conditional on having no car.
(d) Does having a car make someone less likely to use public transport? Justify your answer using the probabilities you calculated.