---
tag: 3PS1JB7V95
kind: definition
name: Heteroscedasticity
msc: [62J05, 62J20]
defines: D8VX6XQ3TT
uses: [0PNRKMRC55, 0477R9PYAE, 0VGPX25NXQ, 41FVC4P5JB]
sources:
  - url: https://en.wikipedia.org/wiki/Homoscedasticity_and_heteroscedasticity
---

## Definition

Let $\varepsilon_1, \dots, \varepsilon_n$ be [[random variables|0PNRKMRC55]] with finite [[variances|0477R9PYAE]].
They are *homoscedastic* if $\operatorname{Var}(\varepsilon_1) = \cdots = \operatorname{Var}(\varepsilon_n)$, and *heteroscedastic* otherwise.

Now let $y_i = f(x_i) + \varepsilon_i$ be a regression model with random regressors $x_i$.
Its errors are *homoscedastic* if the [[conditional variance|0VGPX25NXQ]] $\operatorname{Var}(\varepsilon_i \mid x_i)$ is a constant $\sigma^2$, not depending on $x_i$.
They are *heteroscedastic* otherwise.

## Remarks

Example: let $x_i = i$ and $\varepsilon_i \sim N(0, \sigma^2 x_i^2)$ for $i = 1, \dots, n$ with $n \ge 2$ and $\sigma > 0$.
Then $\operatorname{Var}(\varepsilon_1) = \sigma^2 \ne 4 \sigma^2 = \operatorname{Var}(\varepsilon_2)$, so the errors are heteroscedastic.

Non-example: if $\varepsilon_i = x_i u_i$ with $u_i \sim N(0, 1)$ independent of $x_i$ and $x_i \in \set{-1, 1}$, then $\operatorname{Var}(\varepsilon_i \mid x_i) = x_i^2 = 1$ for all $i$, so the errors are homoscedastic, although they depend on $x_i$.

In [[linear regression|41FVC4P5JB]] with heteroscedastic, uncorrelated errors, the covariance of the least squares estimator is $(X^T X)^{-1} X^T \Omega X (X^T X)^{-1}$ with $\Omega = \operatorname{diag}(\operatorname{Var}(\varepsilon_i))$.
The heteroscedasticity-consistent estimator of White replaces $\Omega$ by $\operatorname{diag}(e_i^2)$, where $e_i$ are the residuals.
The spelling *heteroskedastic* is also used.
