1

Is this true : $E_{X|Y}[X|Y]=E_{Z|Y}[E_{X|Y,Z}[X|Y,Z]]$ ? I deduced it from the law of total expectation.

Thanks a lot !

corks__
  • 21

1 Answers1

0

It is not true. $E(X|Y)$ is with respect to the distribution of $X|Y$ it's true, but $E(E(X|Y,Z))$ has the inner expectation with respect to $X|Y, Z$, and the outer expectation with respect to the joint distribution $Y, Z$. This is because $E(X|Y,Z)$ is a function of $Y, Z$ (in general, $E(X|Y)$ is a function of $Y$). We cannot subscript the expected value operator with the wrong random variable/distribution or a partial one as in $E_Z$, not allowed. So we would get $$\begin{split}E(E(X|Y,Z))&=E\left(\int_{-\infty}^\infty xg(x|y,z)dx\right)\\ &=\int_{-\infty}^\infty \int_{-\infty}^\infty \int_{-\infty}^\infty xg(x|y,z)f(y,z)dydzdx\\ &=\int_{-\infty}^\infty \int_{-\infty}^\infty \int_{-\infty}^\infty x f(x,y,z)dydzdx\\ &=\int_{-\infty}^\infty xf(x)dx\\ &=E(X)\end{split}$$

Indeed, this is a well-known result called the law of iterated expectation: $E(E(X|Y))=E(X)$.

If we wanted to force out the $E(X|Y)$ from $E(X|Y,Z)$, we would have to marginalize out $z$ using the conditional pdf of $Z$ given $Y$ as in the following, but we cannot write $E_{Z|Y}$:

$$\begin{split}\int_{-\infty}^\infty \left[\int_{-\infty}^\infty xg(x|y,z)dx\right]f(z|y)dz&=\int_{-\infty}^\infty \int_{-\infty}^\infty x g(x,z|y)dzdx\\ &=\int_{-\infty}^\infty xf(x|y)dx\\ &=E(X|Y)\end{split}$$

(For the discrete case, replace all the integrals with summations.)

Vons
  • 11,004
  • To summarise: $\mathsf E(X\mid Y)=\mathsf E\big(\mathsf E(X\mid Y, Z)~\big\vert~ Y\big)$ – Graham Kemp May 25 '21 at 03:11
  • Oh. That's a bit advanced – Vons May 25 '21 at 03:26
  • sorry, I mean $E_{Z|Y}[E_{X|Y,Z}[X|Y,Z]]$, I edited. I thought that the notation $E_{Z|Y}$ is for marginalization. But you said that we can't write this in this case. Why ? Is there a reason ? (Thanks for your previous answer !) – corks__ May 25 '21 at 08:21
  • I think $E$ is an operator that you can only specify the distribution $E_{\text{f(Y,Z)}}$ but you cannot specify that you only want to marginalize part of the distribution – Vons May 25 '21 at 18:21