Text & documents
Numbers & maths
Data & formats
Security
Development & DevOps
Artificial Intelligence
Finance
Health & Wellness
Productivity
Games & Entertainment
Multimedia & design
Business
How to use
Simpson's paradox and confounders

A confounder influences both who receives the treatment and the outcome. Here, severity: severe cases get the drug more and recover less. Compared raw, the drug «comes out» worse; split by severity, it helps in both groups. Neither the pooled nor the split figure is «the true one» on its own: the causal diagram (the DAG) decides. If severity causes the treatment, you have to split by it.

Causal inference and upliftSimpson, confounders, IPW and who to target with a campaign
Causal inference and upliftSimpson, confounders, IPW and who to target with a campaign

An A/B test (/ab-test) answers «does it work?» when you could assign at random. Here, what it doesn't cover: data where assignment was NOT random, and the fact that the effect isn't the same for everyone.

A drug, 1,000 patients. Severe cases get the drug more often (the doctor decides so) and recover less, with or without the drug.

With the drug: recoverWithout the drug: recoverDifference
Mild89% (111 de 125)84% (322 de 385)+5.2 points
Severe40% (158 de 393)22% (21 de 97)+18.6 points
All together52% (269 de 518)71% (343 de 482)−19.2 points
severitydrugrecovery
Severity causes both: it is a confounder. To know what the drug does, compare within each severity.

In each group, the drug cures more. Together, it may come out as curing less, because among the treated there are many more severe cases. Bring the confounding down to 0 (random assignment, like an A/B test) and the paradox disappears.