# Variance

## Definition

Given an integrable random variable [ilmath]X[/ilmath] we define the variance of [ilmath]X[/ilmath] as follows:

• $\text{Var}(X)=\mathbb{E}\left[(X-\mu)^2\right]$ where [ilmath]\mu[/ilmath] is the mean or expected value of [ilmath]X[/ilmath]

## Other forms

Theorem: $\text{Var}(X)=\mathbb{E}[X^2]-(\mathbb{E}[X])^2$

• $\text{Var}(X)=\mathbb{E}\left[(X-\mu)^2\right]$
$=\mathbb{E}\left[X^2-2X\mu+\mu^2\right]$
$=\mathbb{E}\left[X^2\right]-2\mu\mathbb{E}[X]+\mu^2$
But! $\mu=\mathbb{E}[X]$
$=\mathbb{E}\left[X^2\right]-2\mu^2+\mu^2$
$=\mathbb{E}\left[X^2\right]-\mu^2$
$=\mathbb{E}\left[X^2\right]-(\mathbb{E}[X])^2$

As required.