How do you compute expected counts in a two-way table under the assumption of no association?
Topic 8.4 Expected Counts in Two-Way Tables: compute the expected count for each cell of a two-way table under the null hypothesis using the row total times column total divided by the grand total.
A focused answer to AP Statistics Topic 8.4, on computing expected counts in a two-way table under the null of no association, using row total times column total over the grand total, and why this formula encodes independence.
Reviewed by: AI editorial process; not yet individually human-reviewed
Have a quick question? Jump to the Q&A page
Jump to a section
What this topic is asking
The College Board (Topic 8.4) wants you to compute expected counts in a two-way table under the null of no association: for each cell,
This is the bridge from a one-variable goodness-of-fit test to the two-variable tests of homogeneity and independence.
The expected-count formula
This single formula generates the expected count for each cell. Multiply the cell's row total by its column total, divide by the grand total. Because the formula reuses the observed marginal totals, the expected table has identical margins to the observed table, a reliable check: if your expected row and column sums do not match the observed margins, you have made an arithmetic error.
Why the formula encodes "no association"
The derivation shows the formula is not arbitrary: it is exactly what "the two variables are independent" predicts. If opinion and age were unrelated, the proportion favoring would be the same in every age group (equal to the overall row proportion), so each cell's expected count is the grand total scaled by the two marginal proportions. The expected table is therefore the "no-association" template against which the observed table is compared. The same formula serves both homogeneity (same distribution across groups) and independence (no association on one sample), because both nulls produce identical expected counts.
Expected counts and the conditions
The expected counts you compute here are exactly what the large-counts condition for a two-way chi-square test checks: every expected count must be at least . They are also the denominators in the chi-square statistic of Topic 8.6. So Topic 8.4 is the shared computational core of the homogeneity and independence tests. Computing all expected counts carefully, and verifying each is at least , is a graded step before any chi-square value is found. If some expected count falls below , the chi-square approximation is unreliable and the analysis may need categories combined.
Try this
Q1. A cell has row total , column total , grand total . Find the expected count. [1 point]
- Cue. .
Q2. What null hypothesis are these expected counts computed under? [1 point]
- Cue. No association (independence/homogeneity): the distribution of one variable is the same across categories of the other.
Exam-style practice questions
Practice questions written in the style of College Board exam questions on this dot point, with worked answer explainers. The year tag is the paper they imitate, not the source.
AP 2018 (style)1 marksSection I (multiple choice). In a two-way table, a cell's row total is , its column total is , and the grand total is . The expected count for that cell is (A) (B) (C) (D) Show worked answer →
The correct answer is (B).
The expected count is .
(A) adds the totals. (C) and (D) misapply the formula. The expected count is .
AP 2021 (style)3 marksSection II (free response). A survey of people cross-classifies opinion (favor, oppose) by age group (young, old). The row totals are favor , oppose ; the column totals are young , old . (a) Compute the expected count for the (favor, young) cell. (b) Explain what assumption this expected count is computed under. (c) Explain in words why the formula uses the row and column totals.Show worked answer →
A 3-point expected-counts question.
(a) (1 point) .
(b) (1 point) It is computed under the null hypothesis of no association (independence) between opinion and age: the proportion favoring is assumed the same across age groups.
(c) (1 point) Under independence, the expected proportion in a cell is (row proportion) times (column proportion); multiplying by the grand total and simplifying gives row total times column total over grand total. The marginal totals carry the overall proportions the null spreads evenly across the table.
Markers reward the correct expected count, naming the independence/no-association assumption, and explaining the role of the marginal totals.
Related dot points
- Topic 8.5 Setting Up a Chi-Square Test for Homogeneity or Independence: distinguish a test of homogeneity from a test of independence based on the design, state the appropriate hypotheses, and check the conditions.
A focused answer to AP Statistics Topic 8.5, on distinguishing a chi-square test of homogeneity (several groups, same variable) from a test of independence (one sample, two variables), stating the right hypotheses, and checking the conditions.
- Topic 8.6 Carrying Out a Chi-Square Test for Homogeneity or Independence: compute the chi-square statistic from a two-way table, find the P-value using (rows minus 1)(columns minus 1) degrees of freedom, and state a conclusion in context.
A focused answer to AP Statistics Topic 8.6, on computing the chi-square statistic from a two-way table, finding the P-value with (r minus 1)(c minus 1) degrees of freedom, and stating a conclusion in context, with a full worked test.
- Topic 8.2 Setting Up a Chi-Square Goodness of Fit Test: state the hypotheses for a goodness-of-fit test, compute expected counts from a claimed distribution, and verify the conditions.
A focused answer to AP Statistics Topic 8.2, on stating the hypotheses for a goodness-of-fit test, computing expected counts from a claimed distribution, and checking the random, large-counts (expected at least 5), and 10% conditions.
- Topic 2.2 Representing Two Categorical Variables: construct and interpret two-way (contingency) tables and segmented or side-by-side bar graphs for two categorical variables.
A focused answer to AP Statistics Topic 2.2, on building and reading two-way tables and segmented or side-by-side bar graphs for two categorical variables, with marginal totals and a worked table.
- Topic 2.3 Statistics for Two Categorical Variables: calculate joint, marginal, and conditional relative frequencies from a two-way table, and use conditional distributions to judge association.
A focused answer to AP Statistics Topic 2.3, on joint, marginal, and conditional relative frequencies from two-way tables, and using conditional distributions to assess association, with full worked proportion calculations.
Sources & how we know this
- AP Statistics Course and Exam Description — College Board (2020)