# Prove that $EX=E(E(X|Y))$

Prove that $EX=E(E(X|Y))$

I know that I should prove it from definition of conditional distribution and conditional expected value, but I don't know how.

I have also looked at theorem("Total expectation") which should be connected with the proof.

If someone would tell me, which properties of expectation I should use to prove it, I would be really glad.

• Do you want a proof for the discrete case or the general one? Have you studied measure theory? Jan 22, 2017 at 14:16
• In the wiki page of Law of total expectation here there is a proof... Jan 22, 2017 at 14:21
• I haven't study measure theory. For discrete one. Jan 22, 2017 at 14:29

\begin{eqnarray*} \mathbb{E}(\mathbb{E}(X|Y)) & = & \int_{-\infty}^{\infty} \mathbb{E}(X|Y = y) f_Y(y) dy \\ & = & \int_{-\infty}^{\infty} \int_{-\infty}^{\infty}xf_{X|Y}(x|y) dx \ f_Y(y) dy \\ & = & \int_{-\infty}^{\infty} \int_{-\infty}^{\infty}xf_{X|Y}(x|y) f_Y(y) dx dy \\ & = & \int_{-\infty}^{\infty} \int_{-\infty}^{\infty}xf_{X,Y}(x,y) dx dy \\ & = & \int_{-\infty}^{\infty} \int_{-\infty}^{\infty}xf_{X,Y}(x,y) dy dx \\ & = & \int_{-\infty}^{\infty} x\int_{-\infty}^{\infty}f_{X,Y}(x,y) dy dx \\ & = & \int_{-\infty}^{\infty} xf_{X}(x) dx \\ & = & \mathbb{E}(X) \end{eqnarray*}

• in the first equality, how do you know that the outer expectation is with respect to Y?
– bob
Sep 5, 2020 at 16:29
• Thank you. How you get $f_Y(y)dy$ in the first line please?
– Avv
Nov 18, 2021 at 19:35
• Thank you Amit. What is the goal behind this rule?
– Avv
Apr 7, 2022 at 19:51
• Also, can you please show what is subscript $f_{X|Y}$ under function and how it becomes later $f_{X,Y}$. Also, how you concluded that integral of $f_{X,Y}(x,y)=f_X(x)$ please?
– Avv
Apr 7, 2022 at 20:04
• @bob I have used LOTUS i.e. $\mathbb{E}(g(Y)) = \int_{-\infty}^\infty g(y) f_Y(y) dy$
– Amit
Apr 12, 2023 at 19:40

By definition $E(X\mid Y)$ is random variable which satisfies: $$E(X \cdot 1_G) = E\bigl(E(X\mid Y)\cdot 1_G\bigr), \quad \text{for all} \ G \in \sigma(Y).$$ Simply take $G=\Omega$ such that $1_G=1$ and you get the desired result.