How to find the marginal density $f(y)$ for the following figure?

45 Views Asked by At

enter image description here

The figure is in the above image.

I am told that the joint density $f(x,y)$ is constant in the region shown in the figure. So $f(x,y) = 1/12$ for the region of the figure.

I am asked to find $f(y)$ and $f(x|y)$

I need help finding $f(y)$ in order to find $f(x|y)$

To find $f(y)$ I know I need to integrate out $x$ in the joint pdf $1/12$ but the issue is that the bounds of integration for x change between $0 \leq y \leq 1$ and $1 \leq y \leq 5$ so what would be $f(y)$? Would be it piecewise and $f(x|y)$ be piecewise in turn? Can someone help me figure this out?

2

There are 2 best solutions below

0
On

You are correct, you need to handle the parts separately: $$ f(y) = \begin{cases} \int_0^4 f(x,y) \ dx = \frac{1}{3} & \text{if } 0 < y < 1, \\ \int_{y-1}^4 f(x,y) \ dx = \frac{5-y}{12} & \text{if } 1 < y < 5. \end{cases} $$ I will leave the second part to you.

2
On

Let's look at it geometrically. Think about $F_Y(y) = \Pr[Y \le y]$, the probability that $Y \le y$. The geometric interpretation is, you pick some $y$-value between $0$ and $5$, and this is a horizontal line drawn across the blue region at this value. Then the fraction of the blue region that is below this line is the probability in question.

So if I pick $y = 1$, then it's obvious the area of the blue region below this line is $4$, so $\Pr[Y \le 1] = \frac{4}{12} = \frac{1}{3}$. How would we describe the enclosed area if we pick a general $y$?

Well, if $0 \le y \le 1$, the enclosed region below the line is simply $4y$, so $\Pr[Y \le y] = \frac{4y}{12} = \frac{y}{3}$ in this case. But if $1 < y \le 5$, the enclosed region is $4$ (because the rectangular region below the triangle is always fully included), plus the area of some variable height trapezoid. We can calculate this variable region's area by taking it as the total area of the triangle minus a smaller triangle whose height is $5 - y$; i.e. $$\Pr[Y \le y] = \frac{4 + 8 - \frac{(5-y)^2}{2}}{12}, \quad 1 \le y \le 5.$$ So all together, we have $$F_Y(y) = \begin{cases} 0, & y \le 0 \\ \frac{y}{3}, & 0 < y \le 1 \\ \frac{-y^2 + 10y - 1}{24}, & 1 < y \le 5 \\ 1, & y > 5. \end{cases}$$ Then the density is simply the derivative: $$f_Y(y) = \begin{cases}0, & y \le 0 \\ \frac{1}{3}, & 0 < y \le 1 \\ \frac{5-y}{12}, & 1 < y \le 5 \\ 0, & y > 5. \end{cases}$$

We could have also done this mechanically, through integration. The joint density is $$f_{X,Y}(x,y) = \frac{1}{12} \mathbb 1(0 \le x \le 4) \mathbb 1(0 \le y \le x + 1).$$ Then $$f_Y(y) = \int_{x=0}^4 f_{X,Y}(x,y) \, dx = \frac{1}{12} \int_{x=\max(0,y-1)}^4 1 \, dx = \begin{cases}\frac{1}{3}, & 0 < y \le 1 \\ \frac{5-y}{12}, & 1 \le y \le 5. \end{cases}$$

As for the conditional density of $X$ given $Y = y$, note that what this is asking for is to pick a $y$-value in the figure, draw the line, and then determine the density of $X$ on that line. You can see it will be uniform regardless of the choice of $Y$, but where the lower and upper endpoint of that uniform density will be, depends on the choice of $Y$. For instance, if I pick $Y = 2$, then $X \mid Y = 2$ will be uniform on $[1, 4]$.