Heteroscedasticity: How to Detect, Fix and Report It

In short

Heteroscedasticity (also spelled heteroskedasticity) means that the spread of the residuals is not constant: it grows or shrinks along the predicted values. It does not bias the regression coefficients. What it breaks is their standard errors, and with them every t, p value and confidence interval in the table. You see it in the plot of residuals against predicted values (a funnel), you can confirm it with the Breusch-Pagan or White test, and the default fix is heteroscedasticity-consistent HC3 standard errors (Long & Ervin, 2000). In the worked example below the slope does not move, B = 0.34, but its standard error goes from 0.14 to 0.19 and its p value from .017 to .079. In an ANOVA the same problem is handled with Welch's F.

You have run the regression, the coefficients make sense, and then the residual plot comes back shaped like a megaphone: tight on the left, spread out on the right. Or a reviewer writes “the authors should address the heteroscedasticity evident in their residuals”, and you need to know whether that sentence threatens your findings or only your standard errors. Usually it is the second, and the fix takes one line of code and two sentences in the paper. Here is what the problem actually damages, how to detect it without being fooled by a test, which correction to use and exactly what to write. The wider map of assumptions is in how to check statistical assumptions.

What heteroscedasticity is, and what it breaks

Ordinary least squares (OLS) regression assumes that the errors have the same variance at every value of the predictors. That is homoscedasticity. When the variance changes, typically increasing with the predicted value, the errors are heteroscedastic. In psychology and health data it is the rule rather than the exception: people who work no overtime all report similar strain, while those working twenty extra hours a week range from coping fine to burnt out.

The key fact, and the one most write-ups get wrong, is what it damages. As long as the model is correctly specified, the OLS coefficients remain unbiased under heteroscedasticity. What fails is the formula for their standard errors, which assumes one common error variance. With that formula wrong, the t statistics, the p values and the confidence intervals are wrong too, sometimes too narrow and sometimes too wide, depending on where the large variances sit relative to the extreme values of the predictor. OLS also stops being the most efficient estimator, which is the argument for weighted least squares further down.

So “the results are invalid because of heteroscedasticity” is almost never true. “The inference on these coefficients needs a correction” almost always is.

How to see it: residuals against predicted values

The diagnostic that matters is a plot: residuals (standardized or studentized) on the vertical axis, predicted values on the horizontal axis. Under homoscedasticity the cloud is a horizontal band of even height. Heteroscedasticity shows up as a fan or funnel that widens to one side, or as a bow tie that is narrow in the middle. R draws it with plot(model, which = 1), and the scale-location plot (which = 3) shows the same thing as a trend in the square root of the absolute residuals. In SPSS, ask for *ZRESID against *ZPRED in the regression plots.

Plot the residuals against each predictor too, because the variance often grows with one predictor and not the others, and that tells you which variable is driving it. And look at the shape before calling it heteroscedasticity: a curved band is a misspecified model (a missing quadratic term, an interaction, a ceiling), and fixing the specification often makes the uneven spread disappear on its own.

Formal tests: Breusch-Pagan and White, and their limits

The Breusch-Pagan test (Breusch & Pagan, 1979) regresses the squared residuals on the predictors and asks whether they explain any of the variation. Its degrees of freedom are the number of predictors in that auxiliary regression. The original version assumes normal errors; the studentized version by Koenker (1981) does not, and it is what lmtest::bptest() in R runs by default. The White test (White, 1980) adds the squares and cross-products of the predictors, so it also catches non-linear patterns, at the cost of many more degrees of freedom: with two predictors it has five.

Both are chi-square statistics and are reported as such, naming the version: “Koenker's studentized Breusch-Pagan test, χ²(2) = 24.17, p < .001”. χ² is a Greek letter, so it stays upright; p is italicized.

Their limits are the same as for every assumption test. With large samples they flag variance differences far too small to distort anything; with small samples they miss differences that do. They also react to a misspecified model, so a significant result does not tell you whether the problem is the variance or the functional form. And using the test to decide whether to correct is a two-stage procedure whose real error rate nobody controls. Long and Ervin (2000) were explicit about this: the decision to use robust standard errors should not depend on a screening test. The plot tells you what is going on; the test adds a number to a decision you should make on other grounds.

Robust standard errors (HC3) as the first fix

Heteroscedasticity-consistent standard errors, often called robust or sandwich standard errors (White, 1980), estimate the variance of each coefficient without assuming a common error variance. There are several versions, HC0 to HC3. HC0 is White's original and is too liberal in small samples. Long and Ervin (2000) found in their simulations that HC3 held the error rate best and recommended it for samples of 250 or fewer; Hayes and Cai (2007) make the same recommendation for psychology. The coefficients do not change at all. Only the standard errors and everything computed from them change.

