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.
 A: 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.
A: 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.
