Not sure which lesson to do first? Find your level and get a plan →

Statistics · Grade 6-8

Two-Way Tables

Use Two-Way Tables when the same individuals are cross-classified by two categorical variables in a rows-and-columns grid, and you need to read joint counts, totals, or compare distributions across groups.


Quick Answer

Use Two-Way Tables when the same individuals are cross-classified by two categorical variables in a rows-and-columns grid, and you need to read joint counts, totals, or compare distributions across groups. Each cell counts the people who fit one row category and one column category, and the margins hold the row totals, the column totals and the grand total. To compare groups, divide each cell by the total of the group you are asking about, then compare those percentages instead of the raw counts.

Why This Matters

Once two category answers sit in one grid, you can see whether they are linked: do bus riders cluster at one school, do apartment families favor cats? Without the table, people compare raw counts from groups of different sizes and reach the wrong conclusion, or they mix up "percent of 7th graders who play sports" with "percent of sports players who are in 7th grade".

Intuitive Explanation

Picture a stack of survey cards, one per student. Each card has two answers: grade (7th or 8th) and after-school choice (sports or music). Sort the cards into four piles, one for each combination: 7th-sports, 7th-music, 8th-sports, 8th-music. Write the size of each pile in a grid, grades down the side and activities across the top, and you have a two-way table. Add across each row and down each column, and the margins tell you how many 7th graders there are, how many chose music, and how many cards there are in all.

The grid exists so you can compare. Suppose 30 of 50 seventh graders chose sports and 35 of 70 eighth graders did. The 8th-grade count is bigger, but the rate is not: 30/50=60% and 35/70=50%. To compare rows fairly, divide each cell by its own row total. The question decides the total: "what share of 7th graders chose sports" uses the 7th-grade row total, while "what share of sports players are in 7th grade" uses the sports column total, 30/65≈46%.

Rows and columns alone do not make a two-way table. A table listing each student's height and arm span also has rows and columns, but each row is one person and each cell is a measurement, not a count of people. Adding a height to an arm span gives a meaningless total. If the row labels and the column labels are both categories and the cells are counts, it is a two-way table; if each row is one individual with two numbers, it is paired data for a scatter plot.

Think of it like this. A two-way table works like a sorting tray with one compartment for every pair of answers: each card drops into exactly one slot, so the compartments add up to the whole stack. The tray shows how many cards landed where, but not why they landed there.

Core idea. Sort the same individuals by two category questions at once, count each combination, and compare the groups using percentages of each group's own total rather than raw counts.


When to Use

Reach for a two-way table when each person or item answers two category questions, such as grade and activity or home type and pet, and you want to know whether the answer to one changes with the other. Wording like both, "broken down by", or a grid with row and column totals points here. If only one category question is asked, a frequency table or bar graph is enough; if both variables are measured numbers, use a scatter plot.

Tip. Ask: Are the same individuals counted by two category questions at once, and does the question want counts or totals from that grid?

How to Recognize It

Before building a two-way table, look at what was recorded about each person and whether the answers are categories or measurements.

  1. Did each person answer two questions whose answers are categories, such as grade and favorite sport?

    Yes means one question runs down the rows and the other across the columns. If each person answered only one question, a Frequency Table holds the counts.

  2. Are both answers groups or labels rather than measurements like height in centimeters?

    Yes keeps you in a grid of counts. If both are numbers measured on each person, such as height and arm span, plot them as a Scatter Plot instead.

  3. Does the question ask how many, such as how many 8th graders walk to school?

    Yes is answered by reading one cell or one total. If it asks what percent of one group does something, divide by that group's total, which is Conditional Relative Frequency.

  4. Does each person fit in exactly one row and exactly one column?

    Yes means the cells add up to the grand total. If someone could pick two sports, they would be counted twice; ask a yes-or-no question for each sport, or use a Venn diagram.

Two-Way Tables vs Frequency Table vs Conditional Relative Frequency vs Scatter Plot

All four organize data about a group, and three of them look like grids. Ask how many questions each individual answered, and whether those answers are categories or numbers.

Two-Way Tables

Meaning
A two-way table counts how many individuals fall into each pairing of two categorical variables, with totals along the edges.
Key test
Two category questions per individual; every cell counts one combination.
Formula
grand total=sum of row totals=sum of column totals
Example
100 students by grade and instrument: 24 seventh graders play, 36 do not, 15 eighth graders play, 25 do not.

Frequency Table

Meaning
A frequency table lists the categories or values of one variable and how many times each one occurs.
Key test
Only one question per individual; a single column of counts.
Formula
∑f=n
Example
Favorite sport for 40 students: soccer 15, basketball 12, swimming 8, tennis 5.

