When the Overall Pattern Reverses
An overall comparison can tell a different story from comparisons made separately within relevant groups. For example, an outcome may be higher at one predictor level in each group, yet lower at that predictor level after all groups are pooled. This is not an arithmetic contradiction. The pooled comparison combines observations using the group proportions present at each predictor level, and those proportions may differ sharply.
This pattern is called Simpson’s paradox. It is important in regression analysis because an overall association and an association adjusted for a group variable need not have the same direction. The reversal is a feature of how the data are distributed across groups; by itself, it does not show that one comparison is correct or that either comparison describes a causal effect.
To make the comparison precise, let \(X\) be a binary predictor with values 0 and 1, let \(Y\) be a quantitative outcome, and let \(G\) identify a group. For a group \(g\), the within-group difference is \(\bar{y}_{1g}-\bar{y}_{0g}\), where \(\bar{y}_{1g}\) and \(\bar{y}_{0g}\) are the sample mean outcomes at \(X=1\) and \(X=0\) in that group. The pooled difference is \(\bar{y}_{1}-\bar{y}_{0}\), calculated without separating the groups.
When \(X\) is coded 0 and 1, the slope from a least-squares regression of \(Y\) on \(X\), with an intercept, equals the difference in the two sample means: \(\hat{\beta}_1=\bar{y}_{1}-\bar{y}_{0}\). The fitted value at \(X=0\) is the mean for observations with \(X=0\), and the fitted value at \(X=1\) is the mean for observations with \(X=1\); their difference is the slope. Thus, in this setting, comparing pooled means is also comparing the direction of the unadjusted regression slope.
A Worked Reversal in Pooled Means
Worked Example: A Score Comparison by Preparation Group
Hypothetical data. A class records a 0-to-40 practice score for students using either the usual study plan (\(X=0\)) or an optional study plan (\(X=1\)). Students are also classified by prior preparation. The table gives the number of students and their mean scores in each group.
| Prior preparation | Study plan | Number of students | Mean score (points) |
|---|---|---|---|
| Lower | Usual (\(X=0\)) | 10 | 10 |
| Lower | Optional (\(X=1\)) | 90 | 12 |
| Higher | Usual (\(X=0\)) | 90 | 30 |
| Higher | Optional (\(X=1\)) | 10 | 32 |
Compare within the lower-preparation group. The optional-plan mean is 12 points and the usual-plan mean is 10 points, so the difference is \(12-10=2\) points.
Compare within the higher-preparation group. The corresponding difference is \(32-30=2\) points. The optional-plan mean is higher by 2 points in both groups.
Pool the groups at \(X=0\). There are 10 lower-preparation students with a mean of 10 and 90 higher-preparation students with a mean of 30. The pooled mean is the weighted mean:
Pool the groups at \(X=1\). There are 90 lower-preparation students with a mean of 12 and 10 higher-preparation students with a mean of 32:
The pooled difference is \(14-28=-14\) points. Therefore, the pooled data show a lower mean score for the optional plan, even though the optional-plan mean is 2 points higher within each preparation group. There is no contradiction: most usual-plan students are in the higher-preparation group, while most optional-plan students are in the lower-preparation group.
Why the Group Proportions Matter
A pooled mean is a weighted average of the group means. The weights are the proportions of observations from each group at that predictor level. If those weights differ between \(X=0\) and \(X=1\), the two pooled means mix group outcomes differently. As a result, the pooled difference includes both changes within groups and changes in group composition.
The following identity makes that statement exact. Write \(w_{xg}\) for the proportion of observations at predictor level \(x\) that belong to group \(g\). The weights at each level add to 1, and the pooled mean at that level is \(\bar{y}_x=\sum_g w_{xg}\bar{y}_{xg}\). Provided each group is observed at both predictor levels, add and subtract \(\sum_g w_{1g}\bar{y}_{0g}\) from the pooled difference:
The first sum is a weighted average of the within-group differences, using the group proportions at \(X=1\) as weights. The second sum is a composition term: it reflects how the group proportions change between \(X=0\) and \(X=1\), combined with the groups’ mean outcomes at \(X=0\). Either term can influence the pooled result. Even if every within-group difference is positive, a sufficiently negative composition term can make the pooled difference negative.
In the score example, the lower- and higher-preparation proportions are \(0.10\) and \(0.90\) at \(X=0\), but \(0.90\) and \(0.10\) at \(X=1\). The weighted within-group component is:
The composition component, using the \(X=0\) means, is:
Adding the two components gives \(2+(-16)=-14\) points, exactly the pooled difference. The positive within-group pattern is more than offset by the fact that the \(X=1\) observations are concentrated in the group with lower scores.
Worked Example: Reversal in Success Rates
Worked Example: A Hypothetical Program and Baseline Risk
Hypothetical data. Suppose a program is associated with successful completion at a higher rate within both baseline-risk groups. Among lower-risk participants, 72 of 90 without the program complete successfully, while 9 of 10 with the program do. Among higher-risk participants, 1 of 10 without the program completes successfully, while 18 of 90 with the program do.
Lower-risk group. The rates are \(72/90=0.80\), or 80%, without the program and \(9/10=0.90\), or 90%, with it. The within-group difference is \(90\%-80\%=10\) percentage points.
Higher-risk group. The rates are \(1/10=0.10\), or 10%, without the program and \(18/90=0.20\), or 20%, with it. The within-group difference is also \(20\%-10\%=10\) percentage points.
Pool the participants without the program. There are \(72+1=73\) successful completions among \(90+10=100\) participants, so the pooled rate is \(73/100=73\%\).
Pool the participants with the program. There are \(9+18=27\) successful completions among \(10+90=100\) participants, so the pooled rate is \(27/100=27\%\). The pooled difference is \(27\%-73\%=-46\) percentage points, opposite in direction to both within-group differences.
The pooled groups have different baseline-risk compositions: 90% of the participants without the program are lower-risk, while 90% of those with it are higher-risk. That difference in composition accounts for why the pooled rate cannot be read as a summary of the within-group comparisons. These hypothetical observational rates alone do not establish that the program causes a change in completion.
A Reversal Is Possible, Not Inevitable
Different group proportions can produce a reversal, but they do not guarantee one. To see the distinction, retain the two preparation groups and the four mean scores from the first example, but suppose each group contributes 50 students at each study-plan level. The group means remain 10 and 12 points for the lower-preparation group and 30 and 32 points for the higher-preparation group.
Worked Example: Balanced Group Proportions
Hypothetical data. At each study-plan level there are 50 lower-preparation and 50 higher-preparation students. The within-group differences remain \(12-10=2\) points for lower preparation and \(32-30=2\) points for higher preparation.
At \(X=0\), the pooled mean is:
At \(X=1\), it is:
The pooled difference is \(22-20=2\) points, in the same direction as both within-group differences. Here, the group proportions are identical at the two predictor levels, so there is no change in group composition to counteract the within-group pattern.
How to Read a Pooled Association Carefully
A reversal is a signal to inspect how the data are distributed, not a reason to discard one summary automatically. The pooled association describes the observed combined groups. The within-group associations describe comparisons among observations sharing the specified group category. These answer different descriptive questions because they use different comparisons and, in general, different weights.
In regression analysis, including a group variable as a predictor can express comparisons that hold group membership fixed, whereas a regression using only \(X\) describes the pooled relationship. The precise adjusted comparison depends on the model and data; the arithmetic examples here do not establish that every possible adjustment will produce a particular single summary. In particular, a group-specific pattern should not be assumed to be constant in size merely because its direction agrees across groups.
A group variable may be important for understanding the observed association, but a reversal alone does not establish why the predictor and group are related, whether the group is an appropriate adjustment variable, or whether any association is causal. Those conclusions require information and assumptions beyond the pooled and grouped means or rates. Describe what the data show and identify the group composition that contributes to the discrepancy.
Common Mistake
- Wrong reasoning: “The pooled mean is lower at \(X=1\), so the outcome must also be lower at \(X=1\) within the groups.” This treats a pooled average as though it used the same group proportions as each within-group comparison.
- Correction: Calculate the group-specific means or rates and compare the group proportions at each predictor level. The overall comparison can reverse when it combines groups in different proportions.
- Another overreach: “Because the direction changes after grouping, the group variable must be the cause of the reversal.” A composition difference can explain the arithmetic pattern, but a descriptive reversal by itself does not establish a causal explanation.
Check Your Understanding
Use the definitions and calculations in this tutorial to answer the following questions.
- In your own words, define Simpson’s paradox and explain why it is not an arithmetic contradiction.
- In the score example, which preparation group is more common at \(X=1\), and how does that help explain the pooled difference?
- For two groups, suppose the within-group differences are both positive. What must be true of the composition term in the displayed decomposition for the pooled difference to be negative?
- Why does equal representation of both preparation groups at each predictor level prevent a composition-based reversal in the balanced example?
- Does a reversal between pooled and within-group success rates establish that a program causes a change in success? Explain briefly.