# Obtaining marginal densities from joint probability density function

I'm given a joint probability density function of X and Y.

$$f(x, y)=c \mathrm{e}^{-y}|y-x|, \quad y>0 \text { and }-1 \leq x \leq 1$$

After normalizing I obtain $$c = \frac{1}{\frac{-2}{e}+3}$$. Now I am interested in the marginal densities of X and Y. How do I obtain these? I know to integrate with respect to each of the variables.

• it seems that you know what to do, where are you stuck? Nov 8, 2019 at 3:07
• In particular, what are the bounds on each of the integrals?
– user581882
Nov 8, 2019 at 3:37

Guide:

If we want to compute $$f_X(x)$$, we are fixing the $$x$$ and we want to integrate over the $$y$$. Hence we should integrate from $$0$$ to $$\infty$$.

If we want to compute $$f_Y(y)$$, we are fixing the $$y$$ and we want to integrate over the $$x$$. Hence we should integrate from $$-1$$ to $$1$$.

• The problem is that when trying to compute the first one, there is an issue somewhere, due to the absolute value.
– user581882
Nov 8, 2019 at 4:09
• The second one is well-defined, but the first has a problem.
– user581882
Nov 8, 2019 at 4:10
• Split the integral into two parts when $y> x$ and when $y<x$ then. Nov 8, 2019 at 4:10

You have found $$c$$ by using: \begin{align}1&=\iint_{y>0, -1\leq x\leq 1} f_{X,Y}(x,y)~\mathrm d (x,y)\\[1ex]&= \int_{-1}^1\int_0^\infty c\, \mathrm e^{−y} \lvert y−x\rvert~\mathrm d y~\mathrm d x\\[1ex]&=\int_{-1}^1\left(\int_0^x c\mathrm e^{-y}(x-y)\mathrm d y+\int_x^\infty c\mathrm e^{-y}(y-x)\mathrm d y\right)~\mathrm d x\end{align}

Surely you can then see that:

$$f_X(x)=\int_{y>0} f_{X,Y}(x,y)~\mathrm d y\\f_Y(y)=\int_{-1\leq x\leq 1} f_{X,Y}(x,y)~\mathrm d x$$

Brought to you by the fact that the supports are seperable.

• Thank you, the problem is with the first integral though, given the limits and the absolute value. I'm not sure how to break it up appropriately to make it solvable.
– user581882
Nov 8, 2019 at 4:50
• Partition the integrals on $y\leq x$ and $y> x$. Nov 8, 2019 at 4:52