Two-way Tables
A two-way table records two attributes at once, such as year group and how students travel, with totals for each row and column. This NSW Year 9 Advanced maths subtopic reads and builds two-way tables to find probabilities (NESA outcome MA5‑PRO‑P‑01).
You will complete tables with missing values, find probabilities and percentages, and convert between two-way tables and Venn diagrams. You will find conditional probabilities, build tables from percentages, test whether playing tennis is independent of being left-handed, and work out how likely a positive medical test is to be right. It is part of Year 9 Advanced Probability.
Every question with a fully worked solution.
- Two-way Tables - Video - Using Two Way Tables with Probability Watch
Theory
A two-way table sorts a group by two attributes at once, such as year and transport. Cells, row totals and column totals give probabilities for "and", "or" and "not", and a condition restricts you to one row or column. This Year 9 Advanced maths page is on the path towards Advanced maths.
A two-way table has one attribute down the side (rows) and another across the top (columns). Each cell counts the people with one row category and one column category.
The row totals and column totals count each category on its own. The grand total is the sum of all the cells. Every person is in exactly one cell.
A two-way table with two rows and two columns holds the same information as a two-set Venn diagram: both, one only, the other only, and neither.
A condition ("a girl is chosen", "given that the person tested positive") restricts the sample space to one row or one column, so that row or column total becomes the denominator. Two events are independent if knowing one does not change the probability of the other.
With a condition, divide by the total of that row or column:
How to complete a two-way table
- Draw the table with a Total row and a Total column.
- Enter what you know: cells, totals, and counts from percentages or probabilities (\(0.55 \times 120\), \(30\%\) of a row).
- Fill the gaps by subtracting from row and column totals, one cell at a time.
- Check that the cells add to the grand total.
How to read a probability
- "And" is one cell. "Not" is the other row or column, or the total minus a cell.
- "Or" is a whole row plus the rest of a column, counting the shared cell once.
- "Given that" or "a ... is chosen": divide by that row or column total, not the grand total.
- Unknowns: make the cells add to the total and solve. Then answer from the completed table.
(i) \(P(\text{Year 10 and plays})\);
(ii) \(P(\text{Year 9 or plays})\).
Fill the table from the totals, one cell at a time: Year 10 \(= 150 - 64 = 86\); Year 9 who do not play \(= 64 - 40 = 24\); players \(= 150 - 95 = 55\); Year 10 players \(= 55 - 40 = 15\); Year 10 non-players \(= 86 - 15 = 71\).
| Plays | Does not play | Total | |
|---|---|---|---|
| Year 9 | 40 | 24 | 64 |
| Year 10 | 15 | 71 | 86 |
| Total | 55 | 95 | 150 |
| \(\text{(i) } P(\text{Y10 and plays})\) | \(=\) | \(\dfrac{15}{150} = \mathbf{\dfrac{1}{10}}\) |
(ii) "Or": the whole Year 9 row plus the Year 10 players (so the Year 9 players are not counted twice).
| \(P(\text{Y9 or plays})\) | \(=\) | \(\dfrac{64 + 15}{150} = \mathbf{\dfrac{79}{150}}\) |
| Has a cat | No cat | Total | |
|---|---|---|---|
| Has a dog | 12 | 18 | 30 |
| No dog | 10 | 40 | 50 |
| Total | 22 | 58 | 80 |
(i) Overlap (both) \(= 12\); \(D\) only \(= 18\); \(C\) only \(= 10\); neither \(= 40\).
(ii) Only the \(22\) cat households count: the "Has a cat" column.
| \(P(\text{dog, given cat})\) | \(=\) | \(\dfrac{12}{22} = \mathbf{\dfrac{6}{11}}\) |
(iii) Now only the \(30\) dog households count: the "Has a dog" row.
| \(P(\text{cat, given dog})\) | \(=\) | \(\dfrac{12}{30} = \mathbf{\dfrac{2}{5}}\) |
Same cell, different total: the two answers are not equal.
Each percentage is of a different group, so turn each into a count of its own row.
| \(\text{girls}\) | \(=\) | \(0.45 \times 400 = 180\) |
| \(\text{boys}\) | \(=\) | \(400 - 180 = 220\) |
| \(\text{girls with a ticket}\) | \(=\) | \(0.6 \times 180 = 108\) |
| \(\text{boys with a ticket}\) | \(=\) | \(0.4 \times 220 = 88\) |
| Ticket | No ticket | Total | |
|---|---|---|---|
| Girls | 108 | 72 | 180 |
| Boys | 88 | 132 | 220 |
| Total | 196 | 204 | 400 |
| \(P(\text{girl, given ticket})\) | \(=\) | \(\dfrac{108}{196} = \mathbf{\dfrac{27}{49}}\) |
| Yes | No | |
|---|---|---|
| Junior | \(3x\) | 18 |
| Senior | \(2x\) | 12 |
| \(3x + 18 + 2x + 12\) | \(=\) | \(80\) |
| \(5x\) | \(=\) | \(50\) |
| \(x\) | \(=\) | \(\mathbf{10}\) |
(ii) Juniors: \(30\) yes out of \(48\). Seniors: \(20\) yes out of \(32\). Compare the probability of "Yes" in each row.
| \(P(\text{yes, given junior})\) | \(=\) | \(\dfrac{30}{48} = 0.625\) |
| \(P(\text{yes, given senior})\) | \(=\) | \(\dfrac{20}{32} = 0.625\) |
Both equal \(0.625\) (and so does the whole group, \(\dfrac{50}{80}\)). Knowing the student is a junior does not change the probability: the events are independent.
Common pitfalls
Frequently asked questions
How do you find probability from a two-way table?
Find the cell, row or column that matches the event and divide by the grand total. If the question restricts the group, divide by that row or column total instead.
How do you complete a two-way table?
Add a total row and column, enter the numbers you know, then subtract from the totals to fill each missing cell. Check that the cells add to the grand total.
How do you change a two-way table into a Venn diagram?
The cell for both attributes is the overlap. The cells for one attribute only are the two parts of the circles outside the overlap, and the cell for neither goes outside both circles.
What is conditional probability in a two-way table?
It is a probability where you already know something about the person, such as their gender. Use only that row or column: divide the matching cell by that row or column total.
How do you tell if two events are independent from a two-way table?
Find the probability of one event within each row. If the probability is the same in every row, knowing the row does not change it, so the events are independent.