Distribution of ratio of uniform and exponential random variables

This is a homework question, I feel like I'm doing it right, but I can't seem to get the answer to match up. I have a uniform RV from 2 to 4, and an exponential with mean 4, so $X \sim \text{UNI}(2,4)$, $Y \sim \text{EXP}(4)$.

I'm looking for the density of $U=\dfrac{Y}{X}$. So $f(x)=\dfrac{1}{2}$, $f(y)=\dfrac{e^{-y/4}}{4}$, and $f(x,y)=\dfrac{e^{-y/4}}{8}$.

Now if I substitute $Y=Ux$, and multiply in a Jacobian ($\dfrac{\text{d}}{\text{d}u}ux=x$, this might be a mistake, I'm not completely clear on this), I can get $f(x,u)=\dfrac{xe^{-xu/4}}{8}$. The marginal density $f(u)$ is found then by integrating out the $x$, which I can do by turning that joint density into a gamma function, where I need to get a $\dfrac{16}{u^2}$ on the bottom, so I end up with $\dfrac{2}{u^2}$ outside of the gamma integral, and after the gamma integrates to 1, f(u)=$\dfrac{2}{u^2}$. Anyone see a mistake here?

• Well, your method of proceeding is poor, though, regrettably, it is often taught as a recipe that can be followed without thinking too much about what's going on, and so I will not attempt to read through your work to see if there is a mistake. But the final answer should be testable. Since $Y \in (0,\infty)$, $Y/X$ takes on values in $(0,\infty)$ also. Is $2u^{-2}, u > 0$ a valid pdf? – Dilip Sarwate Apr 19 '14 at 22:32
• Thanks. I'm kind of swimming in new material, and it's easy to overlook the obvious, like does it integrate to 1? – user143719 Apr 20 '14 at 2:40

Your answer is clearly wrong since the density does not integrate to $1$ across the positive reals, as Dilip Sarwate.

The way I would approach this would be to take your $f(x,y)=\dfrac{e^{-y/4}}{8}$ and look at $$\Pr\left(\frac{Y}{X} \le u\right)=\int_{x=2}^{4} \int_{y=0}^{ux} \dfrac{e^{-y/4}}{8} dy\, dy= \int_{x=2}^{4}\left(\frac12- \dfrac{e^{-ux/4}}{2}\right) dx$$ $$=1-\frac{2}{u}\left({e}^{-\frac{u}{2}}-{e}^{-{u}}\right),$$ which has the correct limits as $u \to 0$ and $u \to \infty$, and then take the derivative for the density.

• Your method is how I would have done it. I'm led to believe that the assumptions to use the Jacobian method aren't satisfied, and my guess is that $U$ is not one-to-one with respect to $X$ or $Y$. Am I correct? – Clarinetist Apr 19 '14 at 22:50
• @Clarinetist: I try not to use Jacobians or even their 1-dimensional equivalent, since I often find CDFs much easier to work with. $U$ is monotonic with respect to $X$ and with respect to $Y$ – Henry Apr 19 '14 at 22:57

You have assumed that $X$ and $Y$ are independent random variables and so I suppose that the actual problem you are solving is stating this somewhere, or it is taken from a section titled Independent Random Variables in some book.

For a (continuous) random variable $Y$ with density $f_Y(y)$, the density of $Z = aY$ is $$f_Z(z) = \frac{1}{|a|}f_Y\left(\frac za\right).$$ Thus, for $x > 0$, given that $X = x$, the conditional density of $U =\frac YX = \frac Yx$ is $$f_{U\mid X}(u \mid X=x) = xf_Y(xu) = \frac{x e^{-xu/4}}{4}.$$ Now find the unconditional density of $U$ using $$f_U(u) = \int_{-\infty}^\infty f_{U\mid X}(u \mid X=x)f_X(x)\,\mathrm dx = \int_2^4 \frac{x e^{-xu/4}}{4}\times\frac 12 \,\mathrm dx.$$

• This integral gives the same result as the derivative of my expression, as it should. – Henry Apr 20 '14 at 8:53
• @Henry Thanks for the confirmation. I wrote a different answer from yours (which I did upvote) to point out to the OP the implicit assumption of independence and also to give the OP a different approach to the problem. I am very much of the same view that you expressed in your comment to Clarinetist: that it is easier to work with the CDF instead of Jacobians. – Dilip Sarwate Apr 20 '14 at 11:54