I'm trying to figure out why the following equation holds: $$f_{Y}(y) = E(f_{Y|X}(y|X))$$

I have sort of "worked out" the RHS to be: \begin{align} f_{Y}(y) &= E(f_{Y|X}(y|X)) \\[5pt] &= \int \frac{f_{X,Y}(x,y)}{f_{X}(x)} f_{X}(x) dx \\[5pt] &= \int f_{X,Y}(x,y)dx \\[5pt] &= f_{Y}(y) \end{align}

Is this approach correct? If so, why do integrate with respect to $f_{X}(x)dx$ ?

  • $\begingroup$ Is this a question from a course or textbook? If so, please add the [self-study] tag & read its wiki. $\endgroup$ – gung - Reinstate Monica Feb 4 '16 at 0:53
  • $\begingroup$ Yes it is. I have made the required changes. $\endgroup$ – beginner Feb 4 '16 at 3:24
  • $\begingroup$ apart from $y$ that's the only other variable. To be more accurate the book should have stated $E_x(\cdot)$. $\endgroup$ – sachinruk Feb 4 '16 at 3:36
  • $\begingroup$ Do you know how to obtain the expected value of $g(X) $ where $g $ is a function. $f_{Y|X}(y|X) $ is just another function of $X $ since, in effect, you are holding $y $ fixed. $\endgroup$ – Zachary Blumenfeld Feb 4 '16 at 4:20
  • 1
    $\begingroup$ @Sachin_ruk "To be more accurate the book should have stated Ex(⋅)" Well, certainly not, actually this habit of adding random variables as indexes to expectation signs is quite superfluous. $\endgroup$ – Did Feb 8 '16 at 17:52

To close this one:

$f_{Y|X}(y|X)$ is a function of the random variable $X$. When we write $E(f_{Y|X}(y|X))$ it is understood that the expected value is taken with respect to all "sources of randomness" present. In our case the only source of randomness is $X$, so translating $E$ to an integral we have

$$ E[f_{Y|X}(y|X)] = \int_{-\infty}^{\infty} f_{Y|X}(y|X) f_{X}(x) dx$$

Using Baye's law for densities we also have

$$f_{Y|X}(y|X) = \frac{f_{X,Y}(x,y)}{f_{X}(x)}$$

and inserting into the expected value expression and simplifying we get

$$E[f_{Y|X}(y|X)] = \int_{-\infty}^{\infty} f_{X,Y}(x,y)dx$$

Integrating out $X$ from the joint density, leads in turn to $f_{Y}(y)$, as we are asked to show, because

$$f_Y(y) = \frac {d}{dy} \text {lim}_{x \to \infty} F_{X,Y}(x, y)$$

where $F_{X,Y}(x,y)$ is the joint distribution function,

$$f_Y(y) = \frac {d}{dy} \text {lim}_{x \to \infty} \int^y_{-\infty} \int_{-\infty}^x f_{X,Y}(s, t)ds\,dt$$

$$ = \frac {d}{dy} \int^y_{-\infty} \int_{-\infty}^{\infty} f_{X,Y}(x, t)dx\,dt = \int_{-\infty}^{\infty} f_{X,Y}(x, y)dx$$

| cite | improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.