01 / 20

Two-Way
Tables

Learn to construct and interpret two-way tables that reveal hidden patterns between categorical variables.

8th Grade Math

What Is a Two-Way Table?

A two-way table (also called a contingency table) organizes data about two categorical variables collected from the same group of subjects. Rows represent one variable, columns represent the other, and each cell shows the count (frequency) of subjects in that combination.

Anatomy of a Two-Way Table

Variable 1 Category A (Column) Category B (Column) Category X (Row) Category Y (Row) Total Cell (joint freq.) Cell Cell Cell Col Total Col Total Row → ↓ Column

Why Two-Way Tables Matter

Two-way tables appear everywhere: medical studies (treatment vs. outcome), surveys (opinion vs. age group), and school research (study habit vs. grade). They answer a simple but powerful question:

Frequency
The raw count of subjects in each cell
Relative Frequency
The proportion (fraction or %) of a row, column, or total

Key Vocabulary

Joint Frequency
Count in an inner cell where a row and column meet
Marginal Frequency
Row total or column total along the edges (margins)
Relative Frequency
\(\frac{\text{part}}{\text{whole}}\) expressed as a decimal or percent

Three Types of Relative Frequency

1
Row relative frequency: \(\frac{\text{cell value}}{\text{row total}}\). Tells what fraction of that row falls in a given column.
2
Column relative frequency: \(\frac{\text{cell value}}{\text{column total}}\). Tells what fraction of that column falls in a given row.
3
Overall relative frequency: \(\frac{\text{cell value}}{\text{grand total}}\). Tells what fraction of all subjects fall in that cell.

Frequency vs. Relative Frequency

Frequency Relative Frequency
What it shows Raw count Proportion or %
Example value 24 students 0.40 or 40%
Best for Seeing totals Comparing groups
Reveals association? Hard to tell Yes: compare across rows/columns

How to Construct a Two-Way Table

1
Identify the two categorical variables. Example: "Has curfew?" (Yes/No) and "Has chores?" (Yes/No).
2
Draw the grid. One variable labels the rows, the other labels the columns. Add a "Total" row and column.
3
Tally the data. Go through each subject and place a tally mark in the correct cell.
4
Add up the totals. Sum each row and column. The bottom-right cell is the grand total.
5
Verify: Each row total + each column total must both sum to the grand total.

Example 1: Curfew and Chores

A teacher surveyed 60 students about whether they have a curfew on school nights and whether they have assigned chores at home. Here are the results:

Has Chores No Chores Total
Has Curfew 28 7 35
No Curfew 12 13 25
Total 40 20 60

Row Relative Frequencies

Divide each cell by its row total to see what percentage of each group (Curfew vs. No Curfew) has chores:

Has Chores No Chores
Has Curfew \(\frac{28}{35} = \) 80% \(\frac{7}{35} = \) 20%
No Curfew \(\frac{12}{25} = \) 48% \(\frac{13}{25} = \) 52%

Example 2: Sport and Grade Level

A school collected data on 100 students about their preferred sport and grade level:

Basketball Soccer Other Total
7th Grade 15 20 10 45
8th Grade 25 15 15 55
Total 40 35 25 100

Example 3: Column Relative Frequencies

Using the same sport data, compute column relative frequencies to answer: "Of all basketball players, what fraction are 8th graders?"

Basketball Soccer Other
7th Grade \(\frac{15}{40} =\) 37.5% \(\frac{20}{35} \approx\) 57% \(\frac{10}{25} =\) 40%
8th Grade \(\frac{25}{40} =\) 62.5% \(\frac{15}{35} \approx\) 43% \(\frac{15}{25} =\) 60%

Interpreting Association

1
Calculate row (or column) relative frequencies for each row (or column).
2
Compare the percentages across rows. If they are similar, there is no association.
3
If the percentages differ noticeably, there is evidence of association between the variables.

Visualizing Association

Compare the row relative frequencies from Example 1 side-by-side:

0% 25% 50% 75% 100% 80% 20% Has Curfew 48% 52% No Curfew Has Chores No Chores

Common Mistakes

✕ Wrong Denominator
Using the grand total when you should divide by the row total (or vice versa). Always match denominator to the question being asked.
✕ Confusing Frequency with Relative Frequency
Comparing raw counts between groups of different sizes. Convert to percentages first to make fair comparisons.
✕ Claiming Causation
Saying one variable "causes" the other based on association alone. A two-way table shows association, not causation.

Summary Comparison

Concept Definition When to Use
Joint Frequency Count in one cell Reporting exact numbers
Marginal Frequency Row or column total Finding group sizes
Row Relative Freq. \(\frac{\text{cell}}{\text{row total}}\) Comparing columns within each row
Column Relative Freq. \(\frac{\text{cell}}{\text{col total}}\) Comparing rows within each column
Overall Relative Freq. \(\frac{\text{cell}}{\text{grand total}}\) Seeing each cell's share of total

Question 1 of 5

What is the row relative frequency of "Dogs + Sport" (relative to all dog lovers)?

Question 2 of 5

In a two-way table, what does a marginal frequency represent?

Question 3 of 5

What fraction of students who did not complete homework passed the test?

Question 4 of 5

Two groups have the following row relative frequencies for "Likes Reading": Group A = 70%, Group B = 68%. What can you conclude?

Question 5 of 5

Which statement is the best interpretation of this finding?