Skip to content
All apps

Simpson's paradox

About this app

In every group the trend rises, lumped together it falls. A confounder reverses the aggregated relationship — group vs. overall regression switchable, an offset slider makes the paradox visible. Aggregation can deceive.

The statistics

In Simpson’s paradox a relationship holds within every subgroup but reverses when the groups are combined. The cause is a third variable, a confounder: group membership is itself related to x and shifts the groups relative to each other. Aggregating across the confounder mixes the effect within groups with the differences between them, and the sign can flip. Aggregated figures can therefore mislead.

What you see

Three groups A, B and C appear as point clouds in a scatter plot. Within each group y rises with x. The groups are offset along a falling diagonal. Group lines and the overall line can be shown separately. A table lists the slope b and the correlation r for each group and for the whole data set. A note reports whether the paradox is currently active, meaning all groups rise while the total falls.

Things to try

Show the group lines: all three rise. Then add the overall line, and it falls. Drag the offset slider to 0 so the groups sit on top of one another; the reversal disappears. Increase the offset again and watch for the point where the overall slope turns negative. Carry it over to practice: a department can have better rates in every category and still look worse overall if it mostly handles the difficult cases.

Frequently asked questions

What is Simpson’s paradox?
Simpson’s paradox describes a trend that appears in several subgroups but disappears or reverses when the groups are combined. It is not a calculation error; it arises from a third variable related both to group membership and to the outcome. Well-known examples are university admission rates and treatment success in medicine.
What is a confounder?
A confounder is a variable that influences both the presumed cause and the effect. If it is ignored, a spurious or distorted relationship appears. Remedies include comparing within groups or adding the confounder as a control variable in the regression.
When should data be split into groups?
Whether the split or the pooled view is right depends on the causal model, not on the data alone. If a third variable affects both x and y, compare within groups. If it lies on the path from x to y, splitting distorts the total effect.
What can I set in the Simpson app?
You toggle the group lines and the overall line and control the offset between the groups. A table shows slope and correlation per group and overall, and a note reports whether the reversal is currently happening.

Subject: Statistics

More from Statistics

A VisuApp by heyprof: interactive, free in your browser, no sign-up. What is a VisuApp? · All apps