# Finding the marginal density function when given a joint density function.

So I have gotten the following joint density function for random continuous variables $X$ and $Y$.

$$f_{X,Y}(x,y) = \begin{cases} e^{-y} & \mbox{if } 0 < x < y <\infty \\ 0 & \mbox{otherwise.} \end{cases}$$

I want to find the marginal density functions of X. I tried doing the following; $$f_X(x) = \int_0^\infty e^{-y}dy = 1$$ Because $e^{-y}$ is a exponential distribution with parameter $\lambda = 1$. However, the answer should be $f_X(x) = e^{-x}$.

I suspect that I am not properly taking the boundaries in account. How can I do that correctly?

Hint: You know that $x < y <\infty$. Thus the lower bound for $y$ is $x$ and the upper bound is $\infty$. $$f_X(x) = \int_x^\infty e^{-y}dy$$
Then the range for $x$ at $f_X(x)$ is $0<x<\infty$
• could you explain why the range is $$0<x<\infty$$ I posted a slightly more complex but similar question about boundaries and ranges of joint distributions here: math.stackexchange.com/questions/2991255/… Commented Nov 9, 2018 at 12:31
• @user1607 To answer your question. $f_{X}(x)$ does not depend on $y$ (anymore). Thus you can remove $y$ from $0 < x < y <\infty$ Commented Nov 9, 2018 at 17:24