# Conditional Expectation of two random variables

Let $X, Y$ be two random variables in $L^2(\Omega, \mathscr{F}, \mathbb{P})$. If $$\mathbb{E}(X|\sigma(Y)) = Y, \mathbb{E}(Y | \sigma(X)) = X \ \mbox{a.s.},$$ then $X = Y$ a.s.

It does not look very complicated, but I do not know what I should do. Actually, I am not quite understand the concept and motivation for conditional expectation. Could anyone help about verifying the statement ? It will be great if you can suggest me some good and basic materials treating conditional expectation (I read in Durett, but I cannot follow mostly what is written there)

• I am sure this has been asked before on stackexchange, but I cannot find the link. I would compute $E[(Y-X)^2]$. – Michael Apr 6 '16 at 4:51