Skip to main content

Two-Way Tables — How to Organize and Interpret Data

Grade: 7-8 | Topic: Statistics

What You Will Learn

A two-way table lets you see how two categorical variables interact — for example, sport preference broken down by gender. In this guide you will learn to read existing tables, complete missing cells, convert counts to relative frequencies, and answer probability questions from table data.

Theory

Structure of a two-way table

A two-way frequency table has:

  • Rows for one categorical variable (e.g., Gender: Boy / Girl)
  • Columns for another categorical variable (e.g., Sport: Soccer / Basketball / Tennis)
  • Cells showing how many people fall into each combination
  • Marginal totals in the last row and last column

Example structure:

SoccerBasketballTennisTotal
Boy30181260
Girl20251560
Total504327120

Types of frequency

Joint frequency: the count in one cell — how many people fit both categories. E.g., 30 boys prefer soccer.

Marginal frequency: the total for a row or column. E.g., 60 boys total, 50 students prefer soccer.

Relative frequency: a count expressed as a fraction or percentage of the grand total.

Relative frequency=cell countgrand total\text{Relative frequency} = \frac{\text{cell count}}{\text{grand total}}

Conditional relative frequency: a cell count expressed as a fraction of its row or column total.

Conditional relative frequency (row)=cell countrow total\text{Conditional relative frequency (row)} = \frac{\text{cell count}}{\text{row total}}

Reading the table

To find the number of girls who prefer basketball, locate the Girl row and Basketball column: 25.

To find the total who prefer tennis: look at the Tennis column total: 27.

Worked Examples

Example 1 — Completing a two-way table

A survey of 80 students asked whether they prefer cats or dogs, split by grade 7 and grade 8.

CatsDogsTotal
Grade 7182240
Grade 8?2540
Total??80

Step 1: Grade 8 cats = 40 - 25 = 15.

Step 2: Total cats = 18 + 15 = 33.

Step 3: Total dogs = 22 + 25 = 47.

Check: 33 + 47 = 80 ✓.

Example 2 — Relative frequency

Using the completed table above, what fraction of all students prefer cats?

3380=0.412541.3%\frac{33}{80} = 0.4125 \approx 41.3\%

Example 3 — Conditional relative frequency

What proportion of grade 7 students prefer dogs?

2240=0.55=55%\frac{22}{40} = 0.55 = 55\%

This is a conditional relative frequency because the condition is "given the student is in grade 7."

Example 4 — Comparing groups

Is there a difference in cat preference between grades?

  • Grade 7: 1840=45%\frac{18}{40} = 45\% prefer cats.
  • Grade 8: 1540=37.5%\frac{15}{40} = 37.5\% prefer cats.

Grade 7 students prefer cats at a higher rate. A two-way table makes this comparison visible.

Common Mistakes

Mistake 1 — Adding marginal totals incorrectly

❌ Adding all the row totals and column totals to find the grand total, counting each number twice.

✅ The grand total equals the sum of all row totals (or all column totals) — not both. The grand total appears only once, in the bottom-right corner.

Mistake 2 — Confusing joint and conditional frequency

❌ "30 boys prefer soccer" means 30 out of all boys prefer soccer.

✅ The joint frequency is 30 (out of the grand total 120). The conditional frequency of soccer given boy is 3060=50%\frac{30}{60} = 50\% of boys.

Mistake 3 — Dividing by the wrong total for conditional frequency

❌ Finding the probability that a soccer fan is a boy: dividing 30 by 120 (grand total).

✅ Divide by the soccer column total: 3050=60%\frac{30}{50} = 60\% of soccer fans are boys.

Practice Problems

Problem 1: Complete the table.

MorningEveningTotal
Monday1520?
Tuesday12?30
Total???
Show Answer

Monday total = 35; Tuesday evening = 18; Total morning = 27; Total evening = 38; Grand total = 65.

Problem 2: Using the sports table from the Theory section, what percentage of all students prefer basketball?

Show Answer

4312035.8%\dfrac{43}{120} \approx 35.8\%

Problem 3: In the sports table, what proportion of girls prefer soccer?

Show Answer

2060=1333.3%\dfrac{20}{60} = \dfrac{1}{3} \approx 33.3\%

Problem 4: A student is chosen at random. What is the probability they are a boy who prefers tennis?

Show Answer

12120=110=10%\dfrac{12}{120} = \dfrac{1}{10} = 10\%

Problem 5: Do boys or girls show a stronger preference for basketball?

Show Answer

Boys: 1860=30%\dfrac{18}{60} = 30\%. Girls: 256041.7%\dfrac{25}{60} \approx 41.7\%.

Girls show a stronger preference for basketball.

Summary

  • A two-way table organises counts for two categorical variables — rows for one, columns for the other.
  • Joint frequency: a single cell count. Marginal frequency: a row or column total.
  • Relative frequency: divide any count by the grand total.
  • Conditional relative frequency: divide a cell count by its row or column total, depending on the condition.
  • Two-way tables make it easy to compare groups and identify patterns in categorical data.

Need help with two-way tables? Take a photo of your math problem and MathPal will solve it step by step. Open MathPal