Two-Way Table

Definitionnoun phrase

What is a two-way table in math?

A two-way table shows counts for two categorical variables collected from the same group, with one variable in the rows and the other in the columns. Each inside cell is a joint frequency, and the totals in the margins are marginal frequencies. Dividing a cell by a row or column total gives relative frequencies that reveal associations.

In Spanish
tabla de doble entrada (tabla de contingencia)
Also called
contingency table, two-way frequency table, cross-tabulation, crosstab
Grade level
6-8
Grade 8Algebra 1CCSS 8.SP.A.4CCSS HSS-ID.B.5GEDSATACT

Two-Way Table in a picture

A two-way table with joint and marginal frequenciesA two-way table of 110 students: grade 7 has 30 who play a sport and 20 who do not (total 50); grade 8 has 45 and 15 (total 60). Column totals are 75 and 35. Inside cells are joint frequencies, the totals are marginal frequencies, and 110 is the grand total. 60% of grade 7 and 75% of grade 8 play a sport.Does each student play a team sport?sportno sporttotalgrade 7302050grade 8451560total7535110joint frequency: inside cell (30 grade 7 students play)marginal frequency: row or column totalgrand total: everyone surveyed (110)Row relative frequenciesgrade 7: 30/50 = 60% playgrade 8: 45/60 = 75% playDifferent percentages suggest an association.
Read a cell as both categories: 30 students are in grade 7 and play a sport. Compare percentages within each row (60% versus 75%) to see whether grade and playing a sport are associated.

Formal definition and notation

A two-way (contingency) table cross-classifies n observations by two categorical variables with r and c categories. Cell (i, j) holds the joint frequency nij; row and column totals are marginal frequencies, and their sums equal n. Joint, marginal and conditional relative frequencies are nijn, nin and nijni.

Symbol Read it as Meaning
joint frequency joint frequency a count inside the table: both categories at once
marginal frequency marginal frequency a row or column total, in the margin of the table
3050 30 out of 50 a conditional (row) relative frequency: 30 of the 50 grade 7 students

Key facts

  • Joint frequencies are found inside the table cells; totals appear in the margins.
  • Every row must add to its row total and every column to its column total, which lets you fill in missing cells.
  • To look for an association, compare row (or column) percentages, not raw counts, because the groups can be different sizes.
  • If the percentages are about the same for every group, the two variables show no association.
  • A two-way table counts categories (grade, yes/no, color). For two numerical variables, use a scatter plot.

Relative frequencies

Relative frequencies
relative frequency = counttotal of the group you are asking about
joint
inside cell divided by the grand total: 30/110 of all students are grade 7 sport players
marginal
row or column total divided by the grand total: 50/110 of students are in grade 7
conditional
inside cell divided by its row or column total: 30/50 of grade 7 students play

The word of tells you the denominator. Percent of grade 7 students means divide by the grade 7 total; percent of all students means divide by the grand total.

Two-Way Table examples, step by step

Example 1: Fill in a missing cell

Warm-up

In a survey, 30 boys chose a favorite pet: 12 chose cats and the rest chose dogs. How many boys chose dogs, and where does that number go in a two-way table of gender and pet?

  1. The row for boys must add to its total: 12 + dogs = 30.
  2. Subtract: 30 − 12 = 18.
  3. 18 is a joint frequency, so it goes in the inside cell where the boys row meets the dogs column.

Answer: 18 boys chose dogs; it goes in the boys–dogs cell.

Example 2: A conditional relative frequency

Core

Of 60 sixth graders, 18 walk to school and 42 ride the bus. Of 60 seventh graders, 27 walk and 33 ride the bus. What percent of seventh graders walk?

  1. The question is about seventh graders, so the denominator is the seventh-grade total, 60.
  2. Fraction: 2760.
  3. Convert: 27 ÷ 60 = 0.45 = 45%.

Answer: 45% of seventh graders walk to school.

Example 3: Is there an association?

Test-style

