---
tag: T060JHSH05
kind: counterexample
name: Simpson's paradox
msc: [62H17, 62H20]
uses: [PANSMHE0SW, 0990W5PN13]
sources:
  - url: https://en.wikipedia.org/wiki/Simpson%27s_paradox
same_as:
  wikidata: Q757290
  wikipedia: Simpson's paradox
---

## Counterexample

The claim refuted is this.
If treatment $A$ has a higher success rate than treatment $B$ in every subgroup, then $A$ has the higher rate in the whole population.

Consider two subgroups, mild and severe cases, summarised in a [[contingency table|PANSMHE0SW]] for each subgroup.

1. Mild cases: $A$ succeeds in $9$ of $10$ patients ($90\%$), $B$ in $80$ of $100$ patients ($80\%$).
2. Severe cases: $A$ succeeds in $30$ of $100$ patients ($30\%$), $B$ in $2$ of $10$ patients ($20\%$).
3. All cases: $A$ succeeds in $39$ of $110$ patients (about $35\%$), $B$ in $82$ of $110$ patients (about $75\%$).

So $A$ is better in each subgroup, yet $B$ is better overall.

## Remarks

The reason is that the overall rate is a weighted average of the subgroup rates, and the weights differ between the treatments.
Most patients given $A$ are severe cases, and most patients given $B$ are mild cases.
In terms of [[conditional probability|0990W5PN13]], $P(S \mid A, G) > P(S \mid B, G)$ for each subgroup $G$ does not imply $P(S \mid A) > P(S \mid B)$.
The same reversal can happen for correlations: a trend in each group can be reversed when the groups are pooled.
Which comparison is relevant depends on the causal structure, not on the numbers alone.

## Explanations

### L1 human

A treatment can look better in every group of patients and still look worse when all patients are counted together.
This happens when the treatments were given to very different mixes of patients.
Here the better treatment was mostly given to the hard cases, so its overall success rate is dragged down.
