Find the marginal distribution for $y_2$ given the following PDF
$$f(y_1,y_2)= \begin{cases} 3y_1, & \text{if } 0\leq y_2\leq y_1 \\ 0, & \text{elsewhere} \end{cases} $$
But when I try to find it, I end up with the following integral:
$$f_{Y_2}(y_2)=\int_{y_2}^\infty 3y_1 \, dy_1$$
and that integral does not converge. Is there any trick to solve this? or is this situation an special case?
Thanks
Assuming you actually meant $0<y_2<y_1<1$, first check that you have pdf by integrating: $$ \int_0^1 \int_0^{y_1} 3y_1 \, dy_2 \, dy_1 $$ Once you've done that, marginalize out $Y_2$: $$ f_{Y_2}(y_2) = \int_{y_2}^1 3y_1 \, dy_1 $$ Again, check this by integrating in the $[0,1]$ interval to get $1.$