Conditional Relative Frequency

Meaning
A conditional relative frequency divides a cell of a two-way table by the total of the row or column it belongs to.
Key test
Gives a percent of one group, not a count.
Formula
cellits row or column total
Example
Of the 60 seventh graders, 24 play an instrument, so the share is 24/60=40%.

Scatter Plot

Meaning
A scatter plot places each individual as one dot set by two numerical measurements, such as height and arm span.
Key test
Two numbers per individual, not two categories; nothing is counted into cells.
Example
Each student is a dot at (height, arm span), such as (152 cm, 150 cm).

Formula & Notation

Worked Examples

Example 1 — Complete the table and compare grades

Easy

A survey of 120 students records grade (7th or 8th) and after-school choice (sports or music). You know: 30 seventh graders chose sports, there are 50 seventh graders in all, 35 eighth graders chose music, and 65 students chose sports. Complete the table and decide which grade chooses sports at a higher rate.
Show the steps and the answer
  1. 7th grade, music: 50−30=20.

    A row's cells add up to the row total, and the 7th-grade row total is 50.

  2. 8th grade, sports: 65−30=35.

    The sports column total is 65, and 30 of those are 7th graders.

  3. 8th-grade total: 120−50=70, and music total: 20+35=55. Check: 35+35=70 and 65+55=120.

    Every margin must agree with the grand total; if one does not, a cell is wrong.

  4. Row percentages for sports: 7th grade 30/50=60%, 8th grade 35/70=50%.

    The grades have different sizes (50 and 70), so compare shares of each grade, not the counts 30 and 35.

Answer: Missing cells: 7th-music 20, 8th-sports 35, 8th total 70, music total 55. Seventh graders choose sports at a higher rate: 60% versus 50%.

Takeaway: Fill missing cells from the margins, then compare groups by dividing by each group's own total.

Example 2 — Rows and columns, but not a two-way table

Standard

A table lists five students with two columns, Height (cm) and Arm span (cm): (150, 148), (155, 156), (160, 161), (165, 163), (170, 172). Maya says, "It has rows and columns, so it is a two-way table. I'll add the margins." What kind of data is this, and what does it show?
Show the steps and the answer
  1. Look at what one row is: one student, with two measurements in centimetres.

    In a two-way table each cell is a count of people in a category pair; here each cell is a number belonging to one person.

  2. Test Maya's margin: the first row would total 150+148=298 cm.

    A height plus an arm span is not a meaningful quantity, which shows the grid is not a table of counts.

  3. Treat it as paired numerical data and look at the trend: as height goes 150, 155, 160, 165, 170, arm span goes 148, 156, 161, 163, 172.

    Two numbers per individual call for a scatter plot, where each student becomes one dot.

  4. To make a two-way table instead, sort into categories first, for example arm span longer than height: yes for 155, 160 and 170; no for 150 and 165.

    A two-way table needs category answers; numbers must be grouped before they can be counted into cells.

Answer: It is paired numerical data, not a two-way table. A scatter plot fits, and it shows arm span rising steadily with height.

Takeaway: Cells that are counts of people in category pairs make a two-way table; rows that are individuals with two numbers make paired data.

Example 3 — Find the mistake: row or column total

Application

A table of 150 kids: under 12, 18 have a phone and 42 do not; 12 and up, 72 have a phone and 18 do not. Lee writes: "18 of the 90 phone owners are under 12, so 20% of under-12 kids have a phone." Find the mistake and correct it.
Show the steps and the answer
  1. Find the totals: under-12 row 18+42=60; phone column 18+72=90.

    Both 60 and 90 contain the cell 18, so the question must decide which one goes underneath.

  2. Read the question: it asks about under-12 kids, so the denominator is the under-12 row total, 60.

    "Percent of under-12 kids" means the whole is all under-12 kids, not all phone owners.

  3. Compute: 18/60=0.30=30%.

    Lee's 18/90=20% answers a different question: the share of phone owners who are under 12.

  4. Compare with the other row: 72/90=80% of kids 12 and up have a phone.

    Row percentages put the two age groups on the same footing, so the gap (30% versus 80%) is fair to state.

Answer: 30% of under-12 kids have a phone (18 out of 60), compared with 80% of kids 12 and up. Lee's 20% is the share of phone owners who are under 12.

Takeaway: The same cell gives different percentages over its row total and its column total; the words after "percent of" name the right one.

