# Finding the Marginal PDF from a Joint PDF with strange piecewise bounds

I am supposed to show that the marginal PDF of a random variable $Y$ is: $$g(y)= \begin{cases} y, & 0<y \le 1\\ y^{-3}, & y>1\\ 0, & \textrm{otherwise} \end{cases}$$ given the joint PDF: $$f(x,y)=\begin{cases} \frac{4x^3}{y^3}, & 0<x<1, x<y\\ 0, & \textrm{otherwise} \end{cases}$$

I know one's supposed to integrate with respect to x, but I am not sure which boundries I should choose, and I can't seem to get the right answer.

• Draw a picture of the region you're supposed to integrate over. That'll help you setup the bounds of integration. – Batman Jan 5 '17 at 1:57

Note that by definition, $$g(y)=\int_{-\infty}^{\infty}f(x,y)\ dx.$$ There are three cases to consider:

• if $y>1$, then integrate for $x$ on $[0,1]$: $g(y)=\int_{0}^1\dfrac{4x^3}{y^3}\ dx$;
• if $0<y\leq 1$, then integrate for $x$ on $[0,y]$: $g(y)=\int_{0}^y\dfrac{4x^3}{y^3}\ dx$
• if $y<0$, then the integration is $0$.

Yes, you're right that you need to integrate with respect to $x.$ However, the joint distribution only has support when $x < y$ and $0<x<1$ so the bounds you need will depend on $y$.

1. If y is negative, then there is no region for $x$ that has support since we need $x<y$ and $x>0.$ So the integral is zero

2. If $0<y<1$, then the upper bound of $x=y$ kicks in before $x=1$ and we only have support for $x\in(0,y).$ So the integration bounds must be $0$ and $y$

3. If $y>1$ then the upper bound of $x=1$ kicks in before $y$ so the bounds are 0 and 1.

The support of the joint pdf is given by the red-shaded area: So as you may see, when $0<y\le 1$ you integrate from $0$ to $y$ and when $y > 1$ you integrate from $0$ to $1$

Caveat: This solution came from playing around with this distribution trying to decompose it into a function of two independent random variables. I think it's neat, but certainly not the standard way to approach things.

Observation: With a little bit of work (basically just change of variables), you can show that if you set $A=X^2,B=X^2/Y^2$, then $A,B$ are independent $U[0,1]$ random variables. Equivalently, if you start with such $A,B$ and set $(X,Y)=\left(\sqrt{A},\sqrt{\frac{A}{B}}\right)$, this will follow the same distribution as the initial distribution given in the question.

Then:

$$\mathbb{P}(Y\le y)=\mathbb{P}\left(\sqrt{\frac{A}{B}}\le y\right)=\mathbb{P}(A\le By^2)$$

$$=\mathbb{E}_B\mathbb{P}(A\le By^2|B)=\mathbb{E}_B(By^2\wedge1)$$

$$=\int_0^1(by^2\wedge1)\,db=y^2\int_0^1(b\wedge y^{-2})\,db$$

$$=\begin{cases} y^2\int_0^1b\,db=\frac{1}{2}y^2\text{ for } y<1\\ y^2\left[\int_0^{y^{-2}}b\,db+y^{-2}\left(1-y^{-2}\right)\right]=y^2\left[\frac{1}{2y^4}+y^{-2}-y^{-4}\right]=1-\frac{1}{2y^2} \text{ for } y>1 \end{cases}$$

Differentation yields the sought density function.