Does $\mathbb E[\sum_{i=1}^NX_i\mid N=m]=\sum_{i=1}^m \mathbb E[X_i]$

expected valueprobability

I'm always a bit confuse with this conditional expectation. Let $N$ a stopping time and $X_1,X_2,…$ random variables. Does $$\mathbb E\left[\sum_{i=1}^NX_i\ \Big|\ N=m\right]=\sum_{i=1}^m \mathbb E[X_i] \ \ ?$$
the fact that $N$ is a random variable confuse me a bit on the interpretation of $\sum_{i=1}^NX_i$ and the understanding of $\mathbb E\left[\sum_{i=1}^NX_i\ \Big|\ N=m\right]$

Best Answer

If $(\Omega,\mathcal{F},\mathsf{P})$ is a probability space, $A\in\mathcal{F}$ with $\mathsf{P}(A)>0$, and $X$ is a r.v., then $$ \mathsf{E}[X\mid A]=\frac{\mathsf{E}[X1_A]}{\mathsf{P}(A)}. $$

Applying this to your case and assuming that $\mathsf{P}(N=m)>0$, one gets $$ \mathsf{E}\left[\sum_{i=1}^N X_i\mid N=m\right]=\mathsf{E}\left[\sum_{i=1}^m X_i 1\{N=m\}\right]/\mathsf{P}(N=m). $$

If $N$ is independent of $\{X_i\}_{i\ge 1}$, then the RHS reduces to $\sum_{i=1}^m\mathsf{E}X_i$.

Related Question