# What can I say about expected value of expected value of x given y: $E[E[X|Y]]$

My question is about Y that is discrete and for some random variable X, but if its having a meaning for Y that is continuous then please give that case your attention.

What can I say about $$E[E[X|Y]]$$?

I know that E[X|Y] is random variable, so It's not trivial case when we calculate expected value of just a number.

And what about $$E[E[X|Y]|Y]$$? does something like this have a meaning? if it's, then does for some function $$g$$ (for simplicity, assuming g with suitable range and continuous) it's true to say that: $$E[g(Y)E[X|Y]|Y]=g(Y)E[E[X|Y]|Y]$$ Because of a theorem that I seen: $$E[g(Y)X|Y]=g(Y)E[X|Y]$$

• In $E[E[X\mid Y]]$ the inner expectation is over $X$ given $Y$ and is a function of $Y$, while the outer expectation is over $Y$ and is a numerical value. So to the extent that $E[E[X\mid Y] \mid Y]$ has a meaning, it is the same thing – Henry Dec 14 '18 at 9:25
• @Henry $E[E[X∣Y]∣Y]$ is the same as $E[E[X∣Y]]$? or that you meant that the interpretation of this follows as it was with $E[E[X∣Y]]$? – Mr.O Dec 14 '18 at 9:35
• If you define $g(y)=E[X \mid Y=y]$ then $E[X \mid Y] = g(Y)$ and $E[E[X \mid Y]] = E[g(Y)]=E[X]$. You can also say that conditioned on $Y=y$ you have $g(Y)=g(y)$ and thus in general and rather obviously $g(Y)=g(Y)$, so in that sense $E[E[X \mid Y]\mid Y]$ ought to mean $E[g(Y) \mid Y] = E[g(Y)]$ and we already know that is $E[X]$ – Henry Dec 14 '18 at 16:03

If $$X$$ is measurable wrt $$\sigma(Y)$$ i.e. the $$\sigma$$-algebra generated by random variable $$Y$$ then $$\mathbb E[X\mid Y]=X$$.
This can be applied on $$Z:=\mathbb E[X\mid Y]$$ because $$\mathbb E[X\mid Y]$$ is by definition measurable wrt $$\sigma(Y)$$.
This results in $$\mathbb E[Z\mid Y]=Z$$ or equivalently: $$\mathbb E[\mathbb E[X\mid Y]\mid Y]=\mathbb E[X\mid Y]$$
It is a basic fact about conditional expectations that $$E(E(X|Y))=EX$$.