Two-Way Tables
A two-way table sorts a group by two features at once, such as whether a student walks to school and how far away they live, with row and column totals. In NSW Year 10 Advanced maths two-way tables are used to find probabilities, including conditional ones where the choice is limited to one row or column (NESA outcome MA5‑PRO‑P‑01).
You will complete tables from partial information and percentages, find probabilities for a whole group and within one row or column, and convert a Venn diagram into a table. Real data include a Bondi surf club, cars in a Canberra car park, a rapid virus test, speeding and crashes on a country road, and a medical screening test that gives false positives. Harder questions use algebra to find unknown entries. It is part of Year 10 Advanced Probability.
Every question with a fully worked solution.
- Two-Way Tables - Video - Basic Two-Way Tables Watch
Theory
A two-way table sorts a group by two attributes at once, with totals for each row and column. This Year 10 Advanced maths page covers completing a table from totals and percentages, "and", "or" and "given" probabilities, converting to and from Venn diagrams, unknowns in cells and testing whether two attributes are independent.
A two-way table has one attribute down the side (rows) and another across the top (columns). Each inner cell counts the people or objects with one row attribute and one column attribute. The last row and column hold the totals, and the bottom-right cell is the grand total.
Every row adds to its row total and every column adds to its column total. So if all but one number in a row or column is known, the missing one can be found by subtraction.
A conditional probability, such as \(P(\text{sport}\mid\text{girl})\), read "the probability of sport given girl", uses only the row or column named after the bar as the total. This restricts the sample space.
Two attributes are independent when knowing one does not change the probability of the other: \(P(A\mid B)=P(A)\). In a table this means the proportions are the same in every row.
| Question asks for | Numerator | Denominator |
|---|---|---|
| \(A\) and \(B\) | one inner cell | grand total |
| \(A\) (any column) | row total of \(A\) | grand total |
| \(A\) or \(B\) | row \(A\) \(+\) column \(B\) \(-\) shared cell | grand total |
| \(A\) given \(B\) | the cell in both | total of \(B\) only |
| neither \(A\) nor \(B\) | the cell in row \(A'\) and column \(B'\) | grand total |
How to complete and use a two-way table
- Draw the table with a Total row and a Total column. Label the rows and columns.
- Enter every number given. Turn percentages or fractions of a group into counts first: \(35\%\) of \(260\) is \(91\).
- Fill the gaps one at a time, choosing a row or column with only one unknown. Check that the totals add up both ways.
- Decide the denominator. "A student is chosen" means the grand total. "A girl is chosen" or "given that" means that row or column total only.
- Find the numerator from the cells that satisfy the event, counting any shared cell once for "or".
Other question types
- Algebra in cells: add all the inner cells, set the sum equal to the grand total, solve, then rebuild the table (Example 4). A probability given as a fraction gives an equation such as \(\dfrac{8+x}{50+x}=\dfrac{2}{5}\).
- Independence: compare \(P(A\mid B)\) with \(P(A)\), or the proportions in two rows. Equal means independent.
- How many times more likely: divide one conditional probability by the other, using exact values.
- Two people chosen: when two are chosen without replacement, the second total is one less. Multiply the two probabilities, as in Sampling without Replacement.
(i) Complete a two-way table. A student is chosen at random. Find:
(ii) \(P(\text{a girl who does not play})\)
(iii) \(P(\text{a boy or plays sport})\)
(i) Fill one gap at a time, using row and column totals.
| \(\text{Girls}\) | \(=\) | \(150-70=80\) |
| \(\text{Girls, sport}\) | \(=\) | \(84-46=38\) |
| \(\text{Girls, no sport}\) | \(=\) | \(80-38=42\) |
| \(\text{Boys, no sport}\) | \(=\) | \(70-46=24\) |
| Sport | No sport | Total | |
|---|---|---|---|
| Boys | \(46\) | \(24\) | \(70\) |
| Girls | \(38\) | \(42\) | \(80\) |
| Total | \(84\) | \(66\) | \(150\) |
(ii) One cell: \(P=\dfrac{42}{150}=\boldsymbol{\dfrac{7}{25}}\).
(iii) All boys plus the girls who play, so the \(46\) sporty boys are counted once: \(P=\dfrac{70+38}{150}=\boldsymbol{\dfrac{18}{25}}\).
(i) A girl is chosen at random. Find the probability that she plays sport.
(ii) A student who plays sport is chosen at random. Find the probability that the student is a girl.
(iii) Why are the answers different?
(i) Only the Girls row counts.
| \(P(\text{sport}\mid\text{girl})\) | \(=\) | \(\dfrac{38}{80}=\boldsymbol{\dfrac{19}{40}}\) |
(ii) Only the Sport column counts.
| \(P(\text{girl}\mid\text{sport})\) | \(=\) | \(\dfrac{38}{84}=\boldsymbol{\dfrac{19}{42}}\) |
(iii) Both use the same \(38\) students, but the condition changes the group: \(80\) girls in (i), \(84\) sport players in (ii).
Build the table from the percentages.
| \(\text{under } 30\) | \(=\) | \(35\%\times 600=210\) |
| \(\text{under } 30 \text{, streams}\) | \(=\) | \(60\%\times 210=126\) |
| \(\text{others}\) | \(=\) | \(600-210=390\) |
| \(\text{others, streams}\) | \(=\) | \(20\%\times 390=78\) |
Total who stream: \(126+78=204\). Only these \(204\) count.
| \(P(\text{under } 30\mid\text{streams})\) | \(=\) | \(\dfrac{126}{204}=\boldsymbol{\dfrac{21}{34}}\) |
| \(\) | \(\approx\) | \(\boldsymbol{62\%}\) |
Although only \(35\%\) of people are under \(30\), they make up most of the daily streamers.
(i) Find \(x\).
(ii) Is having seen the film independent of being an adult? Justify.
(i) The four cells add to \(74\).
| \(2x+(x+6)+x+(3x-2)\) | \(=\) | \(74\) |
| \(7x+4\) | \(=\) | \(74\) |
| \(x\) | \(=\) | \(\boldsymbol{10}\) |
Adults: \(20\) yes, \(16\) no (\(36\) adults). Children: \(10\) yes, \(28\) no (\(38\) children).
(ii) Compare the probability of "yes" for adults with the probability for everyone.
| \(P(\text{yes}\mid\text{adult})\) | \(=\) | \(\dfrac{20}{36}=\dfrac{5}{9}\approx 0.56\) |
| \(P(\text{yes})\) | \(=\) | \(\dfrac{30}{74}=\dfrac{15}{37}\approx 0.41\) |
These are different, so knowing someone is an adult changes the chance they have seen the film. The events are not independent.
Common pitfalls
Frequently asked questions
How do you complete a two-way table?
Write in all the given numbers, then find each missing number by subtraction from a row or column total, choosing a row or column with only one gap each time. Finally check that the rows and columns both add to the grand total.
How do you find a conditional probability from a two-way table?
Use only the row or column that matches the condition. Divide the cell that also matches the event by that row or column total.
How do you tell if two events in a two-way table are independent?
Compare the probability of one event within a row with its probability for the whole table. If they are equal, the events are independent; if not, they are dependent.
How is a two-way table related to a Venn diagram?
A two-set Venn diagram has four regions: both, \(A\) only, \(B\) only and neither. These are exactly the four inner cells of a two-way table, so either can be drawn from the other.
Why can a positive test result still be unlikely to mean you have the condition?
If the condition is rare, the large group without it produces many false positives even when the test is usually right. A two-way table of counts shows how many positives are false.