Question about biased estimator Assume $X$ is a random variable from a population with normal distribution. Using the likelihood function I get the expression below: 
$$\hat{\sigma}_X^2 = \sum_{i=1}^n \frac{(X_i-\mu)^2} n$$
for variance.
I want prove that, $\operatorname{E}[\hat{\sigma}_X^2]=\frac{n-1} n \sigma_X^2$.
I begin ...
$$\operatorname{E}\left[\hat{\sigma}_X^2\right]=\dfrac 1 n \operatorname{E} \left[\sum_{i=1}^n (X_i-\mu)^2\right]$$
$$\frac 1 n \left( \operatorname{E}\left[(X_1-\mu)^2\right] + \operatorname{E}\left[(X_2-\mu)^2\right] + \cdots + \operatorname{E} \left[ \left( X_n-\mu \right)^2 \right]\right)$$
pdta: $\mu$ is a theorical mean (not estimator of mean)
 A: Hint: expand out $(X_i - \mu)^2 = X_i^2 - 2 X_i \mu + \mu^2$.  Now compute $E[X_i^2]$, $E[X_i \mu]$ and $E[\mu^2]$.  
EDIT: If $\mu$ is the actual mean rather than an estimator, then the statement is wrong: $E[(X_i - \mu)^2] = \sigma^2$ and $E[\hat{\sigma}_X^2] = \sigma^2$.
A: \begin{align}
E[\frac{1}{n}\sum_{i=1}^n (X_i-\bar X)^2]&= \frac1n \sum_{i=1}^n E[X_i -\bar X]^2\\
&=\frac1n \sum_{i=1}^n E[ (X_i -\bar X) (X_i -\bar X)]\\
&= \frac1n \sum_{i=1}^n E[X_i (X_i -\bar X)]- \bar X\sum_{i=1}^n  \space E[(X_i -\bar X)]\\
&= \frac1n \sum_{i=1}^n E[X_i (X_i- \bar X)]\\
&= \frac1n \sum_{i=1}^n E[{X_i}^2]- E[\bar X \space X_i] \\
&=\frac1n\left( \sum_{i=1}^n E[{X_i}^2]- \   E\left[\ \bar X \space\sum_{i=1}^nX_i\right]\right)\\
&=\frac1n\left( \sum_{i=1}^n E[{X_i}^2]- n E\left[ \bar X \space\sum_{i=1}^n \frac{X_i}
{n}\right]\right) \\
&=\frac1n\left( \sum_{i=1}^n E[{X_i}^2]- n E\left[ \bar X^2\right]\right) \\
&=\frac1n\left(n \sigma^2_x + n {\mu}^2- n \left[ \frac{\sigma^2_x}{n}+\mu^2\right] \right)\\
&=\frac{n-1}{n} \sigma^2_x\\
\end{align}
Note:


*

*$E[X^2]=\sigma^2 + \mu^2$

*$E[\bar X]=\mu$

*$\sigma^2_\bar x= \frac{\sigma^2_x}{n}$
