M
Simpson's Paradox — teaching interactive
Equity Analytics · Christopher I. Rider · Michigan Ross
Course hub →
Open teaching interactive · free to use in class

When the average hides the answer

An employer audits pay across 5,000 people and finds no significant gender gap. The number is correct. The conclusion is not. Underneath it, two business units are pulling hard in opposite directions — and the aggregate reports their sum, not their content.

Absence of Disparity ≠ Equity

Opposite biases across units can cancel in aggregate, producing a misleading zero net effect.

Illustrative data Pay equity Aggregation bias Instructor-ready
01 · The organization-level test

The finding that closes the file

This is where many audits stop. Pool every employee, compare mean base pay by gender, run the test. The gap is small, the p-value is nowhere near a conventional threshold, and the review concludes.

About these numbers. The figures on this page describe a stylized four-unit employer constructed for teaching. They are illustrative, not drawn from any real or published organization, and the generating parameters are given in Section 06 so you can reproduce or modify the example for your own class.
Organization-wide base pay gap · men minus women
+$1,143
Men (n = 2,750)
$205,455
Women (n = 2,250)
$204,311
p-value
0.748
95% CI
−$5,832 to +$8,119
Verdict on the aggregate: no statistical evidence of a base pay disparity.

The confidence interval is the tell. It spans roughly $14,000. An aggregate this imprecise is consistent with unit-level effects several times larger than the point estimate — in either direction, and in both at once. A null result on a wide interval is not evidence of parity; it is an absence of resolution.

02 · Disaggregate

Now compute it unit by unit

Same employees. Same variable. Same test. The only thing that changes is the unit of analysis. Reveal the units one at a time and watch what the organization-wide average was averaging over.

Base pay gap by business unit

men minus women, US$ · zero line = parity
men paid more women paid more not significant at .05

Two units carry significant gaps in opposite directions, a third is significant and positive, and a fourth cannot be distinguished from zero. All four are inside the organization-wide null. Tests are Welch's unequal-variance t-tests on the illustrative parameters in Section 06.

03 · Why the aggregate reads zero

Cancellation, not parity

The two largest units are equal in size and close in magnitude, pointing opposite ways. Each unit's contribution to the organization-wide gap is its own gap weighted by its share of the workforce. Sum the contributions and the two large effects offset each other almost exactly.

Business unitNWomen's shareMean base payGap (M−W)pWeightContribution

The mechanism in one line

Two units of identical size (1,500 each) carry gaps of +$20,000 and −$22,000. Weighted at 30% each they contribute +$6,000 and −$6,600, offsetting all but $600 of each other. Product Design and Client Support add back +$3,600, leaving an employment-weighted total of +$3,000.

The actual pooled gap is smaller still, +$1,143, because women's share is not constant across units: Client Support is only 30% women, so men are over-weighted in a mid-paying unit while women are over-weighted in low-paying Field Service. That composition difference accounts for the remaining $1,857. Either way, the organization-wide figure describes no unit in the company.

04 · The reweighting lab

The aggregate is a composition choice

Leave every unit's internal pay structure untouched — the same means, the same gender shares, the same gaps — and change only how many people each unit employs. The organization-wide gap moves, and it will change sign. No individual's pay changed.

Pooled base pay gap
+$1,143
men $205,455 · women $204,311
Workforce
5,000
45.0% women
At baseline headcounts the pooled gap is near zero — the cancellation regime, where the aggregate reports parity while two units run in opposite directions.

Pooled means are recomputed live: each unit contributes its own men's and women's means, weighted by its scaled headcount and its fixed gender share. Within-unit pay structure is held constant throughout. This is the classroom point — an organization can move its headline number without changing anyone's pay, simply by growing or shrinking units.

05 · What to do next

Disaggregation opens the analysis; it does not close it

A gap is a symptom. The object of inquiry is the process that generated it. Once the units disagree, the analytical task is to specify competing data-generating processes and identify what evidence would distinguish among them. These four are the candidates worth putting in front of students — deliberately posed as questions, not answers.

Candidate DGP

Entry-point pricing

Are starting salaries set by competing offers, or by any external reference that itself varies by group?

What would settle it: longitudinal salary histories back to hire date. Cross-sectional pay cannot separate an entry-point effect from subsequent differences in raises. If the data start at today's salary, the honest answer is that the hypothesis is untestable and the data request is the finding.

Candidate DGP

Discretionary components

