# Bias in estimators of population variance

Let $$\{ X_i | i = 1, 2, . . . ,n \}$$ be a sequence of independent and identically distributed (IID) random variables from a population and define $$\mu \equiv \mathbb{E}(X)$$ and $$\sigma^2 \equiv \mathbb{V}(X)$$. Suppose we think that the mean is $$\mu = \mu_0$$ for some number $$\mu_0$$ (but we may be wrong). Find the bias in the estimator:

$$\tilde{\sigma}^2 \equiv \frac{1}{n} \sum_{i=1}^n (X_i - \mu_0)^2,$$

as a function of $$\mu$$. When is this estimator unbiased for $$\sigma^2$$?

I know that when we find this estimator using $$\bar{X}$$, it is biased and we must divide it by $$n-1$$ instead of $$n$$ to get an unbiased estimator. But how does one do it for a number such as $$\mu_0$$?

• Use the definition of bias. This looks like it should be marked as self-study. Commented Nov 6, 2018 at 23:45

\begin{align}E(\hat\sigma^2)&=E(\frac 1n(\sum_{i=1}^n (X_i-\mu_0)^2)\\ &=E(\frac 1n(\sum_{i=1}^n (X_i-\mu + \mu -\mu_0)^2) \\ &= E(\frac 1n(\sum_{i=1}^n (X_i-\mu)^2 + (\mu -\mu_0)^2 +2((X_i-\mu)(\mu -\mu_0))) \\ &= \frac 1n \left\{E(\sum_{i=1}^n (X_i-\mu)^2) + nE((\mu -\mu_0)^2) +2E(\sum_{i=1}^n(X_i-\mu)(\mu -\mu_0))\right \}\\ &= \sigma^2 + (\mu -\mu_0)^2 \end{align}
So the bias is $$(\mu -\mu_0)^2$$. When $$\mu_0 = \mu$$, the estimator is unbiased.
• @Ben Yes you're right, I did not realise that $\mu$ denotes population mean. Commented Nov 7, 2018 at 0:22