Probability & Statistics

Anscombe Quartet Diagnostics

Compare nearly identical summaries with four very different scatterplots.

By Riano · Published · Updated · Report a correction

Anscombe Quartet Diagnostics

The Anscombe quartet comprises four datasets that have nearly identical simple statistical properties, yet appear very different when graphed. They were constructed in 1973 by the statistician Francis Anscombe to demonstrate both the importance of graphing data before analyzing it and the effect of outliers on statistical properties.

Worked Example: Dataset I

Let us calculate the statistics for Anscombe's first dataset. The x values are:

x = [10, 8, 13, 9, 11, 14, 6, 4, 12, 7, 5]

The y values are:

y = [8.04, 6.95, 7.58, 8.81, 8.33, 9.96, 7.24, 4.26, 10.84, 4.82, 5.68]

1. Mean of x: Sum the 11 values and divide by 11. mean(x) = (10 + 8 + ... + 5) / 11 = 99 / 11 = 9.0.

2. Mean of y:mean(y) = 82.51 / 11 = 7.5009.

3. Sample variance of x: Using n-1 = 10, var(x) = sum(x - mean(x))² / 10 = 110 / 10 = 11.0.

4. Sample variance of y: var(y) ≈ 4.1273.

5. OLS Regression: The slope is sum((x - mean(x)) * (y - mean(y))) / sum((x - mean(x))²) ≈ 0.5001. The intercept is mean(y) - slope * mean(x) ≈ 3.0001.

Experiment with the Module

You can interact with the four datasets directly using the Anscombe Quartet Diagnostics module.

  1. Set the Dataset control to "I" and observe the scatterplot. Notice how it looks like a typical linear relationship with some variance.
  2. Change the Dataset to "II". The summary statistics (mean, variance, slope, intercept, correlation) remain nearly identical, but the plot reveals a perfect nonlinear (quadratic) relationship. A simple linear model is inappropriate here.
  3. Change to Dataset "III". This dataset exhibits a perfect linear relationship except for one massive outlier that alters the fitted slope and intercept.
  4. Change to Dataset "IV". Here, the x values are constant except for one extreme leverage point. The slope is entirely determined by that single observation.
  5. Adjust the Y scale to "0" and note how the correlation and R² become undefined as the variance of y drops to exactly zero.

Limitations

The simple summary statistics (mean, variance, correlation) are highly susceptible to outliers and nonlinear relationships. The four Anscombe datasets were specifically engineered to have identical integer values for the sample size, mean of x, variance of x, and nearly identical values for the mean of y, variance of y, correlation, and regression line coefficients. If the sample sizes were larger or the data were randomly generated, such identical summaries with vastly different patterns would be extremely unlikely. Furthermore, these basic metrics do not capture heteroscedasticity or multimodal distributions.

References

The original publication demonstrating these datasets emphasizes the necessity of graphical analysis.

Experience it interactively

Adjust parameters, observe in real time, and build deep intuition with Riano’s interactive Anscombe Quartet Diagnostics module.

Try Anscombe Quartet Diagnostics on Riano →

More in Probability & Statistics