Let $Y$ be a discrete random variable, independent of $X$, and $\varphi : \mathbb{R}^2 \rightarrow \mathbb{R}$ be a bounded function. Show that $$\mathbb{E}(\varphi(X, Y)) = \sum_{i=0}^{+\infty} p_i \mathbb{E}\left(\varphi\left(x_i, Y\right)\right)$$
Let $Y$ be a discrete random variable, independent of $X$, and $\varphi : \mathbb{R}^2 \rightarrow \mathbb{R}$ be a bounded function. Show that
$$\mathbb{E}(\varphi(X, Y)) = \sum_{i=0}^{+\infty} p_i \mathbb{E}\left(\varphi\left(x_i, Y\right)\right)$$