# A summation inside of the expected value operator

Here is part of the solution to my homework, which I could not wrap my head around. Given are $X_n$ random variables n = 1,2,...,N which are independent and Gaussian distributed with known mean $\mu$ and variance $\sigma^2$. Also given is an estimator for the mean value: ${\hat\mu} = \frac{1}{N}\sum_{n=1}^{N}x(n)$.

And then we have the following: $\operatorname{E}[(X_n - \mu)(\hat\mu - \mu)] = \operatorname{E}[(X_n - \mu)\frac{1}{N}\sum_{n=1}^{N}(X_n - \mu)] = \frac{1}{N}Var(X_n) = \frac{1}{N}\sigma^2$

It seems as if inside the expectation: $\sum_{n=1}^{N}(X_n - \mu)$ equals $(X_n - \mu)$. Does this make sense? What am I missing?

-
Is that really the solution as written out by your instructor? – cardinal May 28 '12 at 18:14

and the covariance of the terms in the summation are all equal to zero (by independence) except when $n = j$, in which case we get $\mbox{Var}(X_n)$. Part of the problem with the solution as written is that it is using the same index for the particular $X_n$ and as the summation index $\sum_n (X_n - \mu)$.