I am trying to show that the sample variance is an unbiased estimator of $\lambda$ for a Poisson distribution.
Let $(X_1, \dots, X_n)$ be a random sample from a Poisson distribution with mean $\lambda > 0$.
The sample variance is given as
$$S^2 = \dfrac{\sum_{i=1}^{n}(X_i - \bar{X})^2}{n-1}$$
For $S^2$ to be an unbiased estimator, I need to show that $\mathbb{E}[S^2] = \lambda$
My attempt:
I know that $\mathbb{E}[\bar{X}] = \lambda$ and $\sum_{i=1}^{n}{X_i} \sim \text{Poisson}(n\lambda)$
Using linearity of expectations as in this similar question:
$$ \begin{align*} \mathbb{E}[S^2] &= \mathbb{E}\left[ \dfrac{\sum_{i=1}^{n}(X_i - \bar{X})^2}{n-1} \right] \\ &= \dfrac{1}{n-1}\mathbb{E} \left[ \sum_{i=1}^{n} \left( {X_{i}}^{2} + {\bar{X}}^2 - 2X_i\bar{X} \right) \right] \\ &= \dfrac{1}{n-1} \left( n \lambda^2 + \lambda^2 - 2\lambda^2 \right) \\ &= \dfrac{1}{n-1}(n + 1 -2) \lambda^2 \\ &= \dfrac{1}{n-1} (n-1) \lambda^2 \\ &= \lambda^2 \end{align*} $$
I end up with $\lambda^2$ but I need to end up with $\lambda$ to show that $S^2$ is an unbiased estimator of $\lambda$. Where have I gone wrong?
\begin{align} &E\left[\sum_{i=1}^n(X_i^2+\bar X^2-2X_i\bar X)\right] \&=\sum_{i=1}^nE(X_i^2)-nE(\bar X^2) \&=n(\lambda+\lambda^2)-n\left(\frac{\lambda}{n}+\lambda^2\right) \&=n\lambda-\lambda \end{align}
– StubbornAtom Aug 17 '18 at 19:45