Research Methods
The same fictional data, twice: once as a scatterplot with a fitted line, once as residuals against fitted values. Same numbers, and they do not read the same way.
Simulated — generated data from a documented seed
By the end you should be able to spot non-constant residual variance and explain what it does, and does not, damage in a regression.
About 25 minutes. Nothing you do here is saved or sent anywhere.
Homoscedasticity means the residual spread stays roughly constant across the fitted values. When the spread grows, shrinks or bulges instead, that is heteroscedasticity. Both words describe the shape of a picture.
A fictional study of a hundred and twenty people fits a straight line. The spread of the points around that line grows steadily as the predicted value rises — a classic megaphone.
The upper panel is the data with the fitted line. The lower panel is the same data with the line subtracted out: every point's residual against the value the model predicted for it. Nothing has been added; a systematic pattern has been made flat so that departures from it show up.
Nothing here changes the controls for you, and none of it says what you are going to find.
The true slope is fixed at 0.50. The controls change only the spread around it.
| Region of the fitted values | Residual SD |
|---|
No convention sets a ratio at which a fan becomes a problem. What matters is whether the extra spread sits where the line is most sensitive to it — which is what the two standard errors show.
| Quantity | Classical | Robust |
|---|
Four fictional studies, each shown as residuals against fitted values. Say what each one shows.
Homoscedasticity means that the spread of the outcome around the line is roughly the same wherever you stand on the line. In the raw scatterplot that spread is competing with the slope for your attention: the cloud is tilted, so it is hard to tell whether it is also widening. Plotting residuals against fitted values removes the tilt by construction, leaving a band that should look like the same thickness all the way across. Everything that is left in that picture is something the model did not account for.
The horizontal axis matters. Residuals plotted against the observed outcome are correlated with it by construction — a large y tends to produce a large positive residual — so that plot shows a slope even when the model is perfect. Fitted values, by contrast, are uncorrelated with the residuals in any least-squares fit, so the flat band is the honest baseline and any departure from it is real information.
Ordinary least squares stays unbiased under non-constant variance: run the study many times and the average slope still lands on the truth, which is why the coefficient barely moves as you drag the severity. What breaks is the formula for its standard error, which assumes one common variance and quietly gets the wrong answer when there is not one. The interval and the test built on it inherit that error while looking entirely ordinary on the output.
How much it costs depends on where the extra spread sits. The classical formula goes wrong to the extent that the variance lines up with leverage, which is largest at the two extremes of the predictor.
Variance concentrated at both ends makes the classical 95% interval far too narrow: it covers the truth about 86% of the time here. A plain megaphone puts the extra variance at one extreme and the least at the other, so the two partly cancel and coverage lands nearer 93%. Variance concentrated in the middle makes the interval conservative instead — about 99% coverage, which costs power rather than credibility.
The heteroscedasticity-consistent standard error stays near its nominal level in all four cases, and costs almost nothing when the variance turns out to be constant after all.
Reading residual plots is a skill, and a fallible one: two competent readers routinely disagree about the same picture, and small samples produce fan shapes and curves out of nothing at all. Formal tests do not settle it either, because their sensitivity depends on the sample size — a trivial departure will be flagged in a large study and a serious one missed in a small one. The reasonable practice is to look at the plot, say what you saw, report standard errors that do not assume the thing you are unsure about, and let the reader see both.