I have this question:
Let Y = a + bX + U, where X and U are random variables and a and b are constants.Assume that E(U|X) = 0, and that Var(X) > 0.
I need to find E[UX]
The answer is zero, found by E[X*E[U|X]]
Where I'm having the problem is, why is the solution not given by E[X] * E[U|X]? Is there a formula that I'm missing? Please help if possible!
$\mathsf E(UX)$ is a constant, as is $\mathsf E(X)$.
$\mathsf E(U\mid X)$ is a random variable, as is the product $\mathsf E(X)\mathsf E(U\mid X)$.
Clearly a constant is not generally equal to a random variable (unless it's a monatomic random variable).
However $\mathsf E\big(X \mathsf E(U\mid X)\big)$ is a constant.
Let's put 'training wheels' on the expectations to see why.
$$\begin{align} \mathsf E_{U,X}(UX) & = \mathsf E_X(\mathsf E_{U\mid X}(UX\mid X)) & \text{Law of Iterated Expectation} \\ & = \mathsf E_X(X\mathsf E_{U\mid X}(U\mid X)) \end{align}$$
The 'training wheel' subscripts are used make explicit the density function used in the integration of the expectation. They are often redundant but sometimes helpful to students. So this corresponds to :
$$\begin{align} \iint_{U,X} ux f_{U,X}(u,x) \operatorname d u \operatorname d x & = \int_X \int_{U\mid X=x}u xf_{U\mid X}(u\mid x)f_X(x)\operatorname d u\operatorname d x \\ & = \int_X x f_X(x)\int_{U\mid X=x}u f_{U\mid X}(u\mid x)\operatorname d u\operatorname d x \end{align}$$
Hence without the 'training wheels' we have: $$\begin{align} \mathsf E(UX) & = \mathsf E(\mathsf E(UX\mid X)) \\ & = \mathsf E(X\mathsf E(U\mid X)) \end{align}$$