Where You'll See It

  • Pizza preference by grade

    A table with rows '6th grade / 7th grade' and columns 'likes pizza / dislikes pizza' shows at a glance how many kids fall in each combination, so you can compare the two grades.

  • Phone ownership vs. age group

    A two-way table of 'has a phone / no phone' against 'under 12 / 12 and up' lets you compare the proportion of phone owners within each age group rather than just totals.

  • Bus riders by school

    Cross-tabulating 'rides the bus / walks' with 'School A / School B' reveals whether bus use differs between schools, using row percentages to make the two schools comparable.

Common Mistakes

  1. The slip: You can compare groups by reading the raw cell counts directly.

    Why it's tempting: The counts are right there, so comparing them feels straightforward.

    Instead: If the groups (rows or columns) have different totals, convert to percentages within the correct total before comparing; raw counts mislead when group sizes differ.

  2. The slip: Row percentage and column percentage give the same answer.

    Why it's tempting: Both come from the same cell, so they seem interchangeable.

    Instead: They answer different questions and use different denominators. 'What fraction of 7th graders like pizza' (row) is not the same as 'what fraction of pizza-likers are 7th graders' (column). Pick the denominator that matches the question.

  3. The slip: A strong pattern in a two-way table proves one variable causes the other.

    Why it's tempting: A clear association looks like evidence of cause.

    Instead: A two-way table only shows association. Causation needs a controlled study; a lurking variable could produce the pattern.


Mini Practice

Try these on your own. Tap Reveal when you want to check.

  1. A two-way table of 50 students shows: 7th grade, 12 hot lunch and 13 cold lunch; 8th grade, 15 hot lunch and 10 cold lunch. Find all the row and column totals.

    Hint: Add across each row and down each column. Both sets of totals should reach the same grand total.

  2. Of 60 people, 35 like hiking. 20 of the hikers also like camping, and 10 of the non-hikers like camping. How many people like neither hiking nor camping?

    Hint: First find how many people do not like hiking.

  3. In a survey, 40 of 100 boys and 60 of 150 girls said they prefer cats to dogs. Which group has the higher percent preferring cats?

    Hint: Divide each count by its own group total before comparing.

  4. A table shows 6th graders: 18 play an instrument, 42 do not; 7th graders: 27 play, 33 do not. What percent of instrument players are 7th graders? What percent of 7th graders play an instrument?

    Hint: The two questions use different totals: one column total and one row total.

  5. For 30 students you record hours of sleep and test score. Should you organise the data in a two-way table or a scatter plot?

    Hint: Are the two variables categories or measured numbers?

  6. A two-way table shows that 70% of students who eat breakfast passed a test, compared with 45% of students who skip it. Dev writes, "Eating breakfast causes students to pass." Correct his claim.

    Hint: What other differences might there be between the two groups?

Want the full set?

50 practice questions for this concept — free to try, every one with a complete worked solution showing the why, not just the answer.

Frequently Asked Questions

Does it matter which variable goes in the rows and which goes in the columns?

Not for the counts: flip the table and every number stays the same, just in a new place. It matters when you write percents. If you want to compare 7th and 8th graders, put grade in the rows and divide each row by its own row total, so each row adds to 100%. Many people put the groups they are comparing down the side, but any layout works if you divide by the right total.

How is a two-way table different from a Venn diagram?

For two yes-or-no questions they hold the same information. Ask 50 students whether they play soccer and whether they play music: the four cells of the table (both, soccer only, music only, neither) match the four regions of a Venn diagram, counting the region outside both circles. The table goes further, because it handles questions with three or more answers, like grade 6, 7 or 8 against four favorite subjects, which a Venn diagram cannot show neatly.

How can I tell from a two-way table whether the two variables are linked?

Compare the percents across the groups. If 40% of 7th graders and 40% of 8th graders play an instrument, grade makes no difference, and the variables are not linked. If it were 40% against 65%, playing is more common in one grade, so the variables are associated. The table cannot tell you why: maybe 8th graders simply had another year to join the band.

What is a segmented bar graph, and how does it come from a two-way table?

It is a picture of the row percents. Draw one bar for each row, all the same height to stand for 100%, and split each bar into pieces sized by that row's percents. For 7th graders, 40% play an instrument and 60% do not, so their bar is split 40 to 60. Bars that are split differently show at a glance that the groups differ, even when the groups have different sizes.

Learning Path

Two-Way Tables

You are here

You need Categorical Data (answers that fall into groups) and Data Representation (reading tables and charts) first. Two-way tables add a second variable, so you can compare how one category is spread across the groups of another. Next, Conditional Probability reads the same grid as chances, such as P(sports∣7th grade).

See Also