I've got the next question:

Let $X,Y$ independent random variables such that:

$$ X \sim Unif(-1,0) \quad \mbox{ and } \quad Y \sim Unif(0,1).$$

Find the density function of $Z=XY$ using the density product formula for independent random variables. Repeat the exercise using the fact that

$$ X \sim Unif(0,1) \quad \mbox{ and } \quad Y\sim Exp(\lambda).$$

My attempt:

If $Z = XY$ then:

\begin{align*} f_Z(z) &= \int_{-\infty}^{\infty} \dfrac{1}{|x|}f_X(x)\cdot f_Y(z/x)dx\\ &= \int_{-1}^{0} \dfrac{1}{|x|}1 \cdot 1 dx\\ &= \int_{-1}^{0} -\dfrac{1}{x} dx \end{align*}

Clearly so far I have come to a problem since that integral does not converge. Then I just tried the other exercise first, so, if $X\sim Unif(0,1)$, $Y\sim Exp(\lambda)$ and $Z=XY$ then:

\begin{align*} f_Z(z) &= \int_{-\infty}^{\infty} \dfrac{1}{|x|}f_X(x)\cdot f_Y(z/x)dx\\ &= \int_{0}^{1} \dfrac{1}{|x|}1 \cdot \lambda e^{-\lambda (z/x)} dx\\ &= \int_{0}^{1} \dfrac{\lambda}{x} e^{-\lambda (z/x)} dx \end{align*}

Here, I face another problem because I tried to compute that integral and got stuck, I checked in wolfram and that integral is equal to $\lambda\cdot \Gamma(0,\lambda z)$ and I don't know how to compute that.

My first thought was that I was making mistakes applying the formula, but I don't so the only conclusion that seems reasonable to me is that the limits of integration are wrong. I would appreciate if someone can guide me to correct those limits.

  • 1
    $\begingroup$ $f_Y(z/x)=1$ is wrong. YOu have the restriction $z/x<1$, then the correct expression is $[z<x]$ or $1_{z<x}$ (using either Iverson brackets or indicator function, as you prefer). And that results in changing your integration limits. $\endgroup$
    – leonbloy
    Jun 3, 2020 at 18:56
  • $\begingroup$ @leonbloy You're right, I totally miss that, but instead $z < x$ shouldn't it be $z >x$? Since both $x$ and $z$ take values ​​at $(-1,0)$. $\endgroup$
    – DkRckr12
    Jun 3, 2020 at 20:33
  • $\begingroup$ Yes, I missed that. $\endgroup$
    – leonbloy
    Jun 4, 2020 at 1:07

1 Answer 1


Using the Iverson bracket notation, $f_X(x)= [-1 < x < 0]$, $f_Y(y)=[0<x<1]$

Then $f_X(x) f_Y(z/x)=[-1<x<0][0<z/x<1] = [-1<x<0] [x<z<0]$

This is equivalent to $[-1<x<z][-1<z<0]$. Hence

\begin{align*} f_Z(z) &= \int_{-\infty}^{\infty} \dfrac{1}{|x|}f_X(x)\cdot f_Y(z/x)dx\\ &= \int_{-1}^{z} \dfrac{1}{|x|} dx \quad [-1<z<0]\\ &= -\int_{-1}^{z} \dfrac{1}{x} dx \quad [-1<z<0]\\ &= - \log(z) \quad [-1<z<0] \end{align*}

The second one should be similar.


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.