I have the joint density function $f(y_1,y_2) = 3y_1, 0 \leq y_2 \leq y_1 \leq 1.$ And $0$ elsewhere.
I have to find the marginal density function for $y_2$
My question is how to define the right bounds for my integral?
A priori I would think that my integral would have the bounds $\int_{0}^{y_1}$. But this doesn't provide me with the right answer ( which the book gives as $f_2(y_2) = \frac{3}{2}-\frac{3}{2}y_2^2, 0 \leq y_2 \leq 1.$
So obviously I'm doing something wrong, and I would be very grateful for answers and help.
The main way which always works is to do a drawing of your joint support, that is a triangle
then integrate in $dy_1$ that is
$$f_{Y_2}(y_2)=\int_{y_2}^1 3y_1 dy_1=\frac{3}{2}(1-y_2^2)$$
as desired
Another way, without doing the drawing, is to look at your support definition:
$$0<\underbrace{y_2<y_1<1}_{Y_1\text{ support}}$$
this immediately tells you that the correct $Y_1$ bounds are $[y_2;1]$