Lesson 10 of 18Compare a joint table with independence
Calculate expected counts and nonnegative discrepancy contributions.
Try
A survey records each person’s region and preferred transport category. The question is whether preference and region are associated in the target population. Both variables are categorical. Before fitting a line to category codes, build a two-way count table: the numeric codes do not create meaningful distances between categories.
Predict
Predict the count in a cell if the row and column variables were independent. Its expected share should combine the row share and column share. Also predict why squared discrepancies are used: positive and negative departures should not cancel across the table.
Experiment
Consider this original synthetic table from independent observations.
| Region | Choice A | Choice B | Total |
|---|
| North | 36 | 24 | 60 |
| South | 24 | 36 | 60 |
| Total | 60 | 60 | 120 |
Under fitted independence, every expected count is 60·60/120=30. Each contribution (O−E)²/E is 36/30=1.2, so χ²=4.8. With df=1, a supplied upper-tail reference gives p≈0.0285. At α=0.05 reject independence under the sampling assumptions. Compare conditional Choice A proportions 0.6 and 0.4 to describe the association’s direction and size.
Understand
For a table with r rows and c columns, the independence expected count is Eij=(row total i)(column total j)/(grand total). The statistic χ²=Σ(Oij−Eij)²/Eij sums over all cells. Each term is nonnegative; large values indicate greater departure from the fitted null. The reference uses the upper tail, not a doubled symmetric tail.
With the usual fixed table structure and positive expected counts, degrees of freedom are (r−1)(c−1). Estimating row and column probabilities constrains the table, so counting every cell as an independent degree of freedom would be wrong. A zero-total row or column needs separate handling; dividing by zero in an expected count is not a valid calculation.
The common introductory approximation condition requires every expected count to be at least 5. This is a practical rule for the chi-square reference, not a universal guarantee. Sparse tables may need exact or carefully justified simulation methods. Counts should represent independent observational units in mutually exclusive categories; repeated responses from the same people violate that simple model.
A random sample from a defined population supports a population association claim. The test alone does not identify causal direction or remove confounding. A significant omnibus result says some aspect of the joint distribution differs from independence; it does not identify every cell as unusual or every group pair as different. Inspect conditional proportions and appropriately controlled follow-up analyses.
Chi-square contributions reveal which cells contribute to the discrepancy but are not independent tests by themselves. Selecting only favorable cells or merging categories after inspecting significance changes the analysis. Category definitions should be scientifically meaningful and recorded in advance where possible. Report the full table, expected counts, test conditions and contextual conclusion.
Apply
Reconstruct the expected table from the marginals without reading the completed arithmetic. Then explain why changing North’s sample size would change its expected counts even if the null preference probabilities were unchanged. In the sparse-table practice, propose a principled next step rather than treating a computable statistic as sufficient evidence.
Describe the reference family before choosing its tail
A chi-square reference distribution is continuous on nonnegative values and is right-skewed, unlike a symmetric normal or t reference. Its shape depends on degrees of freedom. Small degrees of freedom give more pronounced right skew; increasing degrees of freedom makes the standardized shape less skewed. The mean is df and the variance is 2df, so a higher-df reference also changes location and spread: it is not merely the same curve with its skew removed. These descriptive facts concern the reference family, not the observed counts in a contingency table.
Changed-case check. Compare two valid tables, one 2×2 and one 4×5, with positive expected counts and the same reported statistic 8. State each df, describe their reference shapes, and explain why the two p-values need not be equal. Must either p-value be doubled because the table has two possible directions of association?
Feedback
The degrees of freedom are 1 and 12. Both references have nonnegative support and right tails; df=1 is much more skewed, while df=12 is less skewed and has a different center and spread. The p-values are upper-tail areas P(χ²₁≥8) and P(χ²₁₂≥8), not the same lookup. The squared discrepancies already accumulate departures in either direction, so neither tail is doubled. A good answer distinguishes the reference distribution from a plot of raw counts and states that the table design and expected-count conditions must still be checked.
This descriptive action addresses current AP Statistics identifier 3.14.A, including its reference-family clause (Fall 2026 CED), checked 30 October 2026: official framework.
Continue
Next use the same table machinery for a different collection design: comparing response distributions across separately sampled populations.