Does the gap sit in base pay, or in the discretionary layer — bonus, equity, spot awards — where judgment has more room?

What would settle it: decompose total compensation and test each component separately against a measure of contribution. A unit can pay a base premium to one group while favoring another in bonus; testing only total pay conceals both.

Candidate DGP

Sorting into levels

Are the groups differently distributed across job levels, grades, or credential tiers within the unit?

What would settle it: compare within level and grade, then ask why the level distribution looks the way it does. A gap that attenuates on controlling for level has been relocated, not explained — the level assignment is itself an outcome to interrogate.

Candidate DGP

Role segregation

Are the groups concentrated in different roles, so that a pay gap is really a job-allocation gap?

What would settle it: role-by-group composition alongside a within-role pay test. Note that these are two separate claims: a unit can be visibly segregated by role and still show no significant pay gap. Segregation and disparity each have to be demonstrated on their own evidence.

Two maxims worth putting on the board

Explained ≠ Justified. A decomposition tells you which variable accounts for the gap. It does not tell you that the process generating that variable was fair.

The Xs Are Not Innocent. Level, tenure, credentials, and performance ratings are themselves produced by processes that may carry bias. Whether to adjust for them is a normative and strategic choice, not a purely statistical one.

06 · The rule, and the code

Simpson's Paradox checks

Always compute at the most granular level first. Then aggregate.

If aggregation reverses or erases the pattern, Simpson's Paradox is present.

  1. Estimate the disparity within every unit you can define — division, job family, level, cohort, location.
  2. Record the sign and magnitude of each. Opposite signs are the diagnostic.
  3. Aggregate only afterward, and report the aggregate alongside the disaggregated set rather than in place of it.
  4. When the aggregate is near zero, ask what is offsetting before concluding that nothing is happening.

Parameters behind this illustration

reproduce or modify freely
Unitn menn womenmean menmean womenSD menSD women

Welch's t-test depends only on these means, standard deviations, and sample sizes, so the statistics on this page are fully determined by the table — no random draw is involved. Any dataset matching these moments reproduces every figure shown.

* Generate the illustration, then run the checks — Stata
clear
input str20 unit nm nw mean_m mean_w sd_m sd_w
"Software" 800 700 280000 260000 170000 165000
"FieldSvc" 750 750 150000 172000 95000 92000
"Design" 500 500 205000 193000 88000 85000
"Support" 700 300 180000 174000 76000 74000
end
expand nm + nw // one row per employee, then draw pay

* The two lines that matter, in this order
bysort unit: ttest basepay, by(gender) unequal // granular FIRST
ttest basepay, by(gender) unequal // pooled LAST
table unit gender, statistic(mean basepay) statistic(frequency)

* Same logic with Python embedded via SFI
python:
from sfi import Data
import pandas as pd
df = pd.DataFrame(Data.get("unit gender basepay"),
    columns=["unit","gender","basepay"])
g = df.pivot_table("basepay","unit","gender","mean")
g["gap"] = g[1] - g[0] # men minus women
print(g) # signs disagree -> Simpson's Paradox
end
07 · For instructors

Teaching this with a full case

The illustration above is deliberately thin — one variable, four units, no institutional context. If you want to teach the paradox as a decision problem, with a protagonist, a board deadline, and real analytical ambiguity, there is a published case built around exactly this structure, with a teaching note and a supplemental dataset.

The published case

Rider, C. I., Choi, E., & Kim, Y. (2023). The Quest for Gender Pay Equity at Elemental Systems. WDI Publishing, case 5-154-986. 8 pages.

Listed learning objectives include conducting an organizational pay equity analysis, applying the equity analytics framework to distinguish differential treatment from disparate impact, and recognizing how organization-level data can obscure disparities within individual units.

  • Teaching note available to registered educators
  • Supplemental spreadsheet of employee-level data
  • Also distributed through Harvard Business Publishing

The framework behind it

This interactive is a companion to a graduate course in equity analytics. The course hub sets out the 2×2 that organizes the candidate mechanisms in Section 05 — Process (allocations × valuations) crossed with Behavior (differential treatment × disparate impact) — along with the seven-step analytical workflow and the full set of maxims.

  • Detection methods for each cell of the 2×2
  • Additional case simulators: algorithmic fairness, adverse impact in downsizing and admissions, penalized hiring models
  • Free to link or assign

Using this page in your own course is welcome — link to it, project it, or rebuild it from the parameters in Section 06. Adaptations and corrections are welcome by email.