# Law of iterated expectations for several variables

There are tons of questions related to the LIE, but all the ones I've seen do not help in my case, including this one and this one.

I know that by Law of Iterated Expectations (LIE), $E(x_{i}|A_{i})=0$ implies $E(x_{i}) = 0$ and $E(x_{i}A_{i})=0$.

In my case, I have $E(x_{i}|A_{i},B_{i},C_{i})=0$.

Does that imply $E(x_{i}|A_{i},B_{i})=0$?

I'm trying to work out the LIE formula but I'm not sure it's right. My developments so far:

$$E(x_{i}|A_{i},B_{i},C_{i})=E(x_{i}A_{i}B_{i}C_{i})=E[A_{i}B_{i}E(x_{i}C_{i}|A_{i},B_{i})]=0$$

Which means:

$$E(x_{i}C_{i}|A_{i},B_{i})]=0= E(x_{i}C_{i})$$

Which means the latter two are independent, and therefore my result holds?

If I understand your question and assumptions, then the answer is yes. This does not require any independence, but it does require that your conditional expectations are zero for all values of the auxiliary variables.

To show this mathematically, I will start with your first case (single auxiliary variable), then build to the more general case.

In the first instance, you have a variable of interest $x$, and a "nuisance" variable $a$. The expectation of $x$ is defined as $$\langle x\rangle=\int p[x] x dx$$ where $p[x]$ is the probability density function (PDF) of $x$.

Given the joint PDF $p[x,a]$ of $x$ and $a$, the conditional PDF of $x$ given $a$ is $$p[x|a]=\frac{p[x,a]}{p[a]}$$ so the conditional expectation of $x$ given $a$ is $$\langle x|a\rangle=\frac{1}{p[a]}\int p[x,a] x dx$$

Expressing the marginal PDF for $x$ as $$p[x]=\int p[x,a]da$$ and substituting into the $\langle x\rangle$ equation, we then have $$\langle x\rangle=\int \langle x|a\rangle p[a] da$$ From this equation it follows that if $\langle x|a \rangle=0$ (for all $a$) then $\langle x\rangle=0$.

(Note that this derivation has not assumed independence, i.e. there is no need to have $p[x,a]=p[x]p[a]$.)

To generalize the result, it suffices to consider the case with two auxiliary variables $a$ and $b$. In this case, following along the path taken above, we have conditional probability $$p[x|a,b]=\frac{p[x,a,b]}{p[a,b]}$$ conditional expectation $$\langle x|a,b\rangle=\frac{1}{p[a,b]}\int p[x,a,b] x dx$$ and marginal (joint) probability $$p[x,a]=\int p[x,a,b]db$$

Combining these we then have $$\langle x|a\rangle=\frac{1}{p[a]}\int \langle x|a,b\rangle p[a,b] db$$ So if $\langle x|a,b \rangle=0$ (for all $a$ and $b$) then $\langle x|a\rangle=0$ for all $a$. (And from the first case, we then have $\langle x\rangle=0$.)

• Thanks. That is not the notation I am used to, so it took me a while to understand. I will also write my answer based on my notation, more common in economics (my setting). – luchonacho Sep 13 '16 at 19:02
• OK. Note that your subscripts do not appear to be necessary. That was confusing to me. Whatever the notation, the most important thing is that in the statement $E(x|A)=0$, the left hand side is a function of $A$, so the equality must be understood to apply for all values of $A$ that might occur. (So if $f[A]=E(x|A)$ then $p[A]>0$ must imply $f[A]=0$.) – GeoMatt22 Sep 13 '16 at 19:33