I have here this homework and I am really not sure which way should I follow.
Let $X_1, ... ,X_n$ be independent RV having the same distribution with a mean $\mu$ and variance $\sigma^2$ Let $ \bar X =(X_1 + ... + X_n)/n $ Show, that $\mathbb E\left(\sum\limits^n_{i=1}(X_i- \bar X)^2\right)=(n-1)\sigma^2 $
I added and subtracted $\mu$ from the inside of the sum $$\mathbb E\left(\sum^n_{i=1}(X_i-\mu + \mu - \bar X)^2\right)$$
I attached those $\mu$ to each X and I multiplied the parentheses
$$\mathbb E\left(\sum^n_{i=1}((X_i-\mu)^2-2(X_i-\mu)(\bar X-\mu) + (\bar X-\mu)^2)\right)$$
And I don't know now what am I looking for.
Could you please provide me some hint?
You have
$ E \left( \sum_{i=1}^n \left[(X_i-\mu_x)^2 -2(X_i-\mu)(\overline X- \mu)+(\overline X- \mu_x)^2 \right]\right)$
Assign the sigma sign to each summand in the brackets. And $(\overline X- \mu)$ is Independent of i. Therefore it can be written in front of the sigma sign.
$= E \left( \sum_{i=1}^n (X_i-\mu)^2 -2(\overline X- \mu)\sum_{i=1}^n (X_i-\mu)+(\overline X- \mu)^2\sum_{i=1}^n 1 \right)$
$= E \left( \sum_{i=1}^n (X_i-\mu)^2 -2(\overline X- \mu)\sum_{i=1}^n (X_i-\mu_x)+n(\overline X- \mu)^2 \right)$
$= E \left( \sum_{i=1}^n (X_i-\mu)^2 -2n(\overline X- \mu)^2+n(\overline X- \mu)^2 \right)$
$= E \left( \sum_{i=1}^n (X_i-\mu)^2 -n(\overline X- \mu)^2 \right)$
$= \left[ \sum_{i=1}^n E \left( (X_i-\mu)^2 \right) -nE \left((\overline X- \mu)^2 \right)\right]$
Now we know two facts:
1) $E \left( (X_i-\mu)^2 \right)=\sigma^2$
2) $E \left( (\overline X-\mu)^2 \right)=\frac{\sigma^2}{n}$
With this it is just one step to get $(n-1)\sigma^2$.