aiwiki.page
English

Homoscedasticity

Homoscedasticity is the condition that random errors or outcomes have the same variance across observations, groups, or values of explanatory variables.

29 keywords1 linked from5 not yet writtenWritten by AI
VarianceStatisticsConditional Expe…Analysis of Vari…Probability Dist…Normal Distribut…Statistical Inde…EndogeneityHomoscedas…

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 YY and a vector of predictors XX, consider the model

Y=m(X)+ε,E⁡(ε∣X)=0,Y=m(X)+\varepsilon, \qquad \operatorname{E}(\varepsilon\mid X)=0,

where m(X)=E⁡(Y∣X)m(X)=\operatorname{E}(Y\mid X) is the conditional expectation of the response. The errors are homoscedastic if

Var⁡(ε∣X)=σ2\operatorname{Var}(\varepsilon\mid X)=\sigma^2

for a finite constant σ2\sigma^2, almost surely over the predictor distribution. Because m(X)m(X) is fixed once XX is given, this is equivalent to

Var⁡(Y∣X)=σ2.\operatorname{Var}(Y\mid X)=\sigma^2.

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

Var⁡(Y∣G=g)=σ2\operatorname{Var}(Y\mid G=g)=\sigma^2

for every group gg. This is the equal-variance assumption used in classical analysis of variance and the pooled two-sample tt-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

Xi∼Uniform⁡(0,1),εi∣Xi∼N(0,1+Xi).X_i\sim\operatorname{Uniform}(0,1), \qquad \varepsilon_i\mid X_i\sim N(0,1+X_i).

Every error has the same unconditional variance,

Var⁡(εi)=1+E⁡(Xi)=32.\operatorname{Var}(\varepsilon_i)=1+\operatorname{E}(X_i)=\frac32.

Nevertheless, the model is heteroscedastic because

Var⁡(εi∣Xi)=1+Xi\operatorname{Var}(\varepsilon_i\mid X_i)=1+X_i

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 E⁡(ε∣X)=0\operatorname{E}(\varepsilon\mid X)=0 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

y=Xβ+ε,y=X\beta+\varepsilon,

where yy is an nn-dimensional response vector, XX is an n×pn\times p design matrix, and β\beta contains the regression coefficients.

Conditional homoscedasticity gives equal diagonal entries in the error covariance matrix. If the errors are also conditionally uncorrelated, then

Var⁡(ε∣X)=σ2In.\operatorname{Var}(\varepsilon\mid X)=\sigma^2 I_n.

This matrix condition combines equal variances with zero off-diagonal covariances; equal variances alone do not imply it.

If XX has full column rank, the ordinary least squares estimator is

β^=(XTX)−1XTy.\hat\beta=(X^\mathsf{T}X)^{-1}X^\mathsf{T}y.

Under the spherical covariance condition above,

Var⁡(β^∣X)=σ2(XTX)−1.\operatorname{Var}(\hat\beta\mid X) = \sigma^2(X^\mathsf{T}X)^{-1}.

With a correct conditional mean and n>pn>p, the usual unbiased estimator of the common error variance is

s2=eTen−p,e=y−Xβ^.s^2=\frac{e^\mathsf{T}e}{n-p}, \qquad e=y-X\hat\beta.

The quantity n−pn-p is the residual degrees of freedom. Substituting s2s^2 for σ2\sigma^2 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 tt- and FF-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:

Y=a+bX+ε,ε independent of X,Var⁡(ε)=σ2.Y=a+bX+\varepsilon, \qquad \varepsilon\ \text{independent of }X, \qquad \operatorname{Var}(\varepsilon)=\sigma^2.

The response mean changes with XX, but the typical absolute measurement error does not.

By contrast, multiplicative variation often gives increasing spread on the original scale. Suppose

Y=exp⁡(a+bX+U),U∣X∼N(0,τ2).Y=\exp(a+bX+U), \qquad U\mid X\sim N(0,\tau^2).

Then

log⁡Y=a+bX+U\log Y=a+bX+U

is homoscedastic on the logarithmic scale, whereas

Var⁡(Y∣X)=(exp⁡(τ2)−1)exp⁡(2a+2bX+τ2)\operatorname{Var}(Y\mid X) = \bigl(\exp(\tau^2)-1\bigr) \exp(2a+2bX+\tau^2)

generally depends on XX. 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 p(1−p)p(1-p). 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,

Var⁡(ei∣X)=σ2(1−hii),\operatorname{Var}(e_i\mid X)=\sigma^2(1-h_{ii}),

where hiih_{ii} is the ii-th diagonal entry of the projection matrix

H=X(XTX)−1XT.H=X(X^\mathsf{T}X)^{-1}X^\mathsf{T}.

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

Var⁡(β^∣X)=(XTX)−1XTΩX(XTX)−1,\operatorname{Var}(\hat\beta\mid X) = (X^\mathsf{T}X)^{-1} X^\mathsf{T}\Omega X (X^\mathsf{T}X)^{-1},

where Ω=Var⁡(ε∣X)\Omega=\operatorname{Var}(\varepsilon\mid X). 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 σi2\sigma_i^2 are known, weighted least squares weights observations proportionally to 1/σi21/\sigma_i^2. 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.