# Application of law of iterated expectations

I would like your help to show a statement that uses the law of iterated expectations.

In my notation $$Supp_X$$ denotes the support of a random variable $$X$$.

Consider the random variables $$\epsilon, X, Y$$. Take the function $$z: Supp_X\rightarrow \mathbb{R}^L$$ with $$L>1$$. Take the function $$r: Supp_{(X,Y)}\rightarrow \{0,1\}$$.

Assume that $$E(\epsilon| X,Y)=0$$. I want to show that $$E(\epsilon \times r(X,Y) \times z_l(X))=0 \hspace{1cm} \forall l=1,...,L$$ where $$z_l(X)$$ is the $$l$$-th element of $$z(X)$$.

I believe that this statement makes uses of the law of iterated expectations but I'm not sure how to show it formally. I'm confused because I've always used the law of iterated expectations to get rid of the conditioning event, which is not the case here

• Thanks: could you suggest which independence assumptions would help me to show what I want? Why $E(\epsilon|X,Y)$ is not sufficient? – user3285148 Jun 5 at 20:06
• Are you referring to $X$ independent of $Y$? – user3285148 Jun 5 at 21:54
• Yes, $\Bbb E[\epsilon|X,Y]=0$ is sufficient. – Xi'an Jun 6 at 4:07
• Is this the proof? Let $x,y,e$ denote realisations of $X,Y,\epsilon$, respectively. $E(\epsilon|X,Y)=0$ $\rightarrow$ $\sum_{x,y} \Big(\sum_e e*\frac{P(e,x,y)}{P(x,y)} \Big)* r(x,y)* z_l(x)* P(x,y)=0$ $\leftrightarrow$ $\sum_{x,y} \Big(\sum_e e*P(e,x,y) \Big) * r(x,y)* z_l(x) \frac{P(x,y)}{{P(x,y)}}=0$ $\leftrightarrow$ $E(\epsilon*r(X,Y) * z_l(X))=0$ – user3285148 Jun 6 at 15:02