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:


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.

  • $\begingroup$ seems like there are two regions of integration? First you need to find point where y=1 and y=x/z intersect, then draw a vertical line through this point.... integrate square to left of this line and integrate curve starting at this point until x=1? Or, would you just integrate only to the right of the line and ignore the square of the left... $\endgroup$
    – pico
    Apr 9, 2020 at 14:38

2 Answers 2


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$.


dan_fulea gives a good answer and my answer is in conjunction with theirs. I'll use a picture.

We have ${Z}={X}{Y}\longrightarrow {Y}=\frac{Z}{X}$ so ${Y}=f(x)$ for fixed ${z}$'s

enter image description here

Our $\tt probability$ only exists over the $\color{gray}{\bf GRAY}$ SQUARE. I have graphed $Y=\frac{Z}{X}$ for ${Z}=\{.5,.9,1.1\}$. For ${Z}=1.1$ it misses the region we can about. So any integration to ${Y}=\frac{11}{10X}$ will give bogus $\tt probability$.

The $\color{purple}{purple}$ region is under the graph $Y=\frac{.5}{X}$. In fact, every ${Z}\in(0,1)$, $X=Z$. Why? Well the graph $Y=\frac{Z}{X}$ always intersects the line ${y}={1}$ so ${1}=\frac{Z}{X}\Rightarrow {Z}={X}$ Hence $\displaystyle\int_{z}^{1}$. $\bf IF$ one integrates from ${0}$, $\bf THEN$ one will get $\infty$. You can plug in $X$ values really close to $0$ and see the graph shoot to $\infty$

$\bf IF$ there are any questions, $\bf THEN$ comment below or email me at $\tt TheGreatJRB@Berkeley.edu$

Applied Mathematics Undergraduate
University of California, Berkeley


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.