Proof (expectation of product of independent discrete random variables)

Suppose $X$ takes values $(x_n:n\in\N)$ and $Y$ takes values $(y_m: m\in\N)$. $$\begin{align*} \expect\big(f(X)g(Y)\big) &= \sum_n\sum_m f(x_n)\, g(y_m)\,\prob(X=x_n, Y=y_m) \\ &= \sum_n\sum_m f(x_n)\, g(y_m)\,\prob(X=x_n)\,\prob(Y=y_m) \\ &= \Big(\sum_n f(x_n)\,\prob(X=x_n)\Big)\Big(\sum_m g(y_m)\,\prob(Y=y_m)\Big) \\ &= \expect\big(f(X)\big) \, \expect\big(g(Y)\big). \end{align*}$$