Derive pdf of Z=XY where X and Y are two independent uniform r.v. on [0,1]

density functionprobabilityprobability distributionsprobability theory

First, let pdf X and Y be, $f(x)$ and $g(x)$, respectively.

I start by considering the a similar problem – derive the pdf of Z=X+Y from the cdf.
Consider the cdf of X+Y and condition on the value of Y:
\begin{align}
P(X+Y \leq z) &= \int P(X+Y \leq z | Y=y)g(y)dy \\
&= \int P(X \leq z-y) g(y)dy.
\end{align}

To find the pdf of $Z=X+Y, h(z),$ we take a derivative with respect to z. Hence, $h(z) = \int_{-\infty}^{\infty}f(z-y)g(y)dy$.
We know that $0\leq y \leq 1$ and $0\leq z-y \leq 1$, which can also be expressed as $z-1 \leq y \leq z$.
Putting this together, we get, $h(z) =\int_{max(z-1, 0)}^{min(z,1)} 1\cdot1 dy $.
We can then break the integral into separate cases, for $z\leq 0 \to h(z) = 0, 0\leq z \leq 1 \to h(z) = z, 1 \leq z \leq 2 \to h(z) = 2-z$.

Now, I am trying to use a similar approach for deriving the pdf of $Z=XY, k(z) = \int_{-\infty}^{\infty}f(\frac{z}{y})g(y)dy$.
We know that $0\leq y \leq 1$ and $0\leq \frac{z}{y} \leq 1$.

I am having trouble from here. I am not sure how to handle the domain of $0\leq \frac{z}{y} \leq 1$.
As I was doing some research on this problem, I learnt from this post that the pdf should have the form of,
\begin{align}
f_Z(z) &= \int_{-\infty}^{\infty}|\frac{1}{y}|f_Y(y)f_X(\frac{z}{y})dy \\
&= \int_0^1 \frac{1}{y}(1)f_X(\frac{z}{y})dy \\
&= \int_z^1 \frac{1}{y}(1)(1)dy
\end{align}

But I am still unclear how to derive the above from my earlier approach, $k(z) = \int_{-\infty}^{\infty}f(\frac{z}{y})g(y)dy$ where $0\leq y \leq 1$ and $0\leq \frac{z}{y} \leq 1$.
Any help is very much appreciated. Thank you.

Best Answer

For $z\in(0,1]$ we find:$$P(XY\leq z)=\int_0^1P(XY\leq z|X=x)f_X(x)dx=\int_0^1P\left(Y\leq\frac{z}{x}\right)dx$$Knowing that $P(Y\leq c)=1$ whenever $c\geq1$ an $P(Y\leq c)=c$ if $0\leq c<1$ we split this in:$$\cdots=\int_0^zdx+\int_z^1\frac{z}{x}dx=z-z\ln z$$So the CDF is found now and its derivative - i.e. its PDF - is: $$f_{XY}(z)=-\ln z\text{ for }z\in(0,1]$$

I hope this makes things more clear for you.


Taking the derivative wrt $z$ of an integral like $\int_0^1 F_Y\left(\frac{z}{x}\right)dx$ is not just a matter of replacing $F_Y$ by its derivative $f_Y$.

Applying the chain rule you should replace $F_{Y}\left(\frac{z}{x}\right)$ by $\frac1{x}f_Y\left(\frac{z}{x}\right)$.

Personally I rather avoid these tricky operations and go for a more direct route.

Further beware that $\frac1{x}f_Y\left(\frac{z}{x}\right)$ takes value $\frac1{x}$ if $x\in[z,1]$ and takes value $0$ otherwise, so that:$$f_{XY}(z)=\int_z^1\frac1xdx=-\ln z\text{ for }z\in(0,1]$$as was found above.

Related Question