Two-Way Tables — Print
Two yes-or-no questions, four boxes, and a set of totals that must agree. Then turn counts into percentages.
What the practice questions cover
These questions use 3 ideas from the course. Follow any of them for a definition, where it is taught, and what it leads to.
- Percent — Parts per hundred. 37% = 37100 = 0.37.
- Association — A pattern linking the two variables.
- Two-way table — A table of counts sorted by two categorical variables at once.
Ask sixty people two yes-or-no questions: do you own a dog? do you own a cat?
Every single person lands in exactly one of four groups. Nobody is in two, nobody is in none.
Count them and the four boxes hold 12, 18, 20 and 10. Those add to 60, and they must — you asked everybody once.
That is your first check. If the four counts do not reach the grand total, a box is wrong.
Now a harder question: are dog owners more likely to own a cat than non-dog-owners?
Counts alone cannot tell you, because the groups are different sizes. You have to turn them into percentages — and which total you divide by decides which question you just answered.
Filling the table in
One variable labels the rows, the other labels the columns. Every person lands in exactly one inner cell.
Row totals go down the right-hand edge; column totals go along the bottom. The bottom-right corner is the grand total.
Fill in everything you are given, then use the totals to work out what is missing.
Totals are your check
Add the row totals. Add the column totals. Both must give the grand total. If they disagree, one inner cell is wrong.
Three different percentages
You can divide a cell by its row total, its column total, or the grand total. All three are legitimate, and they answer different questions.
"What percent of cat owners have a dog?" divides by the cat row total.
"What percent of dog owners have a cat?" divides by the dog column total. Different question, different answer.
Find the "of"
The words after "percent of" name the denominator. "Of the students who walk" means the walk total goes on the bottom. Underline those words before you divide.
Looking for association
If the percentage is roughly the same across the rows, the two variables are unrelated.
If it differs markedly, there is an association. 60% of one group against 25% of the other is a real difference.
Compare percentages, never raw counts — a bigger group will have bigger counts no matter what.
Counts mislead
40 out of 200 is a smaller share than 15 out of 50, even though 40 > 15. Convert to percentages before comparing.
Reading an incomplete table
Work out the easy missing entries first: any row or column with exactly one gap.
Each one you fill may open up another. Keep going round.
Finish by checking both sets of totals against the grand total.
Worked examples
Completing a table
Of 60 students, 32 walk. Of the walkers, 12 bring lunch. Altogether 27 bring lunch. Complete the table.
- Walk row: 12 bring lunch, so 32 - 12 = 20 do not. The row must total 32.
- Not-walk row total: 60 - 32 = 28 The column totals must reach 60.
- Lunch column: 27 total, 12 from walkers, so 15 from non-walkers. Fill the gap in the lunch column.
- Non-walkers with no lunch: 28 - 15 = 13 Check: 12 + 20 + 15 + 13 = 60 ✓
Walk: 12 / 20. Not walk: 15 / 13
Which denominator?
From that table, what percent of walkers bring lunch? And what percent of lunch-bringers walk?
- "Percent of walkers" means divide by 32. The words after "of" give the denominator.
- 1232 = 0.375 = 37.5% The first answer.
- "Percent of lunch-bringers" means divide by 27. A different denominator entirely.
- 1227 ≈ 44.4% Same cell, different question, different answer.
37.5% and about 44.4%
Is there an association?
12 of 32 walkers bring lunch; 15 of 28 non-walkers do. Is walking associated with bringing lunch?
- Walkers: 1232 = 37.5% Convert to a percentage.
- Non-walkers: 1528 ≈ 53.6% Same for the other group.
- 53.6% against 37.5% is a noticeable gap. About 16 percentage points.
- So yes, there is some association in this sample. Still not proof of cause.
Yes — non-walkers bring lunch more often here
Words to know
- Two-way table
- A table of counts sorted by two categorical variables at once.
- Joint frequency
- A count in a single inner cell.
- Marginal frequency
- A row total or a column total, out at the margin.
- Relative frequency
- A count expressed as a fraction or percentage of some total.
Mistakes to watch for
Dividing by the grand total when the question asked about one row. The words after "percent of" name the denominator. "Of the cat owners" means divide by the cat row total, not by 60.
Comparing raw counts between groups of different sizes. 40 out of 200 is a smaller share than 15 out of 50, even though 40 > 15. Convert to percentages first, every time.
Forgetting that both sets of totals must agree. Add the row totals and add the column totals; both must give the grand total. It is the cheapest way to catch a miscounted cell.
Reading the row variable as the column variable. Transposing the table swaps every "percent of" question for a different one — same cells, completely different answers.
A famous trap: in 1973 Berkeley appeared to admit men at a higher rate than women, and was nearly sued.
But broken down department by department, most departments favoured women. Women had simply applied more often to the departments that rejected nearly everybody.
This reversal is called Simpson's paradox, and it is the reason statisticians insist on seeing the two-way table rather than the summary.
Problem 1
A table has row totals 18 and 22. Find the grand total.
Worked answer
40
18 + 22 = 40
Problem 2
A row totals 30 and one cell in it is 11. Find the other cell.
Worked answer
19
30 - 11 = 19
Problem 3
In a table, 14 of 50 students walk to school. What percent walk?
Worked answer
28
1450 = 0.28
28%
Problem 4
A column totals 25 and holds cells 9 and x. Find x.
Worked answer
16
25 - 9 = 16
Problem 5
A table records 12 students who both bike and bring lunch. This count is called
Worked answer
a joint frequency
Inner cells are joint frequencies
Row and column totals are marginal
Problem 6
Of 40 walkers, 16 bring lunch. What percent of walkers bring lunch?
Worked answer
40
1640 = 0.4
40%
Problem 7
Of the 25 lunch-bringers, 16 walk. What percent of lunch-bringers walk?
Worked answer
64
1625 = 0.64
64%
Same cell, different denominator
Problem 8
60 people: 35 own a dog, 20 of those also own a cat, and 30 own a cat altogether. How many own neither?
Worked answer
15
Dog only: 35 - 20 = 15
Cat only: 30 - 20 = 10
At least one: 20 + 15 + 10 = 45
Neither: 60 - 45 = 15
Problem 9
The four inner cells of a table are x, 17, 23 and 12, with a grand total of 70. Find x.
Worked answer
18
x + 17 + 23 + 12 = 70
x + 52 = 70
x = 18
Problem 10
20 of 40 boys and 24 of 60 girls joined the club. Which is true?
- A larger share of boys joined
- A larger share of girls joined
- The shares are equal
- More boys joined than girls
Worked answer
A larger share of boys joined
Boys: 2040 = 50%
Girls: 2460 = 40%
So a larger share of boys
Problem 11
45 of 180 surveyed prefer tea. What percent is that?
Worked answer
25
45180 = 0.25
25%
Problem 12
In a two-way table, the total at the end of a row is called
Worked answer
a marginal frequency
Row and column totals are marginal frequencies
Problem 13
80 students: 48 take Spanish, 30 take art, 18 take both. How many take neither?
Worked answer
20
Spanish only: 48 - 18 = 30
Art only: 30 - 18 = 12
At least one: 18 + 30 + 12 = 60
Neither: 80 - 60 = 20
Problem 14
30 of 50 athletes and 18 of 60 non-athletes eat breakfast. Is there an association? Answer yes or no.
Worked answer
yes
Athletes: 3050 = 60%
Non-athletes: 1860 = 30%
A 30-point gap, so yes
Problem 15
In a table, 21 of the 28 people in a row answered yes. What percent of that row said no?
Worked answer
25
No: 28 - 21 = 7
728 = 0.25
25%
Problem 16
A table shows: total 150; 90 are female; 60 of the males said yes; 110 said yes altogether. How many females said no?
Worked answer
40
Males: 150 - 90 = 60
All 60 males said yes
Females who said yes: 110 - 60 = 50
Females who said no: 90 - 50 = 40