28 Simpson’s Paradox
By the end of this chapter you will be able to:
- Define Simpson’s paradox: an aggregate relationship that reverses within subgroups.
- Explain why it happens — a lurking variable unevenly distributed across groups.
- Recognize the warning signs in real data, and check by disaggregating.
- Decide which level of analysis (aggregate or subgroup) answers the actual research question.
Simpson’s paradox is a phenomenon in which a relationship that holds in aggregate data reverses direction when the data are broken into subgroups. It is one of the most counterintuitive results in statistics, and it turns up in real-world data — graduate admissions, medical treatment effects, baseball batting averages.
A textbook on statistical reasoning needs at least one chapter on Simpson’s paradox because it is exactly the kind of result that p-values, effect sizes, and assumption checks all fail to flag. The data look clean. The analysis is correct. The conclusion can still be wrong if you’ve aggregated where you shouldn’t have.
28.1 The classical example: UC Berkeley admissions, 1973
In 1973, across the six largest departments of UC Berkeley’s graduate school, 44.5% of male applicants and 30.4% of female applicants were admitted. The university was accused of gender discrimination.
When researchers broke the data down by department, however, they found:
- In most individual departments, women were admitted at higher rates than men.
- The overall difference came from the fact that women applied disproportionately to highly competitive departments (with low admission rates for both sexes), while men applied to less competitive departments (high admission rates).
In aggregate: women were admitted less often. By department: women were admitted more often or roughly equally. The aggregation flipped the conclusion.
This is Simpson’s paradox.
Open Simpson’s Paradox Slider. Keep the two within-group relationships fixed, then change how unevenly the groups occupy the predictor range. The pooled regression line crosses zero and reverses while both subgroup slopes remain positive — making the aggregation mechanism visible rather than just showing a before/after result.
28.2 Why this happens
Simpson’s paradox occurs when:
- The relationship between X and Y depends on a third variable Z (called the confounder or lurking variable), and
- X and Z are themselves related.
In the Berkeley case: X = applicant gender, Y = admission outcome, Z = department. Within each department, X and Y were related one way (slight female advantage). But gender was correlated with department choice — women picked harder departments — so the aggregated X-Y relationship looked opposite.
A relationship in aggregated data is not always the relationship in the underlying subgroups. Aggregation can hide, weaken, strengthen, or reverse a real pattern. This is one of the deepest issues in observational research and you should always ask: am I aggregating across a relevant lurking variable?
28.3 A simple numerical example
Suppose Treatment A and Treatment B are being compared, in two patient populations (small kidney stones vs. large kidney stones).
| Treatment A | Treatment B | |
|---|---|---|
| Small stones | 81 of 87 = 93% | 234 of 270 = 87% |
| Large stones | 192 of 263 = 73% | 55 of 80 = 69% |
| Combined | 273 of 350 = 78% | 289 of 350 = 83% |
Within both subgroups, Treatment A has the higher success rate (93% vs. 87% in small, 73% vs. 69% in large). But Treatment B has the higher overall success rate (83% vs. 78%).
Why? Treatment A was given mostly to harder cases (large stones), and Treatment B was given mostly to easier cases (small stones). The aggregation hides this; the disaggregation reveals it. Within any subgroup, A wins. Across groups, the aggregation makes B look better.

