← Back to course

Expected Counts in Two-Way Tables

You’ll be able to

Two-way tables

A two-way table cross-classifies individuals by two categorical variables (rows and columns). Chi-square tests for two-way tables ask whether the row and column variables are related. Everything rests on comparing the observed counts in the cells to the expected counts we would see if the null hypothesis (no relationship) were true.

The expected-count formula

Under H₀ (no association), the expected count in a cell is (row total × column total) / grand total. The logic: if the variables are unrelated, each row should split across the columns in the same overall proportions, so we apply the column’s overall fraction to that row’s total. Expected counts are usually not whole numbers, and that is fine.

Expected count in a two-way table
expected = (row total × column total) / grand total
Computed for every cell under the assumption of no association. The Large Counts condition requires every expected count ≥ 5.
Worked example

In a two-way table, a cell’s row total is 80, its column total is 50, and the grand total is 200. Find the expected count for that cell.

  1. 1.Apply the formula: expected = (row total × column total) / grand total.
  2. 2.Substitute: expected = (80 × 50) / 200.
  3. 3.Compute: 4000 / 200 = 20.
Answer: The expected count is (80 × 50)/200 = 20. This is what we would expect in that cell if the two categorical variables were unrelated.
Checkpoint

A two-way table cell has row total 60, column total 90, and grand total 300. What is the expected count for that cell?

On the exam

Expected counts are almost always decimals (like 18.4) — do not round them to whole numbers before computing χ². And check Large Counts on the expected counts, not the observed ones: every expected count must be at least 5.

Checkpoint

Why must every expected count be at least 5 before using the chi-square distribution?

Answer the 2 checkpoints as you read.

Sign in to save your progress