Conditional Expectation: Sum inside or outside of expectation?

846 Views Asked by At

Let $X,Y$ be some discrete random variables with $Y$ taking values in $\mathbb{N}$ and consider $\mathbb{E}[X]$.

Since it is sometimes easier to consider the expectation conditioned on a certain value of $Y$, we want to get

$$\mathbb{E}[X]=\sum_{n \in \mathbb{N}}\mathbb{P}[Y=n] \mathbb{E}[X \mid Y=n].$$

Because in some other place we have considered

$$\mathbb{E}[X \cdot 1(Y < \infty)] = \mathbb{E}[X \sum_{n=0}^{\infty} 1(Y=n)] \overset{DCT}{=} \sum_{n=0}^{\infty} \mathbb{E}[X \cdot 1(Y=n)]$$

Isn't this the "same" - so for conditioning on $Y$ we actually need Dominated convergence theorem (DCT)? I wonder whether this is directly true (also the case for non-discrete random variables $Y$?)?

I would really appreciate if you could tell me (on an easy level) how to condition on a second random variable $Y$ when considering the expectation.

Thank you very much!

2

There are 2 best solutions below

2
On

The identity you're looking for is

$$E[X] = \sum_{n \in \mathbb{N}} E[X \mid Y=n] P(Y=n).$$

0
On

You are missing a factor $\mathbb{P}\{Y=n\}$ in the sum, in your first formula.

As a sanity check, look at the case where $X$ and $Y$ are independent: the conditioning in the expectation disappears, the $\mathbb{E}[X]$ can be factored out of the sum, so the remaining summation must sum to one.