# Prove that $E (\overline{X} - \mu)^2 = \frac{1}{n}\sigma^2$

How to prove $E (\overline{X} - \mu)^2 = \frac{1}{n}\sigma^2$ (from wiki), where $\overline{X}$ - is the sample mean ?
What I have so far:

\begin{align} E (\overline{X} - \mu)^2 = \frac{1}{n}\sigma^2 &=\\ &= E (\overline{X}^2 + \mu^2 - 2\mu\overline{X}) = E(\overline{X}^2) - \mu^2 =\\ &= \frac{\sum_{i=1}^n\sum_{j=1}^n E (X_iX_j)}{n^2} - \mu^2 \end{align} Could you give me some tips how to proceed?

Let $\{X_i\}_{1\le i\le n}$ be $n$ independent random variables with mean $\mu$ and variance $\sigma^2$. We need 2 results

1) $var(aX_i) = a^2 \times var(X_i)$

2) $var(\sum_{i=1}^n X_i) = \sum_{i=1}^n var(X_i)$.

Also, Expectation is a linear operator. That is

${E}[aX+bY] = a{E}[X] + b{E}[Y]$

Hence, $E[\bar{X}] = E[\frac{\sum_{i=1}^n X_i}{n}] = \frac{1}{n}\sum_{i=1}^nE[X_i] = \frac{1}{n}\sum_{i=1}^n \mu = \mu\,.$

Hence, \begin{align} E(\bar{X}-\mu)^2 &= E(\bar{X} - E[\bar{X}])^2 = var(\bar{X}) \\ &=var\left(\frac{\sum_{i=1}^n X_i}{n}\right) \\ &=\frac{1}{n^2}var\left(\sum_{i=1}^n X_i\right) \\ &=\frac{1}{n^2}\sum_{i=1}^n var\left( X_i\right) \\ &=\frac{n\sigma^2}{n^2}\\ &=\frac{\sigma^2}{n} \end{align}

We know that $E(X^2) = [E(X)]^2 + \text{Var}(X)$, so \begin{align*} E((\overline{X} - \mu)^2) &= [E(\overline{X} - \mu)]^2 + \text{Var}(\overline{X} - \mu) \\ &= \text{Var}(\overline{X}) \\ &= \text{Var}\left(\frac{1}{n}(X_1 + \cdots + X_n) \right) \\ &= \frac{n\sigma^2}{n^2}, \end{align*} where we use the following: $$E(\overline{X}) = \mu, \qquad Var(a + X) = Var(X), \qquad \text{Var}(aX) = a^2\text{Var}(X),$$ and the independence of the $X_i$ so that the variance adds linearly.