A worked example with fictional data: 160 nurses, emotional exhaustion predicted by weekly overtime hours (M = 6.05, SD = 4.05) and perceived supervisor support. The residual plot fans out to the right, and Koenker's test agrees, χ²(2) = 24.17, p < .001 (White's test, χ²(5) = 29.87, p < .001).

PredictorBSE (OLS)p (OLS)SE (HC3)p (HC3)95% CI (HC3)
Intercept23.772.75< .0013.05< .001[17.76, 29.79]
Overtime hours0.340.14.0170.19.079[−0.04, 0.73]
Supervisor support−2.180.73.0030.75.004[−3.66, −0.70]

Overtime is the predictor along which the variance grows, and it is the one whose standard error grows: from 0.14 to 0.19, its t(157) from 2.42 to 1.77, its interval from [0.06, 0.62] to [−0.04, 0.73]. Support hardly moves. That is the typical pattern, and it is why the correction is worth running even when you expect it to change nothing: you find out which inference was leaning on the wrong formula. The overall model test changes too, because it should also be computed with the robust covariance matrix: here F(2, 157) = 8.08, p < .001, against 7.19 with the classical errors. R² = .08 is the same in both.

How to get it: in R, lmtest::coeftest(model, vcov = sandwich::vcovHC(model, type = "HC3")) (Zeileis, 2004); in Stata, regress y x1 x2, vce(hc3); in SPSS, the HCREG macro that Hayes and Cai (2007) published with their article. In jamovi and JASP, check whether your version offers robust standard errors in the linear regression options and, if it does, which HC type it uses, because that is what you have to report.

A related alternative is the case-resampling bootstrap, which resamples whole observations and is therefore also valid under heteroscedasticity. It is a reasonable choice when you are already bootstrapping something else in the model; the reporting format is in how to report bootstrap confidence intervals in APA 7.

Transformations and WLS: when they pay off

Robust standard errors repair the inference but leave OLS inefficient. Two older remedies attack the variance itself, and each has a price.

Transforming the outcome. When the outcome is positive and its spread grows in proportion to its mean (reaction times, costs, hospital stays), a log transformation often stabilizes the variance and straightens the relationship at the same time. The price is interpretation: coefficients now describe proportional changes, and back-transforming the predictions needs care. Do not transform a questionnaire total just to make a residual plot look better: you change the question the model answers.

Weighted least squares (WLS). If you know, or can model, how the variance changes, you can weight each observation by the inverse of its variance so the noisy cases count for less. When the variance model is right, WLS is more precise than OLS. In the example, modelling the log of the squared residuals on the predictors and weighting accordingly gives an overtime slope of B = 0.43, SE = 0.17, p = .010, more precise than the OLS-with-HC3 estimate. But those weights were estimated from the same data, the slope moves (0.43 against 0.34) because the cases now count differently, and if the linear model is not exactly right, OLS and WLS are no longer estimating the same quantity. A wrong variance model also gives wrong standard errors again. That is why many authors pair WLS with HC3 errors as insurance, and why WLS is worth it mainly when the variance structure has a substantive basis: means of groups of different size, or a measurement error you can quantify.

Sometimes the uneven spread is telling you that the model family is wrong. A count outcome (relapses, sick days) has a variance that grows with its mean by nature, and a Poisson or negative binomial model handles it instead of patching linear regression. The model paragraphs for that case are in writing results when assumptions are violated.

What to write in the Method and the Results (APA 7)

The decision goes in the Method, stated as part of the plan, with the estimator, the software and a reference: “Because the residual plots indicated non-constant variance, all regression coefficients were tested with heteroscedasticity-consistent standard errors (HC3; Long & Ervin, 2000), computed with the sandwich package (Zeileis, 2004) in R.” If you adopted HC3 for every model from the start, say that instead: it is the stronger position, because it was not chosen after looking.

