# applying iterated expectation when conditioning on multiple random variables

The law of iterated expectations tells us that ${\bf E}\big [{\bf E}[X\, |\, Y]\big ]={\bf E}[X]$. Suppose that we want apply this law in a conditional universe, given another random variable $Z$, in order to evaluate ${\bf E}[X \, |\, Z]$. Then:

${\bf E}\big [{\bf E}[X\, |\, Y,Z] \, |\, Z\big ]={\bf E}[X\, |\, Z]$

I'm not sure how to apply the Law of Iterated Expectations to show this relationship is true. Initially, I thought I could do this: ${\bf E}[X\, |\, Y,Z] = {\bf E}[X]$

But by blindly applying the formula from the inside out, I get an incorrect result, so I'm missing some of the behind-the-scenes reasoning:

${\bf E}\big [{\bf E}[X]\ |\, Z\big ]$

${\bf E}\big [{\bf E}[X]] = {\bf E}[X]$

Another way I tried to think about this is that it seems like ${\bf E}[X\, |\, Y,Z]$ is the same as ${\bf E}[X\, |\, Y,Z] | Z$. But then I get to the same place as above where I'm not sure how to deal with conditioning on multiple random variables. It appears that ${\bf E}[X\, |\, Y,Z] \neq {\bf E}[X]$

– Did
Mar 28, 2014 at 23:08
• The solution says that this is just the the law of iterated expectations where all the expectations are conditioned on Z. Although I superficially realize this is true, I don't have any intuition on how to prove this. Would I use something like $\displaystyle E \left({X \mid Y=y, Z=z}\right) = \sum_{x } x f_{X|Y,Z}(x|y,z)$? Using this definition, it almost looks like I would need to sum out Y. Mar 28, 2014 at 23:51
• I found a couple of proofs econ.wikidot.com/conditionaldistributions youtube.com/watch?v=fs2HffFvYoQ and a short explanation on the intuition columbia.edu/~gjw10/lie.pdf. Thanks for you time. Mar 29, 2014 at 0:28
• It seems you would not know how to define E(X|Y). So what is the point?
– Did
Mar 29, 2014 at 7:03
• By the way, the chaotic situation at your other question is a consequence of the fact that neither you nor the answerer there are relying on a (proper) definition of E(X|Y). As long as you try to bypass this step, such things are bound to happen.
– Did
Mar 30, 2014 at 10:22

Let $\sigma(Y,Z)$ be the $\sigma$-algebra generated by $(Y,Z)$ and $\sigma(Z)$ the $\sigma$-algebra generated by $Z$. I will also assume that $X,Y: \Omega \to \mathbb R$ are real random variables defined on $\Omega$ (although this can be generalized). It then holds that
$$\sigma(Z) \subset \sigma(Y,Z)$$
Let $A \in \sigma(Z)$, then $Z(A) \in \mathcal B(\mathbb R)$ and $Z(A) \times \mathbb R \in \mathcal B(\mathbb R^2)$. Then $A$ is the inverse image of $Z(A) \times \mathbb R$ under $(Z,Y)$ and hence $A \in \sigma(Y,Z)$.