# 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

The missing part of the solution is

\begin{align*} E\left((X_n - \mu) \sum_j (X_j - \mu)\right) = E\left(\sum_j (X_n - \mu)(X_j - \mu) \right) \\ = \sum_j E[(X_n - \mu)(X_j - \mu)] = \sum_j \mbox{Cov}(X_j, X_n) \end{align*}

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)$.

Note also that the Gaussian assumption is irrelevant; all that matter is that the variance exists.

-
(+1) As written, the "solution" is a pedagogical nightmare, not only from the bizarre use of the same indexing variable but also from leaving out the important steps and concepts for arriving at the solution. –  cardinal May 28 '12 at 18:27
Like @cardinal said. –  Did May 28 '12 at 18:55
guy, thanks for your reply! Helped a lot. :) –  Marin May 28 '12 at 19:49