Why is $nS_X ^2/\sigma ^2$ $\chi ^2(n-1)$, while the other is $\chi^2(n)$?

487 Views Asked by At

Suppose $X_1,...,X_n$ is a random sample from a distribution having $N(\mu, \sigma^2)$. What is the conceptual difference between:

$$ \frac1{n} \sum_{i=1}^n (X_i - \bar{X})^2$$

and

$$ \frac1{n} \sum_{i=1}^n (X_i - \mu)^2 ?$$

And why, when multiplied by $n$ and divided by $\sigma ^2$, the first becomes a $\chi^2 (n-1)$ while the second $\chi^2 (n)$?