What it shows
Simulated data from y = 5 + 0.8x with normal error whose standard deviation is 0.12x, from 0.12 at x = 1 to 12 at x = 100. The error variance rises with x, which is heteroscedasticity, and the points open out from left to right.
One observation sits at each whole number x from 1 to 100, on axes from 0 to 100. While x is small the error is under one unit, so after rounding y to a whole number the first points lie almost exactly on the trend. Its counterpart with constant error is the homoscedasticity example.
How to read it
Read the plot from left to right: the points start in a narrow line and spread wider with every step along x.
Split the x range into thirds and the residuals from the least-squares line have standard deviations of 1.9, 5.7 and 11.0, each at least half again the one before.
Heteroscedasticity leaves the least-squares estimates unbiased, and the fitted line here, y = 5.2 + 0.80x, is close to the model’s. The cost is in inference: the usual standard errors assume constant variance, so the tests and confidence intervals built on them can mislead.
The numbers behind it
- The model is y = 5 + 0.8x + e, with one observation at each x from 1 to 100 and y rounded to a whole number; e is normal with mean 0 and standard deviation 0.12x.
- Least-squares line y = 5.2 + 0.80x. Sample standard deviation of the residuals: 1.9 for x = 1 to 33, 5.7 for 34 to 66 and 11.0 for 67 to 100.
- This is the first draw in sequence in which every y lies between 1 and 100, every point lies within 2.5 standard deviations of the model line (allowing 0.5 for rounding), and the residual standard deviation grows at least 1.3 times from each third to the next, ending more than 2.5 times the first. The screen was set so the fan is unmistakable.
Ways to use it in teaching
Ask students for a variable whose spread should grow with its level, such as spending on meals against income, and whether taking the log of spending would even out the fan.
Turn it into a residual plot: the fan here becomes the funnel in the residual plot examples, which is the view students meet when they check a regression of their own.
Before showing the homoscedasticity example, ask what an ordinary least-squares fit to these data gets right (the line) and what it gets wrong (the standard errors). Then introduce weighted least squares, which gives the precise points at small x more weight.
For where regression sits among the statistical tests, see our guide to inferential statistics.
Sources
- Çetinkaya-Rundel, M., & Hardin, J. (2024). Introduction to modern statistics (2nd ed.). OpenIntro. https://openintro-ims.netlify.app/
- Homoscedasticity and heteroscedasticity. (n.d.). In Wikipedia. Retrieved November 4, 2026, from https://en.wikipedia.org/wiki/Homoscedasticity_and_heteroscedasticity







