Analyzing
Two-Way Tables
Learn to read, interpret, and draw evidence-based conclusions from two-way frequency tables using joint, marginal, and conditional frequencies.
What Is a Two-Way Table?
A two-way table (also called a contingency table) displays data for two categorical variables at the same time. One variable defines the rows and the other defines the columns, so every cell shows how many observations fall into that combination.
Key Vocabulary
Seeing It in Action
A school surveyed 200 students about their preferred sport and their grade level. Here is the two-way table:
| Basketball | Soccer | Tennis | Total | |
|---|---|---|---|---|
| 9th & 10th | 35 | 40 | 15 | 90 |
| 11th & 12th | 45 | 30 | 35 | 110 |
| Total | 80 | 70 | 50 | 200 |
Joint vs. Marginal Frequencies
| Basketball | Soccer | Tennis | Total | |
|---|---|---|---|---|
| 9th & 10th | 35 | 40 | 15 | 90 |
| 11th & 12th | 45 | 30 | 35 | 110 |
| Total | 80 | 70 | 50 | 200 |
Relative Frequencies
Divide each frequency by the grand total to convert counts into proportions (or percentages). This lets you compare groups of different sizes fairly.
Conditional Relative Frequency
A conditional relative frequency restricts the calculation to one row or one column. You divide a joint frequency by its row (or column) total instead of the grand total.
Three Types of Relative Frequency
| Type | Formula | Denominator | Example |
|---|---|---|---|
| Joint | \(\frac{\text{cell}}{\text{grand total}}\) | Grand total | \(\frac{35}{200}\) |
| Marginal | \(\frac{\text{row or col total}}{\text{grand total}}\) | Grand total | \(\frac{80}{200}\) |
| Conditional | \(\frac{\text{cell}}{\text{row or col total}}\) | Row or col total | \(\frac{45}{110}\) |
Step-by-Step Approach
Example 1: Joint Frequency
Question: What fraction of all students are 9th/10th graders who prefer soccer?
| Basketball | Soccer | Tennis | Total | |
|---|---|---|---|---|
| 9th & 10th | 35 | 40 | 15 | 90 |
| 11th & 12th | 45 | 30 | 35 | 110 |
| Total | 80 | 70 | 50 | 200 |
Example 2: Conditional Frequency
Question: Among students who prefer tennis, what percentage are in 11th/12th grade?
| Basketball | Soccer | Tennis | Total | |
|---|---|---|---|---|
| 9th & 10th | 35 | 40 | 15 | 90 |
| 11th & 12th | 45 | 30 | 35 | 110 |
| Total | 80 | 70 | 50 | 200 |
Example 3: Comparing Conditionals
Question: Is there evidence of an association between grade level and sport preference? Compare basketball preference across the two grade groups.
Association vs. Independence
| Association | Independence | |
|---|---|---|
| Definition | Knowing one variable changes the likelihood of the other | Knowing one variable does not change the likelihood of the other |
| Conditionals | Conditional frequencies differ across rows/columns | Conditional frequencies are nearly equal |
| Example | Tennis: \(16.7\%\) vs. \(31.8\%\) | Basketball: \(38.9\%\) vs. \(40.9\%\) |
| Conclusion | Grade level is associated with tennis preference | Grade level is not associated with basketball preference |
Justifying with Evidence
On tests and assignments, you must cite specific numbers from the table to support your conclusion. A strong justification has three parts:
Common Mistakes
Quick Reference Summary
| Question Asks | Numerator | Denominator | Type |
|---|---|---|---|
| "What fraction of all students...?" | Joint cell | Grand total | Joint relative |
| "What fraction are in group X?" | Row/col total | Grand total | Marginal relative |
| "Given group X, what fraction...?" | Joint cell | Row/col total | Conditional relative |
| "Is there an association?" | Compare conditional frequencies across rows or columns | Association test | |
Question 1 of 5
A pet store surveyed 150 customers about which pet they own and whether they live in a house or apartment.
| Dog | Cat | Total | |
|---|---|---|---|
| House | 50 | 30 | 80 |
| Apartment | 25 | 45 | 70 |
| Total | 75 | 75 | 150 |
What is the joint relative frequency of apartment dwellers who own a cat?
Question 2 of 5
Use the same pet store data:
| Dog | Cat | Total | |
|---|---|---|---|
| House | 50 | 30 | 80 |
| Apartment | 25 | 45 | 70 |
| Total | 75 | 75 | 150 |
Given that a customer lives in a house, what is the probability they own a dog?
Question 3 of 5
Use the same pet store data:
| Dog | Cat | Total | |
|---|---|---|---|
| House | 50 | 30 | 80 |
| Apartment | 25 | 45 | 70 |
| Total | 75 | 75 | 150 |
Is there evidence of an association between housing type and pet type? Which comparison best supports the answer?
Question 4 of 5
A teacher collected data on 120 students about study method and test result.
| Pass | Fail | Total | |
|---|---|---|---|
| Flashcards | 42 | 18 | 60 |
| Re-reading | 28 | 32 | 60 |
| Total | 70 | 50 | 120 |
What is the marginal relative frequency of students who passed?
Question 5 of 5
Same study method data:
| Pass | Fail | Total | |
|---|---|---|---|
| Flashcards | 42 | 18 | 60 |
| Re-reading | 28 | 32 | 60 |
| Total | 70 | 50 | 120 |
A student claims: "Flashcards cause students to pass because \(70\%\) of flashcard users passed." Which response best evaluates this claim?