Can anyone give me an explanation why $E(Y| X) = E(E(Y| X, Z)| X)$? I am a rookie in probability. Can anyone give me an intuitive explanation and a rigorous mathematical proof to why $E(Y| X) = E(E(Y| X, Z)| X)$? Thanks in advance!
 A: Intuitive explanation, which happens to be fully rigorous when $Y$ is square integrable: let $U\subseteq V$ denote some vector subspaces of an inner product space $W$, then the orthogonal projections $\mathrm{pr}_U:W\to W$ on $U$ and $\mathrm{pr}_V:W\to W$ on $V$ are such that $$ \mathrm{pr}_U\circ\mathrm{pr}_V=\mathrm{pr}_U.$$
If $U=L^2(\sigma(X))$, $V=L^2(\sigma(X,Z))$ and $W=L^2$, then $\mathrm{pr}_U=E(\ \mid X)$ and $\mathrm{pr}_V=E(\ \mid X,Z)$.
A: @Did's answer is very good here: it is very useful to think of conditional expectation as being like a projection onto a space of functions which are measurable with respect to a smaller $\sigma$-algebra. It actually is a projection for square-integrable functions, but we only need integrability to define it. 
For the general situation, given three random variables $X,Y,Z$, $E(Y|X)$ and $E(Z|X)$ will be equal a.s. if and only if $E(Y 1_A) = E(Z 1_A)$ for any $X$-measurable set $A$. You can prove this by noting that $E(Y|X)$ agrees with $Y$ while $E(Z|X)$ agrees with $Z$, so $Y$ and $Z$ must agree with each other. 
So for your problem you need to check that $E(Y|X,Z)$ and $Y$ have the same integral over $X$-measurable sets. But this is automatic, because they actually have the same integral over $(X,Z)$-measurable sets, which contain all $X$-measurable sets.
My personal difficulty with the more general situation is that conditional expectation does not feel "operational" in the general case, because the definition is completely implicit. The definition in the square integrable case feels much more explicit: $E(Y|X)$ is just $\arg \min_{Z \in \sigma(X)} E((Z-Y)^2)$.
