[Math] expected value of random variable times sample mean

expectationprobabilitystatistical-inference

Assume a population of $M$ numbers, where $M_i$ have values $y_i$, $i = 1,2,…,k$; thus $\sum_{i=1}^k{M_i} = M$. Thus the population mean is
$\mu = \sum_{i=1}^k{\frac{M_iy_i}{M}}$
and the population variance is:
$\sigma^2 = \sum_{i=1}^k{\frac{M_i(y_i-\mu)^2}{M}}$
Let $X_1, X_2, …, X_n$, $n\le M$ be $n$ values selected at random, without replacement, from the population

Given an $X_i$, how would you evaluate:

$E[X_i\bar{X}] = E[X_i\sum_{i=1}^n{\frac{1}{n}{X_i}}]$

This is part of a larger problem I'm working on, where I'm trying to evaluate $E[S^2]$, where $S^2$ is:
$S^2 = \frac{1}{n-1}\sum_{i=1}^n(X_i-\bar{X})^2$

unfortunately when working out the expression for $E[S^2]$, I got to a step where I needed to evaluate $E{\left[X_i\bar{X}\right]}$ and I got stuck

Best Answer

How do you evaluate $E[X_i\bar{X}]$?

The simple answer is: you don't.

At some point in the derivation of the expected value of the sample variance $S^2$, one usually has written something equivalent to $$ \mathbb E \left[ \sum_{i=1}^n X_i^2 - 2 \sum_{i=1}^n X_i\bar X + \sum_{i=1}^n \bar X^2 \right]. $$

You may be tempted to apply the sum-of-expectations formula to the middle term, $$ \mathbb E \left[\sum_{i=1}^n X_i\bar X\right] = \sum_{i=1}^n \mathbb E \left[X_i\bar X\right] $$ and then look at each term in the summation on the right individually, but a better way is to remember that $$ \bar X = \frac 1n \sum_{i=1}^n X_i, $$ or equivalently, $$ \sum_{i=1}^n X_i = n \bar X. $$ Recognizing that $\bar X$ has the same value in each of the terms $X_i \bar X$, we can take it out of the sum as a constant factor: $$ \sum_{i=1}^n X_i \bar X = \bar X \sum_{i=1}^n X_i. $$

So now we can write $$ \mathbb E \left[\sum_{i=1}^n X_i\bar X\right] = \mathbb E \left[\bar X\sum_{i=1}^n X_i\right] = \mathbb E \left[\bar X\left(n \bar X\right)\right] = \mathbb E \left[n \bar X^2\right] = n \mathbb E \left[\bar X^2\right], $$ and we no longer see the individual $X_i \bar X$ terms.