Two-Way Tables - Complete Interactive Lesson
Part 1: Reading the Table
📊 Two-Way Tables
Part 1 of 5 — Reading the Table
Topics in This Part
| Section |
|---|
| What Is a Two-Way Table? |
| Cells, Rows, and Columns |
| Marginal Totals (the Margins) |
🔑 Key Concept: A two-way table sorts the same group of people (or things) by two categorical variables at once — like "grade level" and "favorite sport." It lets you see how the two categories overlap.
What Is a Two-Way Table?
Suppose we survey 80 students and ask two yes/no questions:
- Do you own a dog?
- Do you own a cat?
Each student lands in exactly one box of this table:
| Owns a Cat | No Cat | Total | |
|---|---|---|---|
| Owns a Dog | 18 | 27 | 45 |
| No Dog | 14 | 21 | 35 |
| Total | 32 | 48 | 80 |
- The inside numbers () are the joint frequencies — they count people in both categories at once.
- The right column and bottom row are the marginal totals — they live in the margins of the table.
🔑 Key Idea: Every inside number answers "how many are in this row AND this column?" For example, students own a dog AND a cat.
Concept Check 🎯
Use the dog/cat table above.
The Margins Are Just Sums
Every marginal total is found by adding across a row or down a column:
And the grand total in the bottom-right corner can be reached three different ways — they must all agree:
| Add this way | Calculation | Result |
|---|---|---|
| The two row totals | ||
| The two column totals | ||
| All four inside cells |
💡 Built-in check: If your row totals and column totals don't add up to the same grand total, a number is wrong somewhere. Two-way tables check themselves.
Find the Marginal Totals 🧮
A different survey of students about breakfast is shown. Fill in the missing totals.
| Eats Breakfast | Skips Breakfast | |
|---|---|---|
| 6th Grade | 22 | 8 |
| 7th Grade | 19 | 11 |
1) Total number of 6th graders 2) Total number of students who eat breakfast 3) Grand total of all students surveyed
Naming the Numbers
Before moving on, let's lock in the vocabulary:
- An inside cell is a joint frequency — it counts members of one row category and one column category.
- A number in the right column or bottom row is a marginal total.
- The corner number is the grand total.
💡 The word joint literally means "joined together" — two categories joined in one cell.
Name That Number 🔽
Use the same breakfast table (6th grade: 22 eat, 8 skip; 7th grade: 19 eat, 11 skip). Classify each value.
What You Can Do Now
You can locate any joint frequency (an inside cell) and build the marginal totals by summing.
In Part 2 you'll work in reverse: when some cells are blank, you'll use the margins to figure out the missing numbers — like a number puzzle that always has one answer.
Part 2: Completing a Table
📊 Two-Way Tables
Part 2 of 5 — Completing a Table
🔑 The Idea: Because every row and column must add to its total, a two-way table with a few blanks behaves like a puzzle: each empty cell can be recovered by subtraction.
Filling In Blanks with Subtraction
If a row total is known and one cell is missing, then:
The same works going down a column.
Worked Example
A class of 50 students chose pizza or tacos. Some cells are missing (shown as ?):
| Pizza | Tacos | Total | |
|---|---|---|---|
| Boys | 12 | ? | 20 |
| Girls | ? | 17 | ? |
| Total | 25 | ? | 50 |
Step 1 — Boys/Tacos (fill the row): .
Step 2 — Girls/Pizza (fill the Pizza column): .
Step 3 — Girls total (fill the Girls row): . (Check: ✓)
Step 4 — Tacos total (fill the column): . (Check: ✓)
💡 Order tip: Always start with a row or column that has only one blank — then it's a single subtraction.
Concept Check 🎯
Use the completed pizza/tacos table from the worked example.
Your Turn — Pick the Easy Cell First
When you face a blank table, scan for a row or column that has only one missing cell. That blank is a single subtraction away. Fill it, and often a new row or column now has just one blank — keep going until the table is full.
🔑 Strategy: Solve the easy blanks first; each one you fill makes the next one easier.
Complete the Table 🧮
A survey of 100 people asked whether they prefer tea or coffee:
| Tea | Coffee | Total | |
|---|---|---|---|
| Adults | ? | 56 | ? |
| Teens | 21 | ? | 30 |
| Total | 35 | ? | 100 |
1) Adults who prefer tea 2) Teens who prefer coffee 3) Total number of adults
A Note on Consistency
When you finish a table, every row and column should land on its printed total, and the row totals and column totals should both sum to the same grand total. If they don't, recheck your subtractions — a single arithmetic slip ripples through the whole table.
⚠️ Common mistake: Filling a blank by guessing instead of subtracting. There is only one number that makes the row (or column) add up correctly — find it, don't estimate it.
Finish the Puzzle 🧮
60 students were asked if they walk or ride the bus to school:
| Walks | Bus | Total | |
|---|---|---|---|
| Lives Near | 16 | ? | 22 |
| Lives Far | ? | 31 | ? |
| Total | 23 | ? | 60 |
1) Students who live near AND take the bus 2) Students who live far AND walk 3) Total number of students who take the bus
Part 3: Relative Frequencies
📊 Two-Way Tables
Part 3 of 5 — Relative Frequencies
🔑 The Idea: A relative frequency turns a count into a fraction of the whole — a decimal or percent. It lets you compare groups of different sizes fairly.
Relative Frequency = Part ÷ Whole
To convert any count to a relative frequency, divide by the grand total:
Then multiply by to get a percent.
Reference Table — 80 Students
| Owns a Cat | No Cat | Total | |
|---|---|---|---|
| Owns a Dog | 18 | 27 | 45 |
| No Dog | 14 | 21 | 35 |
| Total | 32 | 48 | 80 |
- Joint relative frequency (an inside cell ÷ grand total): dog-and-cat owners .
- Marginal relative frequency (a margin ÷ grand total): dog owners .
💡 All of the joint relative frequencies in a table add up to , because together the inside cells account for everyone.
Concept Check 🎯
Use the 80-student dog/cat table above.
Turning Counts into Percents
The recipe is always the same two steps:
- Divide the count by the grand total → a decimal.
- Multiply by → a percent.
For example, , and .
⚠️ Don't forget step 2! A relative frequency of is the same value as — but write whichever the question asks for.
Compute Relative Frequencies 🧮
Use the 80-student dog/cat table. Give each answer as a percent (a number; the is understood). Decimals are fine.
1) What percent of all students own a dog but no cat? 2) What percent of all students own no dog (marginal)? 3) What percent of all students own a dog AND a cat?
Joint vs. Marginal — Don't Mix Them Up
| Type | What it divides | Example |
|---|---|---|
| Joint relative frequency | inside cell ÷ grand total | have a dog and a cat |
| Marginal relative frequency | a margin ÷ grand total | have a cat (whether or not they have a dog) |
⚠️ Both joint and marginal relative frequencies divide by the grand total. In Part 4 we'll divide by a row or column total instead — that's a different, very useful idea called a conditional relative frequency.
Joint or Marginal? 🔽
Each value comes from the 80-student dog/cat table. Classify each one.
Part 4: Conditional Relative Frequencies & Association
📊 Two-Way Tables
Part 4 of 5 — Conditional Relative Frequencies & Association
🔑 The Idea: A conditional relative frequency divides by a row or column total instead of the grand total. It answers questions like "Of the cat owners, what fraction also own a dog?" — and reveals whether the two variables are associated.
Conditional = Divide by a Row or Column
The phrase after "of the" tells you which total to divide by.
Reference Table — 80 Students
| Owns a Cat | No Cat | Total | |
|---|---|---|---|
| Owns a Dog | 18 | 27 | 45 |
| No Dog | 14 | 21 | 35 |
| Total | 32 | 48 | 80 |
"Of the dog owners, what percent also own a cat?" Stay inside the Dog row (total ): .
"Of the cat owners, what percent also own a dog?" Stay inside the Cat column (total ): .
💡 Same cell, different answers! and both use the cell , but divide by different totals. The wording — of the dogs vs of the cats — decides the denominator.
Concept Check 🎯
Use the 80-student dog/cat table above.
Let "Of the…" Choose Your Denominator
The single most useful trick: read the phrase right after "of the."
| The question says… | Divide by… |
|---|---|
| "Of the boys, …" | the Boys row total |
| "Of the cat owners, …" | the Cat column total |
| "Of the under-30s, …" | the Under-30 row total |
🔑 The "of the" group is your whole for that question — its total goes on the bottom of the fraction.
Conditional Relative Frequencies 🧮
A survey asked 120 people whether they exercise regularly:
| Exercises | Doesn't | Total | |
|---|---|---|---|
| Under 30 | 36 | 24 | 60 |
| 30 or Older | 27 | 33 | 60 |
| Total | 63 | 57 | 120 |
Give each answer as a percent (number only). Decimals are fine.
1) Of the people under 30, what percent exercise? 2) Of the people 30 or older, what percent exercise? 3) Of all the people who exercise, what percent are under 30? (round to the nearest whole percent)
Spotting an Association
Two variables show an association when the conditional relative frequencies are clearly different across groups. If they're about the same, there's little or no association.
From the exercise table:
- Of those under 30, exercise.
- Of those 30 or older, exercise.
These percentages differ noticeably ( vs ), so there is an association: younger people in this survey were more likely to exercise.
🔑 The right comparison: To judge association, compare conditional percentages computed the same way (e.g., row percents to row percents). Comparing raw counts can mislead when the groups are different sizes.
Read the Association 🔽
A study tracked whether students passed a quiz, split by whether they studied:
| Passed | Failed | Total | |
|---|---|---|---|
| Studied | 45 | 5 | 50 |
| Didn't | 12 | 18 | 30 |
| Total | 57 | 23 | 80 |
Complete the analysis.
Part 5: Mixed Practice & Mastery Check
📊 Two-Way Tables
Part 5 of 5 — Mixed Practice & Mastery Check
You can now (1) read joint and marginal frequencies, (2) complete a table with subtraction, (3) compute joint & marginal relative frequencies, and (4) use conditional relative frequencies to judge association. Let's put it all together.
Quick Reference
| Quantity | Divide the cell by… | Answers the question |
|---|---|---|
| Joint relative frequency | grand total | "What fraction of everyone?" |
| Marginal relative frequency | grand total (using a margin) | "What fraction of everyone is in one category?" |
| Conditional relative frequency | a row or column total | "Of this group, what fraction…?" |
⚠️ The denominator decides everything. Joint & marginal use the grand total; conditional uses the row or column total named after "of the." Pick the wrong denominator and every percent is wrong.
💡 To check for association, compare conditional percentages across groups: a clear difference means the variables are associated.
Mixed Practice 🎯
A survey of 200 commuters asked their main transport and whether they were ever late this week:
| Late | On Time | Total | |
|---|---|---|---|
| Car | 24 | 56 | 80 |
| Train | 36 | 84 | 120 |
| Total | 60 | 140 | 200 |
Putting It All Together
Notice how the commuter table used every skill at once: marginal relative frequency (), conditional relative frequency (), and a comparison of conditionals to judge association. That's the full toolkit — and the next table asks you to build one from scratch and read a conditional from it.
One More Table 🧮
A club of 40 members was surveyed on whether they prefer summer or winter:
| Summer | Winter | Total | |
|---|---|---|---|
| Students | 18 | ? | 24 |
| Adults | ? | 10 | ? |
| Total | 24 | ? | 40 |
1) Students who prefer winter 2) Adults who prefer summer 3) Of the members who prefer summer, what percent are students?
You're Ready
You can now read a two-way table, complete it, and compute joint, marginal, and conditional relative frequencies — and use them to judge association. One last table to prove it.
🔑 Remember the denominator rule: grand total for joint & marginal; the "of the" group's total for conditional.
Exit Quiz ✅
Answer all three to finish the lesson. Use this table of 50 pet-store customers:
| Bought Food | No Food | Total | |
|---|---|---|---|
| Member | 20 | 5 | 25 |
| Non-Member | 10 | 15 | 25 |
| Total | 30 | 20 | 50 |