Homoscedasticity is the property that a specified variance remains constant across observations, groups, or values of explanatory variables. In statistics, it most often describes the errors in a regression model: their conditional variance does not depend on the predictors. Its opposite is heteroscedasticity, in which that variance changes. Homoscedasticity is an important assumption behind conventional regression standard errors and several classical statistical tests, but it is distinct from assumptions about normality, independence, or the correctness of a model’s conditional mean.
Definition
For a response variable and a vector of predictors , consider the model
where is the conditional expectation of the response. The errors are homoscedastic if
for a finite constant , almost surely over the predictor distribution. Because is fixed once is given, this is equivalent to
Thus, the spread around the conditional mean is constant even if the mean itself changes substantially with the predictors.
For grouped data, homogeneity of variance usually means
for every group . This is the equal-variance assumption used in classical analysis of variance and the pooled two-sample -test.
Equal variances do not imply identical probability distributions. Groups can have different means, skewness, or tail behavior while sharing the same variance. Conversely, the concept requires that the relevant variance exist; it does not apply in the usual sense to distributions with undefined variance.
Conditional versus unconditional variance
In regression, the relevant assumption is generally conditional homoscedasticity, not merely equality of unconditional variances.
For example, suppose independent observations satisfy
Every error has the same unconditional variance,
Nevertheless, the model is heteroscedastic because
increases with the predictor. Equality of variance across observation indices is therefore not enough to establish constant conditional variance.
The conditioning information matters more generally. A process can have constant variance when averaged over time or across a population, yet exhibit changing variance conditional on past observations or subgroup membership.
Distinction from other assumptions
Homoscedasticity concerns only a second-moment property.
- Normality: Homoscedastic errors need not follow a normal distribution. Normally distributed errors can also be heteroscedastic if their variances differ.
- Independence: Constant variance does not imply statistical independence. Errors can have equal variances while remaining correlated.
- Zero conditional mean: The condition is separate. Constant variance does not prevent omitted-variable problems or endogeneity.
- Correct mean specification: A model can have constant error variance but an incorrectly specified regression function.
- Stationarity: In a time series, constant variance alone does not establish stationarity, which imposes additional restrictions on means, dependence, or full joint distributions.
These distinctions are important because procedures that address unequal variances do not automatically correct dependence or an incorrect mean model.
Role in linear regression
In linear regression, the sample model is written
where is an -dimensional response vector, is an design matrix, and contains the regression coefficients.
Conditional homoscedasticity gives equal diagonal entries in the error covariance matrix. If the errors are also conditionally uncorrelated, then
This matrix condition combines equal variances with zero off-diagonal covariances; equal variances alone do not imply it.
If has full column rank, the ordinary least squares estimator is
Under the spherical covariance condition above,
With a correct conditional mean and , the usual unbiased estimator of the common error variance is
The quantity is the residual degrees of freedom. Substituting for yields the conventional coefficient standard errors.
Efficiency and inference
The Gauss–Markov theorem states that, under the linear model, zero conditional mean, full column rank, and spherical error covariance, ordinary least squares has the smallest covariance matrix among linear unbiased estimators. Normality is not required for this result.
If errors are also conditionally jointly normal, conventional - and -statistics have their exact finite-sample reference distributions. Without normality, corresponding inference may still be approximately valid under suitable large-sample conditions.
Heteroscedasticity alone does not make ordinary least squares biased. Under appropriate exogeneity and regularity conditions, it remains unbiased or consistent. What generally fails is the conventional covariance formula, and ordinary least squares need not retain its minimum-variance property. Consequently, conventional confidence intervals and tests can be miscalibrated.
Examples and scale dependence
An additive measurement model may reasonably use constant variance:
The response mean changes with , but the typical absolute measurement error does not.
By contrast, multiplicative variation often gives increasing spread on the original scale. Suppose
Then
is homoscedastic on the logarithmic scale, whereas
generally depends on . Homoscedasticity is therefore a property of a specified model and measurement scale, not an intrinsic property of a dataset independent of its representation.
Some response distributions naturally link variance to the mean. In a Poisson distribution, the variance equals the mean. In a Bernoulli distribution, it is . Generalized linear models explicitly accommodate such mean–variance relationships rather than imposing constant response variance.
Assessment
Residual diagnostics
Plots of residuals against fitted values or predictors are commonly used to examine whether the spread changes. A roughly uniform vertical spread is compatible with homoscedasticity; a funnel or fan pattern suggests heteroscedasticity.
Residuals are not the same as unobserved errors. Even under a correctly specified homoscedastic linear model,
where is the -th diagonal entry of the projection matrix
Thus, raw residuals do not themselves have exactly equal variances when leverage differs. Standardized or studentized residuals account for this leverage dependence.
Apparent changes in residual spread can also reflect an incorrect mean function, unusual observations, or omitted groups. A residual plot does not uniquely identify the cause.
Formal tests
Several procedures test constant variance:
- The Breusch–Pagan test examines whether squared residuals are related to specified predictors. Its original form uses a normality-based calibration; a studentized version relaxes that requirement.
- The White test uses an auxiliary regression that can include predictors, their squares, and interactions, allowing a broader range of variance patterns.
- Levene’s test assesses equality of variances across groups using absolute deviations from group centers. The median-centered Brown–Forsythe variant is less sensitive to nonnormality than the mean-centered version.
These are forms of statistical hypothesis testing, not proofs of equal variance. Failure to reject can reflect limited sample size or statistical power. Conversely, a very large sample may detect variance differences too small to materially affect a particular analysis. Test behavior can also depend on distributional assumptions and correct specification of the conditional mean.
Methods when variance is unequal
Different methods address different consequences of heteroscedasticity.
Heteroscedasticity-consistent covariance estimation. For conditionally uncorrelated observations, the general ordinary least squares covariance is
where . Heteroscedasticity-consistent standard errors estimate this covariance using squared residuals, with several finite-sample corrections. They leave the coefficient estimates unchanged and generally support asymptotic rather than exact finite-sample inference. Ordinary heteroscedasticity-consistent estimators do not by themselves address serial correlation or clustering.
Weighted least squares. When conditional variances are known, weighted least squares weights observations proportionally to . Under uncorrelated errors, this can improve efficiency. Estimated weights produce feasible weighted least squares, whose properties depend on the variance model and estimation procedure.
Transformations and distributional modeling. Logarithms or other variance-stabilizing transformations may make constant variance more plausible, but they also change the modeled quantity and coefficient interpretation. Alternatively, a model can explicitly represent a mean-dependent variance.
Unequal-variance group comparisons. Welch-type tests allow unequal group variances without pooling them into a common variance estimate.
The appropriate treatment depends on whether the objective is coefficient inference, efficient estimation, group comparison, or prediction. Robust coefficient standard errors do not estimate how the spread of individual future outcomes changes with the predictors; constructing conditional prediction intervals generally requires additional assumptions or a model for that spread.