Computational formula for the variance

From Wikipedia, the free encyclopedia

Jump to: navigation, search

In probability theory, the computational formula for the variance Var(X) of a random variable X is the formula

\operatorname{Var}(X) = \operatorname{E}(X^2) - (\operatorname{E}(X))^2\,

where E(X) is the expected value of X. This formula can be generalized for covariance:

\operatorname{Cov}(X_i, X_j) = \operatorname{E}(X_iX_j) -\operatorname{E}(X_i)\operatorname{E}(X_j)

as well as for the n by n covariance matrix of a random vector of length n:

 \operatorname{Var}(\mathbf{X}) = \operatorname{E}(\mathbf{X X^\top}) - \operatorname{E}(\mathbf{X})\operatorname{E}(\mathbf{X})^\top

and for the the n by m cross-covariance matrix between two random vectors of length n and m:


\operatorname{Cov}(\textbf{X},\textbf{Y})=
\operatorname{E}(\mathbf{X Y^\top}) - \operatorname{E}(\mathbf{X})\operatorname{E}(\mathbf{Y})^\top

where expectations are taken element-wise and \mathbf{X}=\{X_1,X_2,\ldots,X_n\} and \mathbf{Y}=\{Y_1,Y_2,\ldots,Y_m\} are random vectors of respective lengths n and m (not necessarily equal).

[edit] Proof

The computational formula for the variance follows in a straightforward manner from the linearity of expected values and the definition:

{}\operatorname{Var}(X)= (1/N)\sum\left\{\left[X_i - \operatorname{E}(X)\right]^2\right\}
{}\operatorname{Var}(X)= (1/N)\sum\left\{ X_i^2 - 2X_i\operatorname{E}(X) + \operatorname{E}(X)^2\right\}
{}\operatorname{Var}(X)= \sum( X_i^2)/N - \sum{2X_i\operatorname{E}(X)}
/N + \sum\operatorname{E}(X)^2/N
{}\operatorname{Var}(X)= \operatorname{E}(X^2) - 2\operatorname{E}(X)\operatorname{E}(X) + \operatorname{E}(X)^2
{}\operatorname{Var}(X)=\operatorname{E}(X^2) - \operatorname{E}(X)^2

This is often used to calculate the variance in practice.

[edit] Applications

Its applications in systolic geometry include Loewner's torus inequality.

[edit] See also


Personal tools