Expectation of the product of two mean independent random variables I have random variables $a$ and $b$, which are such that $\mathbb{E}[a|b]=0$. I am trying to compute $E[ab]$. Is the following correct? $$\mathbb{E}[ab]=\mathbb{E}[\mathbb{E}[ab|b]]=\mathbb{E}[b\mathbb{E}[a|b]]=0$$
Where I have used the law of iterated expectations. Thank you.
 A: Short answer: the equalities are correct (if all those expectations exist), but only the first one is the law of iterated expectations.
Long answer:
I'll use notation $X$ and $Y$ for random variables and $x$ and $y$ for their values.
Let's assume that $(X,Y)$ has continuous distribution (for discrete distribution the proof below is similar). Then
$$\mathbb{E}(X\cdot Y)=\int_{-\infty}^{\infty}\int_{-\infty}^{\infty} x\cdot y\cdot f(x,y)\, dxdy = \int_{-\infty}^{\infty}\int_{-\infty}^{\infty} x\cdot y\cdot f_X(x|y)\cdot f_Y(y)\, dxdy = $$
$$=\int_{-\infty}^{\infty}y\left(\int_{-\infty}^{\infty} x\cdot f_X(x|y)\,dx\right)f_Y(y)\, dy = \int_{-\infty}^{\infty}y\cdot \mathbb{E}(X|y)\cdot f_Y(y)\, dy = \mathbb{E}(Y\cdot\mathbb{E}(X|Y))$$
Explanation for the last quality:

*

*Keep in mind that $\mathbb{E}(X|y)$ is not a random variable (it's conditional expectation of $X$ with condition $Y=y$). It depends on $y$, so it's a function of $y$.

*But in the last integral we have $y\cdot \mathbb{E}(X|y)$, which is another function of $y$, let's say $\varphi(y)$.

*$\varphi(y)$ is not a random variable, but $\varphi(Y)=Y\cdot\mathbb{E}(X|Y)$ is random variable and the expectation of that variable is $$\mathbb{E}\varphi(Y) =\int_{-\infty}^{\infty} \varphi(y)\cdot f_Y(y)\, dy = \int_{-\infty}^{\infty}y\cdot \mathbb{E}(X|y)\cdot f_Y(y)\, dy$$
So, if $\mathbb{E}(X|Y)=0$ then $$\mathbb{E}(X\cdot Y) = \mathbb{E}(Y\cdot\mathbb{E}(X|Y)) = \mathbb{E}(Y\cdot 0) = 0$$
Bonus Tip: This proof doesn't require $X$ and $Y$ to be independent.

