1

For a random variable $X$, there is an expected value $E(x)$. Since $E(X) = \mu \in \mathcal{R}$ where $\mu$ is a mean, and can be viewed as a constant. If this is true, then $E(E(X)) = E(\mu) = \mu$ by linearity and property of expectation.

However, my confusion sets in when I try to apply this logic in trying to understand the law of total expectation that is $E(Y) = E(E(Y|X))$. If I know that X is given, then it is appropriate to characterize $E(Y|X)$ as a constant, according to previous logic, such that $E(E(Y|X)) = E(Y|X)$, but $E(Y) = E(E(Y|X)) \neq E(Y|X)$

Can anybody give me a hand here? Thanks.

user498021
  • 15
  • 3
  • The outer "$E$" is taken with respect to $X$, so, although at the time of evaluating $E(Y|X)$ $X$ is a constant, at the time of evaluating the outer expectation in the expression $E[E(Y|X)]$, $X$ is not. – jbowman Dec 12 '19 at 19:28
  • Another way to say this is that $\operatorname E(Y|X)$ is still a random variable and it is being averaged w.r.t. the marginal distribution of $X$ – jld Dec 12 '19 at 19:33
  • thanks a lot for the clarification – user498021 Dec 12 '19 at 19:52

1 Answers1

2

The conditional expectation $E(Y|X=x)$ is a function $g(x)$ of $x$. For a fixed value $x$ this is not a random variable. The notation $E(Y|X)$ (a slight abuse of notation since $X$ is not an event) is shorthand for $g(X)$. This is a random variable and hence we can talk about $Eg(X)=E(E(Y|X))$ which according to the law of total exectation equals $EY$.

Jarle Tufto
  • 7,989
  • 1
  • 20
  • 36