# Finding distribution function of $Y/X$ and probability density function of $X+Y$

I'm studying for an exam at the moment, and these types of questions have just got me stumped to the point where I need a step-by-step walkthrough...

More specifically I've got two questions I just can't get past:

Given two random variables $X$ and $Y$ with

$f_X(x)= \left\{ \begin{array}{l l} xe^{-x} & \quad \text{if$x$> 0},\\ 0 & \quad \text{else}.\\ \end{array} \right.$

$f_Y(y)= \left\{ \begin{array}{l l} e^{-y} & \quad \text{if$y$> 0},\\ 0 & \quad \text{else}.\\ \end{array} \right.$

as respective densities, show that $Z = Y/X$ has the following distribution function

$F_Z(z)= \left\{ \begin{array}{l l} 1-\frac1{(1+z)^2} & \quad \text{if$y$> 0},\\ 0 & \quad \text{else}.\\ \end{array} \right.$

Also have to find the density function, but to my knowledge this is just deriving with respect to $z$ and is $\frac2{(z + 1)^3}.$

A very similar question asks to show that:

If $X, Y$ are random variables with given densities

$f_X(x)=\frac12x^2e^{-x} \ \ if \ x >0,$

$f_Y(y)=e^{-y} \ \ if \ y > 0,$

then $Z = X + Y$ has probability density function

$f_Z(z)= \frac{z^3}6e^{-z}.$

I'm guessing the first step is to find $Z$'s distribution function, but this is the part that stumps me in the first question also. Please help.

-
For the cumulative probability distribution function of a random variable called capital $X$, one should write $F_X$, with a subscript capital $X$. Its value at a particular number called lower-case $x$ would then be $F_X(x)$. For example, its value at $3$ is $F_X(3)$ (not $F_3(3)$, which is tacitly suggested by writing $F_x(x)$, as if the subscript and the argument in parentheses were both the same thing). And similarly for density functions. –  Michael Hardy Aug 20 '12 at 1:57
Does it say anywhere that $X$ and $Y$ are independent random variables? Without this (or a specification of the joint density $f_{X,Y}(x,y)$), the problem cannot be solved. –  Dilip Sarwate Aug 20 '12 at 2:27
A very similar question (with the independence assumption mentioned by @Dilip) is solved at length here. –  Did Aug 20 '12 at 8:21
@did thanks for the comment. As I didnt solve explicitely I dont know but I believe in you. –  Seyhmus Güngören Aug 20 '12 at 9:04

It is so late here almost 2 am but I can explain the way to follow. First of all the two questions are related to *function of a random variable*$\rightarrow$ check in wikipedia.

In the second question you have $Z=X+Y$ and it corresponds to the convolution of two marginal pdfs. Simply you will convolve $f_X(x)$ with $f_Y(y)$ and you will get $f_Z(z)$.

In the first one can again use the concept of function of a random variable. Since the pdfs are defined in the positive real line, I guess it is easier to use the identity

$$\log(Z)=\log(Y)-\log(X)$$

From here again using function of a random variable one can calculate simply the pdfs of $\log(Y)$ and $-\log(X)$. Again the pdf of $\log(Z)$ will be the convolution of these two pdfs that you found. Now we have a random variable $\log(Z)$ with pdf $f_{\log(Z)(\log(z))}$ to get $f_Z(z)$ again we need to apply function of a random variable now our function is $\exp$ and the related pdf is the one which we found $f_{\log(Z)(\log(z))}$. The result will give $f_Z(z)$.

I hope it helps. Have a good night.

-
For the cumulative probability distribution function of a random variable called capital $X$, one should write $F_X$, with a subscript capital $X$. Its value at a particular number called lower-case $x$ would then be $F_X(x)$. For example, its value at $3$ is $F_X(3)$ (not $F_3(3)$, which is tacitly suggested by writing $F_x(x)$, as if the subscript and the argument in parentheses were both the same thing). And similarly for density functions. –  Michael Hardy Aug 20 '12 at 1:59
The approach involving logarithms seems far too complicated. There are easier ways of obtaining the answer. Also, you have assumed that $X$ and $Y$ are independent although the OP did not mention this. –  Dilip Sarwate Aug 20 '12 at 2:30
@Michael Hardy you are right. I simply copied the style in the question. I correct it now. Thx for the comment. –  Seyhmus Güngören Aug 20 '12 at 8:02
Sorry but the route through the logs is unnecessary and only complicates things. –  Did Aug 20 '12 at 8:23

There is a "lather rinse repeat" way of solving such problems. I'll show you some steps to do the first one, you can try the technique on the second one too.

\begin{eqnarray*} F_Z(z) &=& \Pr(Z \leq z) \\ &=& \Pr(Y/X \leq z) \\ &=& \int_0^\infty \Pr(Y \leq zx) f_X(x) dx \\ &=& \int_0^\infty (1-e^{-zx})xe^{-x} dx. \end{eqnarray*}

Run this integral through, and that should do it. Of course, some of these steps may require careful justifications: for instance going from $Y/X \leq z$ to $Y \leq zX$ requires care with the sign of $X$. I hope you can figure these details out.

Alternatively, for the second one, you may want to try going the moment generating function/characteristic function route.

-
The hidden assumption here is that $X$ and $Y$ are independent random variables, which the OP neglected to state, but which you should include for completeness. –  Dilip Sarwate Aug 20 '12 at 2:24