[Math] How to find the p.d.f of $Z = XY$

probability

Let $X$ and $Y$ have the p.d.f $$f(x,y) = \begin{cases}1,& 0<x,y<1\\ 0,& \text{ otherwise}.\end{cases}$$ How to find the p.d.f of $Z = XY$?

I know that if $G$ is the c.d.f of $Z$, then $G(z) = P(XY \le z)$, after finding it I compute the derivative. But how to complete from there?
The answer key gives $g(z) = -\ln(z)$ on $(0,1)$ and $0$ elsewhere.

Best Answer

$$\Pr[XY \le z] = \int_{x=0}^1 \int_{y=0}^{\min(z/x,1)} f(x,y) \, dy \, dx = \int_{x=0}^z \int_{y=0}^1 \, dy \, dx + \int_{x=z}^1 \int_{y=0}^{z/x} \, dy \, dx.$$ Can you do the rest?


Alternatively, a somewhat easier calculation is to consider $$\Pr[XY > z] = \int_{x=z}^1 \int_{y=z/x}^1 \, dy \, dx.$$


Since there was some confusion about how the limits of integration were obtained, I have included the following diagram:

enter image description here

The horizontal axis represents outcomes of $X$, and the vertical axis represents outcomes of $Y$, so the light blue square represents points $(X,Y)$ that are joint outcomes of both variables. Because we know that $X$, $Y$ are joint uniform random variables on $[0,1] \times [0,1]$, it follows that the probability $\Pr[XY \le z]$ corresponds to the area of the combined red region, which is bounded by a family of hyperbolas of the form $xy = z$ for a constant $z \in [0,1]$. The first method of integration thus requires us to split the red region into two parts; the first is the lighter red rectangle and corresponds to the interval from $x = 0$ to where the hyperbola $y = z/x$ intersects the upper edge of the square $y = 1$; i.e., $x = z$. The second part is the darker red region corresponding to the remaining interval from $x = z$ to $x = 1$.

But if you study the picture, you can see that there is an easier way: the area of the square is constant and equal to 1, so we could have obtained the red area by instead computing the area of its complement--the blue region not covered by the red. This is the second method I describe, which calculates $\Pr[XY > z]$.

Related Question