Let $X$ and $Y$ be two random variables with finite second moments and $E(X \mid Y) = Y$ , $E(Y \mid X)= X$. Show that $P(X = Y)= 1$.
I tried using conditional expectation, so $E(E(X \mid Y))=E(Y) \Rightarrow E(X)=E(Y)$, but then I'm totally stuck on how to continue. I don't even know how to relate it to probability or using the fact of finite second moment.
Any help is appreciated. Thank you.
Probably not the fastest or most elegant, but this is the first thing that came to my mind:
Using $E(XY)=E(XE(Y\vert X))=E(X^2)$ and your results, we conclude that $Cov(X,Y)=V(X)=V(Y)$. So $\rho_{XY}=1$ which implies that $Y=aX+b$ for some $a>0$ and $b$.
Since $V(Y)=a^2V(X)=V(X)$ we deduce $a=1$ and from the equality of expectations we deduce $b=0$, so $Y=X$ w.p. $1$.