Consider the following joint PDF: $$ f_{X,Y}(x,y)= \begin{cases} \frac{1}{8}(x-y) & -x<y<x, \; 0<x<2 \\ 0 & \text{else} \end{cases} $$ We know that $f_{Y}(y)=\int_{-\infty}^{+\infty} f_{X,Y}(x,y)\;dx$. but since the variables are dependent ($-x<y<x$), merely integrating over the interval $(0,2)$ would not suffice. What is the approach to find the marginal PDF in such cases?
2 Answers
The inequality $-x < y < x$ is the same as $x > |y|$. Also $-x < y < x$ along with bounds $0 < x < 2$ suggests $-2 < y < 2$ as the bounds for the support of $Y$. So pdf of $Y$ is \begin{align*} f_Y(y) = \int_{-\infty}^{+\infty} f_{X,Y}(x,y)\;dx &= \int_{-\infty}^{|y|} f_{X,Y}(x,y)\;dx + \int_{|y|}^{2} f_{X,Y}(x,y)\;dx + \int_{2}^{+\infty} f_{X,Y}(x,y)\;dx \\ &= 0 + \int_{|y|}^{2} \frac{1}{8}(x - y)\;dx + 0, \quad -2 < y < 2 \end{align*} and $0$ otherwise. You can easily work out the integral.
-
$\begingroup$ Thanks, so generally the approach should be getting the support terms involving both variables in terms of the variable we're integrating over, and then also figuring out the constant bounds of the variable of our marginal PDF to set the support terms of the marginal PDF? $\endgroup$ Commented Jan 8, 2021 at 21:06
-
1$\begingroup$ @zareami10 Yes. For more general cases, geometric visualization of the joint support is important as the dependent inequalities can get quickly complicated. Use Wolfram Alpha to visualize by plugging in the inequalities. Here is the example for the above $\endgroup$– balddrazCommented Jan 9, 2021 at 0:34
If you sketch the region bounded by the inequalities $-x<y<x, 0<x<2$, it's the interior of the triangle with vertices $(0,0), (2,-2), (2,2)$.
Algebraically, by changing the inequality $-x<y$ to $-y < x$, the lower bounds of $x$ given $y$ has to satisfy all $3$ of
$$-y<x,\quad y<x,\quad0<x$$
i.e. $|y|<x$. Combining with the upper bound of $x$,
$$|y|<x<2$$
The range of $y$ that has some corresponding $x$ is
$$|y|<2\\ -2<y<2$$