$E[Y|X]$ versus $E[Y|X=x]$.

71 Views Asked by At

Suppose that $Y$ and $X$ are variables with finite variances. Then $E[Y|X]$ is a random variable defined as the mean squared projection of $Y$ on the space $\mathcal G$ of random variables $g(X)$, such that $g(X)$ have finite variances for any $g$. Now, we are also confronted with the definition of conditional expectation as the non-random function $h(x)=E[Y|X=x]$, where, assuming that $f(x,y)\neq 0$, we have that $$h(x)=E[Y|X=x]=\int y f(y|x)dy$$

Clearly, $E[Y|X]$ and $E[Y|X=x]$ are different objects: the latter being a random variable, while the former a map from the support of $X$ to the reals.

Does it make any sense to write $h(X)=E[Y|X]$? The law of iterated expectations says that $E[E[Y|X]]=E[Y]$. Is this the same as saying $E[E[Y|X=x]]=E[Y]$?. This last expression makes no sense to me. Finally a matter of existence: in the setting just described $E[Y|X]$ is well defined and exists, however for $E[Y|X=x]$ to exist we had to assume that $f(x,y)\neq 0$. Is this related to the Borel paradox?

I am confused as to how to relate these two objects. Any help or reference would be much appreciated.