Simpson's Paradox in 2D: When Grouped Trends Reverse
Interactive 2D data-science lab: watch a negative trend inside every subgroup flip into a positive trend once the groups are pooled together — a real, reproducible statistical illusion caused by a confounding variable, plotted directly on an X-Y scatter you can pan and zoom.
Every subgroup in this dataset shows the same negative relationship between X and Y — yet pool all the points together and the trend can flip to positive. This is Simpson's Paradox, a real and reproducible statistical phenomenon caused by a confounding variable that drifts together with both the predictor and the group label. The simulator generates several subgroups of synthetic data, fits a genuine least-squares regression line to each one individually and to the pooled dataset, and renders both directly on a 2D scatter plot (pan and zoom to inspect) alongside a bar-chart panel that puts the within-group and pooled slope/correlation side by side so the reversal is unmistakable.
Watch a negative trend inside every subgroup of a dataset flip into a positive trend once the groups are pooled together — a real statistical illusion driven by a confounding variable, plotted directly on a pannable, zoomable 2D scatter with live regression fits and a side-by-side bar comparison.
2D · HTML5 Canvas 2D · 60 FPS target · runs fully client-side, no install