Opening
We found a historical comparison where Treatment A has a higher recorded success rate in each stone-size group, yet Treatment B has a higher recorded success rate overall. The mathematics has not broken. The denominator has.
Teaching narrative
Simpson's paradox arises because pooled proportions weight subgroups differently. A comparison that is straightforward within each subgroup can reverse under aggregation when the groups have different mixes of easier and harder cases.
With regression, a slope summarizes a fitted linear association, and ordinary least squares chooses a line minimizing squared residuals. The result can be optimal by that criterion while still missing an obvious curved pattern.
Residual plots help us see what the line missed. The squared-error fit and R-squared do not prove that the functional form is right, that new predictions will be accurate, or that changing a predictor will cause the response to change.
A slope also has sampling uncertainty under a specified statistical model. Calculate its standard error and investigate whether dependence, influential observations, or unequal residual spread challenge the inferential claim.
Before the experiment
Can a statistic be computed correctly while still supplying a misleading causal narrative?
Live demonstration
Toggle the historical kidney-stone comparisons between pooled and stratified data, then increase curvature in the least-squares residual laboratory.
Exit question
Describe the difference between a fitted association and a causal intervention effect.