Ask unbiased estimator of $\sigma ^2$ in normal distribution when either $\mu$ known or $\mu$ unknown？ If $\mu$ is unknown, then $\frac{1}{n-1}  \sum_{i=1}^n (X_i - \overline X)^2$ is the unbiased estimator of $\sigma ^2$.
However, if $\mu$ is known, then $\frac{1}{n}  \sum_{i=1}^n (X_i - \mu)^2$ is the unbiased estimator of $\sigma ^2$.
I am very confused. From introductory statistics class, I know that given any random population, $E(S^2)$ is always equal to $\sigma ^2$. Hence, for a normal distribution, I think the sample variance = $\frac{1}{n-1}  \sum_{i=1}^n (X_i - \overline X)^2$ should always be unbiased.
 A: Of course if the mean is a known value it is self evident that it is better to use it instead of using an estimation of the mean...to understand if the "natural" estimator for $\sigma^2$ is biased / unbiased it is enough to calculate its expectation
$$\frac{1}{n}E(\Sigma_iX_i^2-2\mu\Sigma_iX_i+n\mu^2)=E(X^2)-2\mu^2+\mu^2=\sigma^2+\mu^2-2\mu^2+\mu^2=\sigma^2$$

Furthermore observe that you are in a Gaussian model, thus it is important to realize that
$$\frac{\Sigma_i(X_i-\overline{X}_n)^2}{\sigma^2}\sim \chi_{(n-1)}^2$$
while
$$\frac{\Sigma_i(X_i-\mu)^2}{\sigma^2}\sim \chi_{(n)}^2$$
A: The intuition is that if you have to estimate $\mu$ then $\overline{X}$ will be the minimizer of
$$f(m) = \sum_{i = 1}^n (X_i - m)^2.$$
To see this, set the derivative equal to $0$:
$$f'(m) = \sum_{i = 1}^n 2(X_i - m) = 0 \iff \left(\sum_{i = 1}^n X_i\right) - nm = 0.$$
But that means that if $\mu$ is the true mean
$$ \sum_{i = 1}^n (X_i - \overline{X})^2 \le \sum_{i = 1}^n (X_i - \mu)^2.$$
And so there is some bias introduced when we want to estimate $\sigma^2$, because $\sum_{i = 1}^n (X_i - \overline{X})^2$ is too small.
Well, it turns out that $\sum_{i = 1}^n (X_i - \overline{X})^2$ is too small by exactly a factor of $\frac{n - 1}{n}$.
In summary,
$$\mathbf{E}\left[ \frac{1}{n - 1} \sum_{i = 1}^n (X_i - \overline{X})^2 \right] = \mathbf{E}\left[ \frac{1}{n} \sum_{i = 1}^n (X_i - \mu)^2 \right] = \sigma^2.$$
Thus both
$$ \frac{1}{n - 1} \sum_{i = 1}^n (X_i - \overline{X})^2 \text{ and } \frac{1}{n} \sum_{i = 1}^n (X_i - \mu)^2$$
are unbiased estimators of $\sigma^2$. The second estimator is "better" in the sense that it's variance from $\sigma^2$ is smaller, but the catch is that one needs to know the true mean in order to use it.
