From Cell Contributions to Standardized Residuals
In “Cell Contributions to Chi-Square,” you used a cell’s contribution to see how much it adds to the overall chi-square statistic. A contribution is useful for ranking cells, but it has no sign: squaring makes it nonnegative. A standardized residual keeps the direction of the departure while scaling its size by the cell’s expected count.
For a cell, let \(O\) be its observed count and \(E\) its expected count under the null model of independence. The ordinary residual \(O-E\) says whether the observed count is above or below expectation. The standardized residual expresses that difference relative to the square root of the expected count.
The square root in the denominator scales the residual: the same difference \(O-E\) is larger relative to a smaller expected count than to a larger one. This makes standardized residuals more informative for comparing cells than raw residuals alone.
There is also a direct connection to the chi-square statistic. Squaring a cell’s standardized residual gives its contribution to \(X^2\):
So the cells with the largest absolute standardized residuals are exactly the cells with the largest chi-square contributions. The added value is that the residual’s sign shows the direction of each departure.
A Routine for Finding the Cells That Depart Most
Use the expected count for each cell under independence, as in “Building the Full Expected Counts Table.”
For every cell, substitute its observed count \(O\) and expected count \(E\) into \((O-E)/\sqrt{E}\).
The largest absolute standardized residuals identify the cells that depart most from their expected counts relative to the expected-count scale.
A positive residual means the observed count is above expectation; a negative residual means it is below expectation. Name both categories that define the cell.
The sign is important, but the size comparison uses the absolute value. For example, \(-2.4\) and \(+1.7\) indicate departures in opposite directions, and the first is farther from zero. Do not rank cells by signed values alone: a very negative number is not a small departure simply because it is less than zero.
A standardized residual is a descriptive diagnostic for the table, not a separate hypothesis test for one cell. A rough screening convention sometimes treats absolute values around 2 or larger as noteworthy, but that is not a guaranteed AP decision rule. Residuals from different cells are connected by the fixed margins of the table, and inspecting many cells creates opportunities to notice a large value by chance. Use the full chi-square test and its p-value for the inferential conclusion about independence. The next tutorial develops how to find that p-value.
Worked Example: Comparing Departures Across Groups
Worked Example: Comparing Departures Across Groups
Imagine an invented survey of 200 residents. Each person is classified by neighborhood and by whether they prefer receiving community notices by mail or by text. The question is whether neighborhood and preferred notice method are independent. The observed counts and the expected counts under independence are shown below.
| Neighborhood | Mail observed | Text observed | Total |
|---|---|---|---|
| East observed | 42 | 18 | 60 |
| Central observed | 38 | 42 | 80 |
| West observed | 20 | 40 | 60 |
| Total | 100 | 100 | 200 |
| East expected | 30 | 30 | 60 |
| Central expected | 40 | 40 | 80 |
| West expected | 30 | 30 | 60 |
For instance, the expected East/mail count is \((60)(100)/200=30\). The expected Central/mail count is \((80)(100)/200=40\). The other expected counts follow in the same way. Each expected count is at least 5, consistent with the expected-count condition discussed in “Checking the Expected Count Condition for Chi-Square.”
Now calculate the standardized residuals cell by cell:
The East/mail and East/text cells have the largest absolute standardized residuals, about 2.191. The positive East/mail residual means that the observed number of East residents preferring mail is above its expected count under independence. The negative East/text residual means that the observed number preferring text is below expectation. In Central, both residuals are close to zero, so those observed counts are close to their expected counts relative to the expected-count scale. The West cells show a smaller, opposite pattern: fewer West residents than expected prefer mail, and more than expected prefer text.
The squared residual for East/mail is approximately \(2.191^2=4.8\), which matches its contribution \((42-30)^2/30=144/30=4.8\). This illustrates why ranking absolute standardized residuals also ranks cell contributions. It does not, by itself, establish convincing evidence of an association in the population.
Worked Example: Why the Expected Count Matters
Worked Example: Why the Expected Count Matters
Suppose an invented survey classifies 240 library users by how they usually access the library’s schedule and whether they prefer a brief or detailed event listing. The observed counts are shown with expected counts calculated under independence.
| Access method | Brief listing | Detailed listing | Total |
|---|---|---|---|
| Mobile observed | 18 | 22 | 40 |
| Computer observed | 42 | 158 | 200 |
| Total | 60 | 180 | 240 |
| Mobile expected | 10 | 30 | 40 |
| Computer expected | 50 | 150 | 200 |
The two mobile cells each have a raw residual with absolute value 8: \(18-10=8\) and \(22-30=-8\). Their standardized residuals are different because their expected counts differ:
The Mobile/brief cell has the largest absolute standardized residual, about 2.530. Its observed count is above expectation. The Mobile/detailed cell has the same raw difference in size, but a smaller absolute standardized residual because its expected count is 30 rather than 10. The computer cells also have raw differences of 8, but their larger expected counts make those differences smaller relative to the expected-count scale.
Squaring these four residuals gives the four cell contributions, approximately \(6.4\), \(2.1333\), \(1.28\), and \(0.4267\). Their sum is \(10.24\), matching the chi-square statistic calculated from the cell contributions. Thus, standardized residuals retain the contribution ranking while also showing which cells are above or below expectation.
Worked Example: Reading a Multi-Category Pattern
Worked Example: Reading a Multi-Category Pattern
An invented survey asks 180 residents which topic they would most like to see in a neighborhood workshop: gardening, home repair, or cooking. Each resident is also classified by neighborhood. Consider independence as the null model. Each neighborhood has 60 respondents, and each topic has 60 respondents, so each expected count is \((60)(60)/180=20\).
| Neighborhood | Gardening | Home repair | Cooking | Total |
|---|---|---|---|---|
| North observed | 32 | 16 | 12 | 60 |
| Central observed | 16 | 24 | 20 | 60 |
| South observed | 12 | 20 | 28 | 60 |
| Total | 60 | 60 | 60 | 180 |
| Expected count in each cell | 20 | 20 | 20 |
Since every expected count is 20, each standardized residual is its residual divided by \(\sqrt{20}\):
North/gardening has the largest absolute standardized residual, about 2.683. There are more North residents choosing gardening than expected under independence. North has fewer than expected in both other topic categories, although the home-repair residual is relatively close to zero. South shows a different departure: fewer residents than expected choose gardening and more choose cooking. Central’s observed counts are comparatively close to expectation.
Because the table’s margins are fixed, changes among cells are linked: a larger count in one cell must be balanced by counts elsewhere in its row or column. Read the set of residuals as a pattern across the table, not as a collection of unrelated results. Here, the pattern suggests that the topic choices differ descriptively by neighborhood. The standardized residuals help locate that pattern; an inferential conclusion about population independence still requires the overall test.
Common Mistakes and AP Exam Tip
- Using \(O-E\) instead of the standardized residual: A raw residual shows the count difference, but it does not scale that difference by the expected count. Use \((O-E)/\sqrt{E}\) when asked for a standardized residual.
- Ignoring the sign: A positive residual is above expectation and a negative residual is below expectation. Include the sign when explaining direction.
- Ranking signed values rather than absolute values: Compare absolute values to find the greatest departures. A residual of \(-2.5\) is farther from zero than \(+1.2\).
- Claiming a cell is significant because its residual is large: A standardized residual helps identify cells that contribute strongly to the table statistic; it is not automatically a separate cell-level test or proof of association.
- Leaving out context: Name both categories in the cell and state whether its observed count is above or below the count expected under independence.
A full-credit response to an interpretation question identifies the cell or cells with the largest absolute standardized residuals, reports their direction, and describes the observed count relative to expectation in context. If the prompt asks whether the variables are associated in the population, use the overall chi-square test conclusion rather than a residual cutoff.
Check Your Understanding
For each cell, use the standardized residual formula and interpret the result in context.
- A cell has \(O=25\) and \(E=16\). Calculate its standardized residual and state whether the observed count is above or below expectation.
- Two cells have residuals \(+1.8\) and \(-2.3\). Which cell departs more from expectation? What does each sign mean?
- Two cells both have \(|O-E|=6\). One has \(E=9\), and the other has \(E=36\). Calculate both standardized residual magnitudes and compare them.
- A cell’s standardized residual is \(-1.5\). What is its chi-square contribution, and what does the negative sign tell you?
- Why should a large absolute standardized residual not be used by itself as the conclusion of a chi-square test of independence?