# Mean of conditional mean in discrete case

I want to prove, that: $$E[ E[X |Y]]= E[X]$$ for X,Y discrete random variables.

Proof: $$E[ E[X |Y]] = \sum_y E[X|Y=y] \cdot P(Y=y) = \sum_y \sum_x \frac{P(X=x, Y=y)}{P(Y=y)}\cdot P(Y=y)$$

$$\underbrace{=}_{Fubini} \sum_x x \sum_y P(X=x, Y=y)=?$$

Why should be $$\sum_y P(X=x, Y=y) = P(X=x)$$ ?

• It follows directly from definition, unless perhaps you work only on discrete random variables, and you defined the concept for them? Commented Jul 17, 2019 at 14:06
• Which defintion do you mean? Commented Jul 17, 2019 at 14:07
• $E[X|Y]$ is an $Y$ measurable random variable such that for every $Y$-measurable set $A$ we have $E[1_AE[X|Y]] = E[1_AX]$. This is the definition. In particular we can take $A = \Omega$. Commented Jul 17, 2019 at 14:09
• Sorry, I do not know this definition. Is there any argument for $\sum_y P(X=x, Y=y) = P(X=x)$ Commented Jul 17, 2019 at 14:11
• Yes, this is just countable additivity of measure $P$. $\bigcup_y\{X = x, Y = y\} = \{X = x\}$ Commented Jul 17, 2019 at 14:12

$$P(X = x) = P(\cup_{y \in \Omega_y} \{X = x\}\cap \{Y=y\}) = \sum_{y \in \Omega_y}P(\{X =x\} \cap\{Y=y\}),$$ since $$y$$ can take only one value at a time and $$\Omega_y$$ is countable. I.e. $$(\{X =x\} \cap\{Y=k\}) \cap(\{X =x\} \cap\{Y=l\}) = \emptyset$$ if $$k \neq l$$.