# 统计学入门|Introduction to Statistics代写 STAT 515

To determine the expected value of a chi-squared random variable, note first that for a standard normal random variable $Z$,
\begin{aligned} 1 &=\operatorname{Var}(Z) \ &=E\left[Z^{2}\right]-(E[Z])^{2} \ &=E\left[Z^{2}\right] \quad \text { since } E[Z]=0 \end{aligned}
Hence, $E\left[Z^{2}\right]=1$ and so
$$E\left[\sum_{i=1}^{n} Z_{i}^{2}\right]=\sum_{i=1}^{n} E\left[Z_{i}^{2}\right]=n$$

The expected value of a chi-squared random variable is equal to its number of degrees of freedom.

Suppose now that we have a sample $X_{1}, \ldots, X_{n}$ from a normal population having mean $\mu$ and variance $\sigma^{2}$. Consider the sample variance $S^{2}$ defined by
$$S^{2}=\frac{\sum_{i=1}^{n}\left(X_{i}-\bar{X}\right)^{2}}{n-1}$$

If the population mean $\mu$ is known, then the appropriate estimator of the population variance $\sigma^{2}$ is
$$\frac{\sum_{i=1}^{n}\left(X_{i}-\mu\right)^{2}}{n}$$
If the population mean $\mu$ is unknown, then the appropriate estimator of the population variance $\sigma^{2}$ is
$$S^{2}=\frac{\sum_{i=1}^{n}\left(X_{i}-\bar{X}\right)^{2}}{n-1}$$
$S^{2}$ is an unbiased estimator of $\sigma^{2}$, that is,
$$E\left[S^{2}\right]=\sigma^{2}$$