Allday Education

Two-Way Frequency Tables

A two-way frequency table sorts a group by two categories at once — say grade level down the side and favorite pet across the top. Each inside cell is a count, and the edges hold the totals.

These tables are how real data gets summarized, and they are the setup for finding probabilities. Once you can read a cell and a margin total, the probability questions follow quickly.

Cells, margins, and the grand total

The inner cells are joint counts — how many are in one row category and one column category at the same time. The right and bottom edges are the margins: the total for each row and each column.

The corner cell is the grand total, the size of the whole group. Every probability you compute is some count divided by an appropriate total. The table below shows the layout: inner cells, margin totals on the right and bottom, and the grand total in the corner.

Favorite Pet by Grade
DogCatTotal
Grade 91212882020
Grade 106614142020
Total181822224040

Turning counts into probabilities

A joint probability uses a cell over the grand total: P(Grade 9 and cat) is that cell divided by everyone. A conditional probability uses a cell over a margin: P(cat given Grade 9) is the cat cell divided by the Grade 9 row total.

The word 'given' tells you which total to divide by. 'Given Grade 9' means your world shrinks to the Grade 9 row, so you divide by that row's total.

Worked examples

Example 1: reading a cell

A two-way table lists favorite pets by grade. How many Grade 9 students prefer cats?

Find the Grade 9 rowgo across that row\text{go across that row}
Find the cat columnread where they cross\text{read where they cross}
That cell is the count88

Answer: 88 students

Example 2: a conditional probability

Of 20 Grade 9 students, 8 prefer cats. Find P(cat given Grade 9).

Given Grade 9 means divide by the row totalcats in Grade 9Grade 9 total\dfrac{\text{cats in Grade 9}}{\text{Grade 9 total}}
Substitute820\dfrac{8}{20}
Simplify0.40.4

Answer: 0.40.4

Example 3: a joint probability

Of the 40 students in the table, 6 are Grade 10 students who prefer dogs. Find P(Grade 10 and dog).

No 'given' here, so divide by the grand totalGrade 10 and doggrand total\dfrac{\text{Grade 10 and dog}}{\text{grand total}}
Substitute640\dfrac{6}{40}
Simplify0.150.15

Answer: 0.150.15

Try one yourself

Favorite Pet by Grade
DogCatTotal
Grade 91212882020
Grade 106614142020
Total181822224040

Common questions

What is a marginal total?

The total at the edge of the table for a whole row or column — for example, all Grade 9 students regardless of pet. It is the sum of that row's or column's cells.

How do I know whether to divide by the grand total or a margin?

Look for the word 'given.' No 'given' means a joint probability over the grand total; 'given X' shrinks the world to X's row or column, so you divide by that margin.

Do the inner cells have to add up to the grand total?

Yes. Every person is counted in exactly one cell, so all the inner cells sum to the grand total in the corner. It is a good way to check the table.

Want the video version?

Allday Everyday Math has video lessons, practice, and an AI tutor for every topic, Pre-Algebra through Algebra 2.

Try it for $1