In R, using the UCBAdmissions built-in dataset:
data(UCBAdmissions)
# Aggregate over departments
margin.table(UCBAdmissions, c(1, 2))
# Break down by department
ftable(UCBAdmissions)28.4 How to recognize Simpson’s paradox
You won’t always recognize it from the test statistics. A t-test on aggregated data doesn’t know you have a relevant subgroup variable; it just gives you a p-value. Several signs that you should check for Simpson’s-paradox patterns:
- Your subgroups differ in size, and the larger subgroups have unusual patterns. Berkeley’s six departments differed enormously in size and selectivity — overall admission rates ran from about 6% (Department F) to 64% (Department A) — and men and women applied to them in very different proportions.
- The aggregated relationship is implausible given subject-matter knowledge. Suspect aggregation issues whenever the aggregated result is surprising or controversial.
- A subgroup variable might confound the relationship of interest. Always ask: is there a Z such that both X and Y depend on it?
- The total varies across groups. Berkeley: men and women applied in different proportions across departments. Aggregating ignored that.
28.5 The visualization
A good visualization makes the paradox obvious. Plot the X-Y relationship within each subgroup with separate trend lines:
library(ggplot2)
ggplot(data, aes(x = X, y = Y, color = subgroup)) +
geom_point() +
geom_smooth(method = "lm", se = FALSE) +
geom_smooth(method = "lm", se = FALSE,
aes(color = NULL), color = "black",
linewidth = 1.5)The black line shows the aggregate trend. The colored lines show within-subgroup trends. When Simpson’s paradox is in play, the black line points one direction and most of the colored lines point the other.
28.6 The remedy: don’t aggregate inappropriately
When a subgroup variable is potentially relevant:
- Run the analysis separately within each subgroup, then compare. If the within-subgroup results point the same way as the aggregated result, the aggregate is fine. If they point the other way, the aggregation is misleading.
- Use the subgroup variable as a covariate or moderator in a regression. As a covariate,
lm(Y ~ X + subgroup, data = data)holds the subgroup constant. As a moderator,lm(Y ~ X * subgroup, data = data)also lets the slope of X on Y differ across subgroup levels. - Decide whether the aggregated result or the subgroup-specific results are the right answer for your question. Both can be valid; they just answer different questions.
The Berkeley admissions case is worth a brief moral: the aggregated statistic (44.5% vs. 30.4%) was correct in the sense that it described the totals. But it was misleading about what was driving the difference. Once you knew about department choices, the question “is the university discriminating?” had a more nuanced answer.
28.7 When to expect Simpson’s paradox
In general, Simpson’s paradox is most likely when:
- The subgroup variable is a strong predictor of both X and Y.
- The subgroups differ markedly in size.
- The base rates differ across subgroups.
In experimental research (where you control assignment to X), Simpson’s paradox is rare. In observational research, it can happen and you should look for it.
28.9 A concise worked example: UC Berkeley
data(UCBAdmissions)
# Aggregated rates
total <- margin.table(UCBAdmissions, c(1, 2))
prop.table(total, 2)
# Shows male and female admission rates aggregated across departments
# By-department rates
prop.table(UCBAdmissions, c(2, 3))["Admitted", , ]
# Shows admission rate for each (gender, department) combination
# Visualize
library(ggplot2)
ucb_df <- as.data.frame(UCBAdmissions)
ggplot(ucb_df,
aes(x = Dept, y = Freq, fill = Admit)) +
geom_col(position = "fill") +
facet_wrap(~ Gender) +
labs(y = "Proportion", x = "Department")The plot makes it clear: in most departments, women’s admission rates were comparable to or higher than men’s. The plot shows rates only; to see where applications went, look at the counts with margin.table(UCBAdmissions, c(2, 3)). Over half of women’s applications went to Departments C and E, which admitted about 35% and 25% of applicants; over half of men’s went to A and B, which each admitted over 60%. The aggregate result came from where applications were distributed, not from per-department discrimination.
28.10 Common mistakes
| Wrong | Right |
|---|---|
| Trusting aggregated statistics when subgroups differ | Run within-subgroup analyses to confirm |
| Assuming Simpson’s paradox can’t be in your data | It is easy to miss in observational data — check subgroups whenever a lurking variable is plausible |
| Inferring causation from aggregated relationships | Always ask about confounders |
| Forgetting to plot within-subgroup trends | A faceted scatterplot is the standard reveal |
Simpson’s paradox is a reminder that data does not interpret itself. The numbers can be entirely correct and still tell you the wrong story if you’ve aggregated across a relevant lurking variable. Whenever you analyze aggregated data:
- Identify possible confounders.
- Run analyses within subgroups.
- Compare to the aggregated result.
- If they disagree, the subgroup-level results are usually the more honest answer — but think carefully about which question you’re trying to answer.
Key terms from this chapter are defined in the Glossary.
You won’t see Simpson’s paradox very often, but when you do, it will be on a question that matters. Aggregate analyses can hide the truth, even when the math is right. The best protection is to think about confounders before you analyze, and to disaggregate whenever a subgroup variable could plausibly matter.
Practice the skills from this chapter using the real UC Berkeley admissions data: Simpson’s Paradox: The UC Berkeley Admissions Case.
Next: what happens when a published result doesn’t hold up — the replication crisis.