Two-Way Tables Examples in Statistics

Start with the recap, study the fully worked examples, then use the practice problems to check your understanding of Two-Way Tables.

This page combines explanation, solved examples, and follow-up practice so you can move from recognition to confident problem-solving in Statistics.

Concept Recap

A table that displays the frequency of data categorized by two different variables, allowing comparison across groups.

A two-way table is like a spreadsheet that shows how two questions relate. 'Do you like pizza?' and 'Are you a kid or adult?' becomes a 2 \times 2 grid showing how many kid pizza-lovers, adult pizza-lovers, etc.

Read the full concept explanation โ†’

How to Use These Examples

  • Read the first worked example with the solution open so the structure is clear.
  • Try the practice problems before revealing each solution.
  • Use the related concepts and background knowledge badges if you feel stuck.

What to Focus On

Core idea: A two-way table organizes data by two categorical variables simultaneously, letting you see joint frequencies and compare conditional distributions across groups.

Common stuck point: Students confuse joint frequencies (count in one cell) with marginal frequencies (row or column totals) and use the wrong denominator when computing percentages.

Worked Examples

Example 1

easy
A survey of 60 students recorded their gender and whether they prefer cats or dogs. Boys who prefer cats: 8, boys who prefer dogs: 17, girls who prefer cats: 15, girls who prefer dogs: 20. Organise this into a two-way table with row and column totals.

Solution

  1. 1
    Step 1: Set up the table with rows (Boys, Girls, Total) and columns (Cats, Dogs, Total).
  2. 2
    Step 2: Fill in the given values: Boys-Cats=8, Boys-Dogs=17, Girls-Cats=15, Girls-Dogs=20.
  3. 3
    Step 3: Calculate totals. Row totals: Boys=8+17=25, Girls=15+20=35. Column totals: Cats=8+15=23, Dogs=17+20=37. Grand total: 25+35=60 (or 23+37=60). โœ“

Answer

Two-way table: Boys (Cats:8, Dogs:17, Total:25), Girls (Cats:15, Dogs:20, Total:35), Total (Cats:23, Dogs:37, Grand:60).
A two-way table (contingency table) organises data by two categorical variables. Row and column totals (marginal frequencies) show the distribution of each variable separately, while the inner cells show the joint frequencies.

Example 2

medium
From the two-way table: Passed exam โ€” studied (40), didn't study (10); Failed exam โ€” studied (5), didn't study (25). Calculate the percentage of students who passed among those who studied, and among those who didn't study.

Practice Problems

Try these problems on your own first, then open the solution to compare your method.

Example 1

medium
A two-way table shows transport to school: Walk (Year 7: 30, Year 8: 20), Bus (Year 7: 15, Year 8: 25), Car (Year 7: 5, Year 8: 10). What percentage of Year 8 students take the bus?

Example 2

hard
A two-way table shows exercise frequency and health rating for 200 adults: Exercise regularly โ€” Good health: 70, Fair: 20, Poor: 10. Don't exercise regularly โ€” Good health: 30, Fair: 40, Poor: 30. Is there an association between exercise and health? Support your answer with conditional percentages.

Related Concepts

Background Knowledge

These ideas may be useful before you work through the harder examples.

data representationcategorical data