<s>[INST] For what value of c is the estimator consistent? Suppose $X_1,\ldots,X_n$ are i.i.d. normally distributed with unknown mean $\mu$ and unknown variance $\sigma^2$. Let $\bar{X}_n$ be the sample mean.  Consider estimating $\sigma$.  For any given constant $c$, define the estimator\footnote{followed this video for both parts. In (ii) I use his calculation to shorten my shown work. https://www.youtube.com/watch?v=MqeS2NWB3I4}
\begin{equation*}
\hat{\sigma}_{n,c} = \frac{c}{n} \sum_{i=1}^n |X_i - \bar{X}_n|
\end{equation*}
\textbf{(i)} Compute $E(\hat{\sigma}_{n,c})$
\begin{equation*}
\begin{aligned}
& E[\hat{\sigma}_{n,c}] = E \left[ \frac{c}{n} \sum_{i=1}^{n} |X_i - \bar{X}_n| \right] \\
& =  \frac{c}{n} E \left[  \sum_{i=1}^{n} |X_i - \bar{X}_n| \right] \\
& =  \frac{c}{n}  E \left[ \sum_{i=1}^{n} \sqrt{ (X_i - \bar{X}_n)^2 } \right] \\
& =  \frac{c}{n}  E \left[ \sum_{i=1}^{n}  \sqrt{\left[(X_i - \mu) (\bar{X}_n - \mu)\right]^2} \right] \\
& =  \frac{c}{n}  E \left[   \sqrt{\sum_{i=1}^{n}(X_i - \mu)^2 - 2n(\bar{X}_n - \mu)^2 + n(X_i - \mu)^2} \right] \\
& =  \frac{c}{n}  \left[ \sqrt{ n\sigma^2 - nE((X_i - \mu)^2)}   \right] \\
& =  \frac{c}{n}  \left[\sqrt{ n\sigma^2 - n\frac{\sigma^2}{n}}   \right] \\ 
& \frac{c\sigma\sqrt{n-1}}{n}
\end{aligned}
\end{equation*}
\textbf{(ii)} For what $c$ is $\hat{\sigma}_{n,c}$ a consistent estimator of $\sigma$. Explain.\
\
\indent We know that the estimator is consistent if  $lim_{n \to \infty}Var(\hat{\sigma}_{n,c}) = 0$. So we show:
\begin{equation*}
\begin{aligned}
& \operatorname{Var}(\hat{\sigma}_{n,c}) = \operatorname{Var} \left( \frac{c}{n} \sum_{i=1}^{n} |X_i - \bar{X}_n| \right) \\
& = E\left[\left( \frac{c}{n} \sum_{i=1}^{n} |X_i - \bar{X}_n| \right)^2 \right] - E\left[ \frac{c}{n} \sum_{i=1}^{n} |X_i - \bar{X}_n| \right] ^2 \\
& = \frac{c}{n} E\left[ \left( \sqrt{ (X_i - \bar{X}_n)^2} \right)^2 \right] - \frac{c^2\sigma^2(n-1)}{n^2} = \\
& \text{saving space by citing the proof from the video here}\\
& =  \frac{c\sigma^2}{n} - \frac{c^2\sigma^2(n-1)}{n^2} \\
& \sigma^2 \left[ \frac{c}{n} - \frac{c^2(n-1)}{n^2}  \right]
\end{aligned}
\end{equation*}
 [/INST] Notice that $\operatorname E(X_i-\overline X) = 0$ and
\begin{align}
\operatorname{var}(X_i-\overline X) & = \operatorname{var}(X_i) + \operatorname{var}(\overline X) - 2\operatorname{cov}(X_i,\overline X) \\[8pt]
& = \sigma^2 + \frac{\sigma^2} n - \frac{2\sigma^2} n \\[8pt]
&= \frac{n-1} n \sigma^2.
\end{align}
So
\begin{align}
\operatorname E\big( |X_i - \overline X| \big) & = \frac 1 {\sqrt{2\pi}} \int_{-\infty}^{+\infty} \sqrt{\frac{n-1} n}\cdot\sigma|z| e^{-z^2/2} \, dz \\[12pt]
& = \sigma\sqrt{\frac{n-1}{2\pi n}} \cdot 2 \int_0^{+\infty} e^{-z^2/2} (z \, dz) \\[10pt]
& = 2\sigma \sqrt{\frac{n-1}{2\pi n}} \int_0^{+\infty} e^{-u} \, du \\[8pt]
& = 2\sigma \sqrt{\frac{n-1}{2\pi n}}.
\end{align}
</s>