In a class survey, 50 students sleep 8 or more hours and 35 of them passed a quiz. Of 40 students who sleep less, 20 passed. Is there evidence of an association between sleep and passing?

  1. Compare rates, not counts. Pass rate with 8+ hours: 3550 = 70%.
  2. Pass rate with less sleep: 2040 = 50%.
  3. 70% is much higher than 50%, so the two variables appear associated in this group.
  4. A survey like this shows association only; it does not prove that more sleep causes passing.

Answer: Yes: 70% of the 8+ hour group passed versus 50% of the others, so the data suggest an association.

Common mistakes

✗ MistakeHow many grade 8 students play a sport? Answer: 60 (the grade 8 total).
✓ Instead45, the inside cell where grade 8 meets sport.

Don’t use a row or column total when you need a joint frequency. Use the inside cell, which counts students in both categories.

✗ MistakePercent of grade 7 students who play: 30110 ≈ 27%.
✓ Instead3050 = 60%.

Of grade 7 students means the grade 7 row total is the denominator. 30/110 answers a different question: the share of all students who are grade 7 players.

✗ MistakeMore grade 8 students play (45 versus 30), so grade 8 students are more likely to play.
✓ InsteadCompare rates: 75% versus 60%. Here the conclusion holds, but only the percentages can show it.

The groups are different sizes (60 and 50). Raw counts can mislead whenever the totals differ.

Not to be confused with

Two-Way Tablevs.Frequency table

A frequency table counts one variable (for example, favorite color). A two-way table counts two variables at once, so each cell is a combination such as grade 7 and plays a sport.

Two-Way Tablevs.Scatter Plot

A scatter plot shows two numerical variables as points. A two-way table shows two categorical variables as counts.

Quick check: 3 questions

Question 1 of 3

In a table of 100 people, 14 are seniors who prefer movies. The seniors row total is 40, and the movies column total is 32. What is the joint frequency of seniors who prefer movies?

Show answer and explanation

Answer: A. The joint frequency is the inside cell where seniors meets movies: 14. Choices B and C are marginal totals, and D is the grand total.

Question 2 of 3

Using the same table, what percent of seniors prefer movies?

Show answer and explanation

Answer: B. Of seniors means divide by the seniors total: 1440 = 35%. Choice A divides by the grand total, C divides by the movies total (that is the percent of movie fans who are seniors), and D is the seniors share of everyone.

Question 3 of 3

Using the same table, what percent of all 100 people are seniors who prefer movies?

Show answer and explanation

Answer: C. Of all people means divide by the grand total: 14100 = 14%. This is a joint relative frequency. Choices A and B use a row or column total, and D is the share who prefer movies.

Two-Way Table: frequently asked questions

What is the difference between joint, marginal and conditional frequency?

A joint frequency is an inside cell: people in both categories, such as grade 7 and plays a sport. A marginal frequency is a row or column total, such as all grade 7 students. A conditional relative frequency divides a cell by its own row or column total, such as 30 of the 50 grade 7 students, or 60%.

How do you tell if there is an association in a two-way table?

Compute the percentages within each row (or each column) and compare them. If 60% of grade 7 and 75% of grade 8 play a sport, the rates differ, so grade and playing a sport appear associated. If the rates were about equal, there would be no evidence of association.

Why is a two-way table also called a contingency table?

Statistics books often say contingency table. The table shows how the counts for one variable depend on, or are contingent on, the category of the other variable. Two-way table, contingency table and two-way frequency table all name the same kind of display.

Practice and tools

Sources

  1. Common Core State Standards, Grade 8 Statistics and Probability (8.SP.A.4)
  2. Common Core State Standards, High School Interpreting Categorical and Quantitative Data (HSS-ID.B.5)
  3. OpenStax, Introductory Statistics 2e, 3.4 Contingency Tables

Updated November 2026·Reviewed by the Effortless Math team·Standards: CCSS 8.SP.A.4, CCSS HSS-ID.B.5

Cite this entry

Effortless Math Team. “Two-Way Table.” Effortless Math Dictionary. Updated November 2026. https://www.effortlessmath.com/math-dictionary/two-way-table/

Flashcard

TermTwo-Way Tablerows × columns of counts
DefinitionA table of counts for two categorical variables. The cell for grade 7 and plays sport holds students in both groups.
Study the full deck

Browse all terms in the Math Dictionary · More statistics terms · Random term