# Proof that $\mathbb{E}(S_n ^2) = \sigma ^2$

If $X_i$ iid with variance $\sigma$ then I want to prove that $S_n^2 = \frac{1}{n-1}\sum_{i=1}^{n}(X_i -\bar X_n )^2$ is an unbiased estimate of the variance $\sigma$. So here I go:

\begin{aligned} \mathbb{E}(S_n ^2)&= \frac{1}{n-1}\sum_{i=1} ^{n} \mathbb{E}(X_i -\bar X_n )^2\\ &= \frac{1}{n-1}\sum_{i=1} ^{n} \mathbb{E}(X_i^2 -2X_i\bar X_n + \bar X_n^2) \\ &= \frac{1}{n-1}\sum_{i=1} ^{n} \mathbb{E}(X_i^2 -\frac{2}{n}X_i ^2 -\frac{2}{n}\sum_{j\neq i} X_i X_j + \bar X_n^2)\\ &= \frac{1}{n-1}\left\{ (n-2)\mathbb{E}(X_1 ^2) -\frac{2}{n}\sum_{i=1} ^{n}\sum_{j\neq i}\mathbb{E}(X_i)\mathbb{E}(X_j) + \sigma ^2 + \mathbb{E}(X_1)^2 \right\} \end{aligned} where I used the fact that for $X_i$, $X_j$ independent we have $\mathbb{E}(X_i X_j) = \mathbb{E}(X_i)\mathbb{E}X_j)$ and that $\mathbb{E}(\bar X_n ^2) = \frac{\sigma^2 + \mathbb{E}(X_1)^2}{n}$. Finally, after rearranging the first and last terms:

\begin{aligned} \mathbb{E}(S_n ^2) &= \frac{1}{n-1}\left\{ (n-1)\mathbb{E}(X_1 ^2) -\frac{2}{n}n(n-1)\mathbb{E}(X_1)^2 \right\}\\ &= \mathbb{E}(X_1 ^2) -2\mathbb{E}(X_1)^2\\ &\neq \mathbb{E}(X_1 ^2) -\mathbb{E}(X_1)^2 \end{aligned}

I'm off by a factor $2$. Can someone help me point out my mistake?

• The computation dramatically simplifies if you compute $var(S_n)$ – Thomas Dec 31 '16 at 15:15
• $E(\overline X_n^2)=\sigma^2/n +E(X_1)^2$. So $\sum_{i=1}^n(...)=\sigma^2+nE(X_1)^2$. You wrote $\sigma^2+E(X_1)^2$ – Landon Carter Dec 31 '16 at 15:17
• Yes you are right! thanks a lot – fricadelle Dec 31 '16 at 16:08
• @Thomas Hmm, why? And what is $S_n$ in the first place? – Did Jan 1 '17 at 21:46
• $E((X_i- {\bar X_n})^2)= \sigma^2 (X_i- {\bar X_n})$, then use independance of $X_i's$.... – Thomas Jan 9 '17 at 15:49

## 1 Answer

Where you have $\displaystyle\sum_{i=1}^n \sum_{j\ne i}$ should you be summing over all ordered pairs $(i,j)$ with $j\ne i$, or over all unordered pairs? Whether the $2$ belongs there depends on how you answer that. You can do it one way with the $2$ and the other way without the $2$.

• I added an extra step: $-2X_i\bar X_n = -\frac{2}{n}X_i ^2 -\frac{2}{n}\sum_{j\neq i} X_i X_j$ which is completely unnecessary. But if you go this way and use Landon Carter's comment then you end up with the correct answer. – fricadelle Jan 2 '17 at 11:29