In the Results, give the evidence once and then report the coefficients as usual: “The variance of the residuals increased with predicted exhaustion (Koenker's studentized Breusch-Pagan test, χ²(2) = 24.17, p < .001). With HC3 standard errors, supervisor support predicted lower exhaustion, B = −2.18, SE = 0.75, t(157) = −2.90, p = .004, 95% CI [−3.66, −0.70], whereas the association with overtime hours did not reach significance, B = 0.34, SE = 0.19, t(157) = 1.77, p = .079, 95% CI [−0.04, 0.73].”

In the regression table, one line in the general note is enough: “Standard errors are heteroscedasticity-consistent (HC3).” Do not print both sets of standard errors in the main table unless the comparison is the point; if a reviewer asks for the uncorrected ones, they go in the supplementary material. The rest of the regression format is in how to report a regression in APA 7.

In ANOVA: Levene and Welch's F

An ANOVA is a regression with categorical predictors, and heteroscedasticity there means unequal group variances. The classical F is fairly robust when the groups are the same size, and fails when they are not, especially when the largest variance sits in the smallest group. The usual check is Levene's test, preferably the median-based version, and the fix is Welch's ANOVA (Welch, 1951) with Games-Howell comparisons, whose second degree of freedom comes out fractional: F(2, 71.35) = 5.26, p = .007. A growing number of methodologists recommend using Welch by default for every comparison of means (Delacre et al., 2017). The full write-up is in how to report Levene's test in APA 7.

What reviewers flag

“Heteroscedasticity was detected, so a non-parametric test was used.” Moving to ranks changes the hypothesis and does not fix unequal variances. The fix is in the standard errors.

Robust errors without the type. HC0 and HC3 can give different answers in samples of a hundred or two. “Robust standard errors were used” cannot be reproduced; “HC3” can.

A significant Breusch-Pagan test with no plot and no consequence. Reporting the test and then interpreting the classical standard errors is worse than not testing at all.

Transforming the outcome and interpreting the coefficients on the original scale. After a log transformation, a slope of 0.05 is roughly a 5% change, not 0.05 points.

Frequently asked questions

Does heteroscedasticity bias regression coefficients?

No, as long as the model is otherwise correctly specified. The OLS coefficients stay unbiased; what is wrong is their standard errors, and therefore the t values, p values and confidence intervals. That is why the standard fix, heteroscedasticity-consistent standard errors, leaves the coefficients exactly as they were and changes only the inference.

Which robust standard error should I use, HC0, HC1 or HC3?

HC3 for most psychology and health samples. Long and Ervin (2000) found that HC0, White's original, is too liberal in small samples and recommended HC3 for samples of 250 or fewer. HC1 is Stata's classic robust option, a simple degrees-of-freedom rescaling of HC0. Whichever you use, name it in the Method.

How do I report a Breusch-Pagan test in APA 7?

As a chi-square with its degrees of freedom and p value, naming the version: Koenker's studentized Breusch-Pagan test, χ²(2) = 24.17, p < .001. The degrees of freedom equal the number of predictors in the auxiliary regression. Follow it with what you did about it, usually HC3 standard errors.

Do I need to test for heteroscedasticity before using robust standard errors?

No. Long and Ervin (2000) advised against letting a screening test decide, because the tests have little power in small samples and flag trivial differences in large ones. Look at the residual plot, and if there is any reason to expect non-constant variance, use HC3 from the start and say so in the analysis plan.

Is heteroscedasticity the same as non-normality?

No. Normality concerns the shape of the residual distribution; homoscedasticity concerns whether its spread is constant across predicted values. You can have normal residuals with a funnel-shaped spread, or skewed residuals with constant spread. They often appear together, and a log transformation or a different model family can fix both at once.

Does your Method say which standard errors your regression used?

If the residual plot fans out and the paper reports classical errors without a word, a methods reviewer will ask. Better to find out before they do.

Run your paper through Previum →

With the residual plot checked, HC3 standard errors named in the Method and the evidence given once in the Results, heteroscedasticity stops being a threat and becomes one line in your analysis plan. When the question is harder, such as whether to model the variance, change the model family or handle clustered data, that is what my statistical consulting is for.

References

Breusch, T. S., & Pagan, A. R. (1979). A simple test for heteroscedasticity and random coefficient variation. Econometrica, 47(5), 1287–1294. https://doi.org/10.2307/1911963

Delacre, M., Lakens, D., & Leys, C. (2017). Why psychologists should by default use Welch's t-test instead of Student's t-test. International Review of Social Psychology, 30(1), 92–101. https://doi.org/10.5334/irsp.82

Hayes, A. F., & Cai, L. (2007). Using heteroskedasticity-consistent standard error estimators in OLS regression: An introduction and software implementation. Behavior Research Methods, 39(4), 709–722. https://doi.org/10.3758/BF03192961

Koenker, R. (1981). A note on studentizing a test for heteroscedasticity. Journal of Econometrics, 17(1), 107–112. https://doi.org/10.1016/0304-4076(81)90062-2

Long, J. S., & Ervin, L. H. (2000). Using heteroscedasticity consistent standard errors in the linear regression model. The American Statistician, 54(3), 217–224. https://doi.org/10.1080/00031305.2000.10474549

Welch, B. L. (1951). On the comparison of several mean values: An alternative approach. Biometrika, 38(3/4), 330–336. https://doi.org/10.2307/2332579

White, H. (1980). A heteroskedasticity-consistent covariance matrix estimator and a direct test for heteroskedasticity. Econometrica, 48(4), 817–838. https://doi.org/10.2307/1912934

Zeileis, A. (2004). Econometric computing with HC and HAC covariance matrix estimators. Journal of Statistical Software, 11(10), 1–17. https://doi.org/10.18637/jss.v011.i10

Cite this guide

Ciudad-Fernández, V. (2026, November 19). Heteroscedasticity: How to Detect, Fix and Report It. Ciudad Science. https://analisisdedatospsicologia.com/en/blog/heteroscedasticity-detect-fix-report

Keep reading

All blog articles