A line to play with: regression and correlation in a picture
In brief
The page shows scatter plots with their regression line, the correlation r and the coefficient of determination R². It makes visible that the same numbers can belong to very different pictures.
What the examples show
- Anscombe's quartet (1973): four clouds with almost the same line and r = 0.82. Only one really fits a line; one is a curve, one has an outlier, one depends on a single point.
- A point to move: a single point can change line and correlation strongly, especially when it lies far out.
- Simpson paradox: over all points the line falls, in every group it rises. Whether the groups must be taken into account is a question of the subject matter, not of the calculation.
Caution
The correlation only measures how well a line fits, not whether one quantity causes the other. The Anscombe quartet is a real data set from the literature; the Simpson and the outlier examples are invented.