Let $\langle X, Y\rangle$ be a random vector such that $X$ has finite expected value and $Y$ is discrete with values $0.1, \cdots $ such that $\mathbb P (Y = n)> 0$ for $n = 0.1, \cdots$ Show that
$$\mathbb E(X)=\sum_{n=0}^\infty \mathbb E(X\mid Y)\mathbb P(Y=n)$$ Why?
First, note that $E[X]=E[E[X|Y]]$ by the tower property of conditional expectations.
Note that
$$ E[X|Y=n] = \frac{\int {\bf 1}_{(Y=n)}X(\omega)dP(\omega)}{\int {\bf 1}_{(Y=n)}dP(\omega)}= \frac{\int {\bf 1}_{(Y=n)}X(\omega)dP(\omega)}{P(Y=n)} $$ which is a numerical value for each $n$ and represents the average of $X$ over the set $(Y=n)$.
And, $E[X|Y]$ is a random variable. We can define a version (P-a.e. equal) of $E[X|Y]$ by $$ E[X|Y](\omega) = E[X|Y=n] \qquad for \qquad \omega\in (Y=n) $$
Thus, $$ E[X|Y](\omega) =\sum_{n=0}^{\infty} E[X|Y=n] {\bf 1}_{(Y=n)}(\omega) $$
Now, \begin{eqnarray*} E[X] &=& E[E[X|Y]]\\ &=& E\left[\sum_{n=0}^{\infty} E[X|Y=n] {\bf 1}_{(Y=n)}\right]\\ &=& \sum_{n=0}^{\infty} E[X|Y=n] E\left[{\bf 1}_{(Y=n)}\right]\\ &=& \sum_{n=0}^{\infty} E[X|Y=n] P(Y=n) \end{eqnarray*}