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!
The identity you're looking for is
$$E[X] = \sum_{n \in \mathbb{N}} E[X \mid Y=n] P(Y=n).$$