[Math] Pdf of $Z=XY$ where $X$ and $Y$ are independent uniform$(0,1)$ variables

calculusdensity functionprobability distributions

Let's say I have two independent random variables $X$ & $Y$ that are uniformly distributed over $0$ and $1$, with pdf:

$$f_X(x) = \begin{cases}1 & 0<x<1 \\ 0 & \text{ otherwise } \end{cases}$$

$$f_Y(y) = \begin{cases}1 & 0<y<1 \\ 0 & \text{ otherwise } \end{cases}$$

These two random variables are related to random variable Z, according to the function:

$$Z=XY$$

Then, I'm given a general formula to apply that will solve for the PDF of Z, if given the pdf of X and Y:

$$f_Z(z) = \int \limits_{-\infty}^{\infty} \bigg|\frac{1}{x}\bigg|~f_{XY}\Big(x,\frac{x}{z}\Big)~dx$$

$$f_Z(z) = \int \limits_{-\infty}^{\infty} \bigg|\frac{1}{x}\bigg|~f_{X}(x)~ f_{Y}\Big(\frac{x}{z}\Big)~dx$$

when I apply this formula, I get:

$$f_Z(z) = \int \limits_{0}^{1} \bigg|\frac{1}{x}\bigg|~(1)(1)~dx$$

$$f_Z(z) = \bigg[\ln x\bigg]_{0}^{1} = (0 – \infty) = -\infty$$

When the textbook applies this formula they get:

$$f_Z(z) = \int \limits_{z}^{1} \bigg|\frac{1}{x}\bigg|~(1)(1)\Big)~dx$$

$$f_Z(z) = \bigg[\ln x\bigg]_{z}^{1} = \ln 1 – \ln z$$

$$f_Z(z) = -\ln z$$

I'm wondering, how did they get the y in the lower limited of the integral?

random variables.

Best Answer

We have for a $z\in(0,1)$ (well, $(0,1)$ is the range of $Z$, we need information only on this interval): $$ \begin{aligned} f_Z(z) &= \int_{-\infty}^{+\infty} \left|\frac{1}{x}\right|\; f_{(X,Y)}\left(x,\color{red}{\frac zx}\right)\; dx \\ &= \int_{-\infty}^{+\infty} \left|\frac{1}{x}\right|\; f_X(x)\; f_Y\left(\color{red}{\frac zx}\right)\; dx \\ &= \int_0^1 \frac{1}{x}\; (1)\; f_Y\left(\color{red}{\frac zx}\right)\; dx \\ &= \int_z^1 \frac{1}{x}\; (1)\; (1)\; dx \\ &=\Big[\ \ln x\ \Big]_{x=z}^{x=1} \\ &=-\ln z\ . \end{aligned} $$ The limits of integration were changed according to $0\le x\le 1$, needed for $f_X(x)\ne 0$, and according to $0\le \frac zx\le 1$, needed for $f_Y(z/x)\ne 0$.