Main menuGallery

Simpson's paradox

Simpson's paradox

Case

Group sizes

Drag to move each treatment between the two groups (the four success rates stay fixed). Push it to the middle and the paradox vanishes — the reversal exists only because the group sizes are lopsided.

Drag a coloured bar up or down to change its number of successes, or use the sliders above.

What's the maths?

Where's the maths? This is statistics, and the particular skill is comparing quantities by percentage. Every bar on screen is one number expressed as a percentage of another: successes ÷ total × 100. The surprise is that percentages from two separate groups cannot simply be averaged — when you pool the groups you are taking a weighted average, and the weights are the group sizes. If one treatment was mostly used on easy cases and the other mostly on hard cases, the weights differ, and the pooled percentages can flip the order of the individual ones. That reversal is Simpson's paradox, and it is a favourite way for a true table of numbers to tell a false story.

📘 On the Sec 1–4 syllabus
  • Sec 1 · N3 — 3.1 expressing one quantity as a percentage of another; 3.2 comparing two quantities by percentage
  • Sec 1 · S1 — 1.2 tables, bar graphs; 1.4 misinterpretation of data
  • Sec 2 · S1 — 1.8/1.10 mean, and the mean of grouped data (weighted averages)

Beyond the syllabus: confounding variables as a statistics concept are beyond the syllabus.

Call the two cells of one treatment s₁ out of n₁ and s₂ out of n₂. Each group's success rate is s/n, but the pooled rate is not the average of the two rates:

pooled rate = (s₁ + s₂) / (n₁ + n₂)

That is the mean of grouped data: a weighted average of the two rates, with weights n₁ and n₂. Change the weights and the pooled answer moves, even though not one of the four percentages has changed. This is exactly why the "Group sizes" slider can switch the paradox on and off.

The arrows below the bars make it visual. Draw each cell as an arrow that goes n across and s up, so its gradient is the success rate. Joining a treatment's two arrows tip-to-tail lands you at (total, total successes), and the gradient of the straight line from the origin to that point is the pooled rate. Each blue arrow is steeper than the matching red one — yet the blue chain can finish below the red line, because a long shallow arrow drags the average down.

The three cases are real. Charig's 1986 kidney-stone study: open surgery beat keyhole surgery on small stones and on large stones, but lost overall — because surgeons sent the hard cases to open surgery. Berkeley's 1973 graduate admissions looked biased against women overall, yet women were admitted at a higher rate in the departments shown — they applied in larger numbers to the department that admitted almost nobody. Same arithmetic, different story.

The hidden third variable — stone size, choice of department, number of at-bats — is called a confounder. The cure is not cleverer arithmetic: it is to keep the groups separate, and to say which group you are talking about.

Try this: load the kidney-stone case and read the four percentages — open surgery wins both rows. Now drag the "Group sizes" slider slowly to the middle. Watch the four percentages stay exactly where they are while the pooled bars cross over and the paradox disappears. Then drag a coloured bar down by a few percent and find the smallest change that breaks the reversal.

Controls: drag a coloured bar up or down to change its successes · use the sliders to change successes and totals · pick a case from the menu.