Canonical: https://knowlpedia.com/probability/variance/

# Variance

A measure of how spread out a random variable is around its mean.

A **variance** of a [random variable](https://knowlpedia.com/probability/random-variable/) \(X\) is the quantity
\[
\operatorname{Var}(X)=\mathbb E\big[(X-\mathbb E[X])^2\big],
\]
defined when \(\mathbb E[X^2]<\infty\) (so in particular the [expectation](https://knowlpedia.com/probability/expectation/) \(\mathbb E[X]\) is finite).

## Equivalent characterizations

Equivalently,
\[
\operatorname{Var}(X)=\mathbb E[X^2]-\big(\mathbb E[X]\big)^2.
\]

## Remarks

Variance is the second centered [moment](https://knowlpedia.com/probability/moment/) of \(X\). It is also the special case \(\operatorname{Var}(X)=\operatorname{Cov}(X,X)\) of [covariance](https://knowlpedia.com/probability/covariance/), and it is used to normalize [covariance](https://knowlpedia.com/probability/covariance/) into the [correlation coefficient](https://knowlpedia.com/probability/correlation-coefficient/).

## Examples

- If \(X\) is Bernoulli\((p)\) (so \(\mathbb P(X=1)=p\), \(\mathbb P(X=0)=1-p\)), then \(\operatorname{Var}(X)=p(1-p)\).
- If \(X\sim N(\mu,\sigma^2)\), then \(\operatorname{Var}(X)=\sigma^2\).
