ML0136 Simpson’s Paradox & Selection Bias

The treatment wins in every city but loses overall. Explain Simpson’s paradox, and how do confounders, colliders, and survivorship bias corrupt analyses?

Line-art bar chart of a checkout experiment readout: the hatched treatment bar is taller than the plain control bar in City A (93.1 vs 86.7 percent) and in City B (73.0 vs 68.8 percent), but in the All users group the treatment bar is shorter (78.0 vs 82.6 percent), labeled treatment behind with a question mark

The Problem: A checkout experiment readout in which the new flow converts better in City A and in City B, yet the pooled comparison across all users puts it behind the current flow.

Answer

Simpson’s paradox is an aggregation reversal: an effect that holds in every subgroup flips sign when the subgroups are pooled. It happens because each arm’s pooled rate is a weighted average of its city rates, and the two arms can carry very different city mixes. If treatment users are concentrated in a hard city with low baseline conversion, that composition effect can outweigh every within-city gain. Choosing between the pooled and the stratified number is a causal question that the data table alone cannot answer. You adjust for a confounder that drives both treatment and outcome, but conditioning on a collider, a post-treatment variable, or only the units that survived a filter manufactures bias instead of removing it.

(1) Aggregation Reversal: A pooled gap splits into a within-city effect plus a mix effect. A reversal needs both unequal arm mixes and baselines that differ across cities, which is why uneven rollouts and observational comparisons are the usual culprits.
(2) Confounder (Fork): In T \leftarrow Z \rightarrow Y the variable Z opens a back-door path, so the pooled association mixes the treatment effect with the effect of Z. Stratifying on Z, or randomizing T, closes it.
(3) Collider (Inverted Fork): In T \rightarrow S \leftarrow Y the path is blocked by default. Filtering or stratifying on S opens it and creates an association between independent variables, which is Berkson’s paradox.
(4) Survivorship Bias: Analyzing only units that passed a filter tied to the outcome inverts the conclusion, as in Abraham Wald’s bomber bullet holes. The damage you never observe is the damage that mattered.
(5) Regression to the Mean: Units picked for being extreme on a noisy metric drift back toward the average when remeasured. A “fix” aimed at the worst performers therefore looks effective even when it does nothing.

Three side-by-side causal graphs over treatment T and conversion Y. Left, confounder: city Z points to both T and Y, T points to Y, verdict box says adjust for Z because stratifying closes the back-door path. Middle, collider: T and Y both point into a selected node S, a dashed red line between T and Y marks a spurious link that appears if you filter on S, verdict box says do not adjust for S. Right, mediator: T points to week-1 use M, M points to Y, T also points to Y, verdict box says do not adjust for M because it deletes real effect

Figure 1: The same three variables admit three causal shapes. Adjusting for the confounder closes a back-door path, adjusting for a collider opens a spurious one, and adjusting for a mediator deletes part of the real effect.

The best-known real case is the 1973 Berkeley graduate admissions data analyzed by Bickel, Hammel, and O’Connell. Men were admitted at a higher pooled rate, yet department-level rates showed no bias against women and a small bias in their favor, because women applied disproportionately to departments with low admission rates. Department plays the role of city. In product analytics the same structure appears whenever the treatment share varies across a segment that also moves the baseline: a feature ramped to 50% in one market and 5% in another, an experiment whose allocation changed mid-week while weekday traffic converts differently, or any comparison of users who opted into a feature against users who did not. A correctly randomized test with a constant split in every segment cannot show the reversal in expectation, because equal mixes zero out the composition term.

Mathematical Formulation:
p_T = \sum_{c} w_{T,c}\, p_{T,c}
\Delta = p_T - p_C
\Delta = \sum_{c} w_{T,c}\,(p_{T,c} - p_{C,c})
+ \sum_{c} (w_{T,c} - w_{C,c})\, p_{C,c}
P(Y{=}1 \mid \mathrm{do}(T{=}t)) = \sum_{z} P(Y{=}1 \mid t, z)\, P(z)
E[X_2 \mid X_1] = \mu + \rho\,(X_1 - \mu)

Where:

  • p_T and p_C are the pooled conversion rates of treatment and control, \Delta is the pooled gap, and p_{T,c}, p_{C,c} are the rates inside city c.
  • w_{T,c} = n_{T,c}/n_T is the share of treatment users who live in city c (and likewise w_{C,c} for control). The first sum is the within-city effect; the second is the mix effect, which is zero whenever w_{T,c} = w_{C,c} for every city.
  • \mathrm{do}(T{=}t) denotes setting treatment by intervention, z ranges over levels of the adjustment variable, and P(z) is its share in the whole population. This back-door adjustment is valid only if Z blocks every back-door path and contains no descendant of T.
  • X_1 and X_2 are two noisy measurements of the same unit, \mu is the population mean, and \rho is their test-retest correlation; any \rho below 1 pulls extreme units back toward \mu.

Worked Example:
The counts below are the classic kidney-stone treatment data (Charig et al., 1986) relabeled as a checkout experiment in which treatment was rolled out mostly in hard City B while control stayed mostly in easy City A.

SegmentTreatment conversionsControl conversionsGap (points)
City A (easy)81 / 87 = 93.10%234 / 270 = 86.67%+6.44, treatment wins
City B (hard)192 / 263 = 73.00%55 / 80 = 68.75%+4.25, treatment wins
All users (pooled)273 / 350 = 78.00%289 / 350 = 82.57%-4.57, treatment loses

Weighting the +6.44 and +4.25 point city gaps by the treatment arm’s mix (87/350 and 263/350) gives a within-city term of +4.80 points. The mix term is (183/350) \times (68.75 - 86.67) = -9.37 points, because treatment keeps 52 more percentage points of its users in the low-baseline city. Together 4.80 - 9.37 = -4.57, exactly the observed 78.00% vs 82.57% gap. Applying the back-door formula with the population city shares (357/700 = 0.51 in City A, 0.49 in City B) gives 83.3% for treatment and 77.9% for control, a +5.4 point effect. That standardized number is the right answer only because city is a pre-treatment confounder here, and the arithmetic alone could never tell you so.


Login to view more content
Log in to track your progress

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *