liveBook · Manning

Simpson's paradox

As explained in Causal Inference for Data Science

Simpson’s paradox is a statistical phenomenon in which an association or trend observed across aggregated data reverses or differs after conditioning on a grouping variable.

Simpson’s paradox occurs when an association or trend changes, disappears, or reverses after data is grouped by another variable. It warns against treating correlation as causation: a confounder can make an overall comparison point in the wrong direction. section 2.0 section 2.1

Kidney stone treatments

Overall, treatment B appears better, with an 81% recovery rate versus 78% for A. After separating patients by stone size, A performs better for both small stones (93% versus 87%) and large stones (73% versus 63%). Stone size changes the conclusion because treatment groups contain different mixes of small and large stones. section 2.1

Table 2.1 Kidney stone dataset
Treatment
Size
Patients
Recovered
A
Small
87
81
B
Small
270
234
A
Large
263
192
B
Large
80
50

Inspect the kidney stone counts and compare the unstratified recovery table with the size-specific rates to see how aggregation reverses the apparent treatment ranking. section 2.1

Use the paradox as a practical check before making a causal decision:

  • Ask which variables affect both the choice or treatment and the outcome; these are potential confounders. section 2.0
  • Compare results within relevant groups instead of relying only on aggregated averages or correlations. section 2.7
  • Use domain knowledge and causal graphs to decide which variables belong in an adjustment analysis. section 2.9
  • In regression, include the confounder when appropriate: the unadjusted price model suggests a positive customer trend, while including distance estimates the intended effect as about −1.99. section 6.1.1

How Causal Inference for Data Science covers it

How deep it goes
Explains reversals through stratified examples, confounding, causal graphs, adjustment, and regression, without developing the adjustment formula fully.
Examples
Uses kidney stone recovery rates and synthetic hotel pricing data to expose reversals before and after conditioning on confounders.
What it assumes
Assumes familiarity with treatment, outcomes, correlation, and observational data while defining confounders through concrete examples.
What you can do after
Diagnose misleading associations by stratifying data, identifying confounders, and adding appropriate variables to regression models.
How it connects
Links confounding, correlation, causation, causal inference, adjustment formulas, causal graphs, and linear regression.

Also explained in

Compare how 2 books explain Simpson's paradox →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Causal Inference for Data Science. The section links point to the parts of the book it draws on.