Conditional Expectation Query

99 Views Asked by At

I'm trying to read up on Conditional Expectation and have across the following equation, where X and Y are jointly discrete random variables:

$E[E[X|Y]] = E[X]$ which results in the Equation below. I don't understand how this equation was arrived at though. Why are we seemingly finding the Expectation for $Y = y$?

$E[X] = \sum\limits_{y}E[X|Y=y]P\{Y=y\}$