Simpson's Paradox Simulator

Edit subgroup counts and see how aggregate rates can reverse the within-group pattern.

At a glance

Computes
Subgroup rates and the pooled rate, showing when aggregation reverses the direction.
You supply
Successes and totals for two arms inside each of two subgroups.
Use when
You need to show how pooling unequal subgroups flips a comparison.
Not for
An association created by filtering the sample on a shared outcome. Berkson's Paradox Simulator
Easy cases

Each total is capped at 5,000.

Each total is capped at 5,000.

Hard cases

Each total is capped at 5,000.

Each total is capped at 5,000.

Trials x all four subgroup totals must be at most 5,000,000.

Aggregate A rate

78.0%

Aggregate B rate

82.6%

Reversal status
Reversal detected
Group mix mechanism
A has more hard cases
Simulated reversal frequency
Not run
Subgroup rates
GroupA rateB rate

Value by category

0.00.20.40.60.8Method AMethod BEasy casesPooled
Some category labels are shortened or omitted on the axis; full labels remain in the table below.

Run the simulation to fill Monte Carlo metrics and convergence.

Reversal frequency against Trial

0204060801000.00.20.40.60.81.0Reversal frequency
Monte Carlo convergence
TrialA rateB rateReversal frequency
Export

subgroup rate = successes / total; aggregate rate = summed successes / summed total How?

How this is calculated

Simpson's paradox is flagged only when one arm has the higher rate in every subgroup and the other arm has the higher aggregate rate. Ties are not counted as a full reversal.

To model the same group structure as a graph, use the causal DAG builder and inspect which backdoor paths the group variable creates.

Formula: subgroup rate = successes / total; aggregate rate = summed successes / summed total

Sources

  1. Stanford Encyclopedia of Philosophy Simpson's Paradox. Stanford Encyclopedia of Philosophy. Retrieved .

Method last reviewed