# Finding distribution functions of exponential random variables

Find the distribution functions of X+Y/X and X+Y/Z, given that X, Y, and Z have a common exponential distribution.

I think the main thing is that I wanted to confirm the distribution I got for X+Y. I'm doing the integral, and my calculus is a little rusty. I'm getting -e^-ax - ae^-as with parameters x from -infinity to infinity.

From there presumably I can just treat X+Y like one variable and then divide by z.

Thanks so much!

-
Tempted to suggest this related answer: math.stackexchange.com/questions/30938/… – Did Apr 18 '11 at 20:22
Are you looking for distribution functions of $X+\frac Y X$ and $X+\frac Y Z$ or $\frac{X+Y}X$ and $\frac{X+Y}Z$. I'm assuming the latter, but you need parentheses. – GWu Apr 18 '11 at 20:36
Also, I guess you assume that $X, Y$ and $Z$ are independent. – GWu Apr 18 '11 at 20:49
It would be good to define the exponential distribution to indicate what $a$ and $x$ are. Also your result needs parentheses-presumably it is $-e^{-ax}-ae^{-as}$ (what is $s$? a typo for $x$?) but you have written $-e^{-a}x-ae^{-a}s$ – Ross Millikan Apr 19 '11 at 3:12

For $t>1$, the distribution function of $(X+Y)/X$ is given by \begin{eqnarray*} P((X+Y)/X < t) &=&P(Y/(t-1)< X)\cr &=&\int_0^\infty P(y/(t-1)< X)\ ae^{-ay}\ dy\cr &=&\int_0^\infty e^{-ay/(t-1)} \ ae^{-ay}\ dy\cr &=&(t-1)/t. \end{eqnarray*}

Here, $S:=X+Y$ and $Z$ are independent and the density of $S$ is $g(s)=a^2 s e^{-as}$ for $s>0$ and zero otherwise (gamma density). Thus, for $t>0$, the distribution function of $(X+Y)/Z$ is given by \begin{eqnarray*} P(S/Z < t) &=&P(S/t< Z)\cr &=&\int_0^\infty P(s/t< X) \ a^2 s e^{-as}\ ds\cr &=&\int_0^\infty e^{-as/t} \ a^2se^{-as}\ ds\cr &=&[t/(t+1)]^2. \end{eqnarray*}

I want to add a comment on Michael's answer and your response. I guess that your book gave you a formula for the density of the sum of independent random variables that looks like this: $$f_{X+Y}(s)=\int_{-\infty}^{\infty} f_X(s-y)\ f_Y(y)\ dy.$$

You thought, "both my random variables are exponential, so I should plug in $a e^{-a(s-y)}\ ae^{-ay}$. "

But the density of an exponential random variable is not $f(y)=a e^{-ay}$, it is $$f(y)=\cases{ae^{-ay} & \text{ if }y>0\cr 0 & \text{ otherwise}.}$$

I often have a hard time convincing students that these two formulas are not the same. The "otherwise zero" part of the formula is crucial.

So the expression $f_X(s-y)f_Y(y)$, to be integrated over all $y$ values, is $a e^{-a(s-y)} a e^{-ay}$ only for those $y$ that satisfy $y>0$ and $s-y>0$. Otherwise, $f_X(s-y)f_Y(y)$ is zero.

In particular, the whole integral becomes zero unless $s>0$.

When $s>0$, the terms with exponent $y$ cancel each other, so the integral is quite easy $$f_{X+Y}(s)=\int_0^s a^2 e^{-as} dy=a^2 s e^{-as}.$$

-
I could not agree more with the comment part of your post. A way to (try to) avoid these missteps is to use systematically indicator functions. In your example, one could write $f(y)=a\mathrm{e}^{-ay}\mathbf{1}_{y\ge0}$ for every real $y$ and remember to copy faithfully the $\mathbf{1}_{y\ge0}$ term when using $f(y)$ in integrals. An additional advantage of the notation is that the bounds of the integrals involved become natural. – Did Apr 19 '11 at 21:27
@Didier Exactly right! In fact that's how I teach it, with indicator functions, rather than using the "case" construction. I still have to convince my students that indicator functions are "real functions", though :) – Byron Schmuland Apr 19 '11 at 21:34

If $X$ and $Y$ are independent exponential random variables, then $X+Y$ has a gamma distribution.

Also, your integral shouldn't go from $-\infty$ to $\infty$, because exponentials can't be negative.

-
thanks, I integrated that way because that was how it was defined in my book. I'm sorry, but I don't understand how you got to the gamma distribution. – user9749 Apr 18 '11 at 19:17
That's understantdable. I'm teaching entry level of probability this year and we didn't even touch gamma distribution:) – GWu Apr 18 '11 at 20:39
This is a standard fact about the gamma distribution; it's actually derived by integration. – Michael Lugo Apr 19 '11 at 17:30

To answer your question about $X+Y$: If $X$ and $Y$ are independent exponential random variables, you can check that $X+Y$ has the Gamma distribution by computing the characteristic function of $X+Y$:

$\mathbb{E}[e^{it(X+Y)}] = \mathbb{E}[e^{itX}e^{itY}] = \mathbb{E}[e^{itX}]\mathbb{E}[e^{itY}]$ by independence.

Then if $X$ and $Y$ are exponential with parameter $\lambda$, you have that

$\mathbb{E}[e^{it(X+Y)}] = (1-\frac{it}{\lambda})^{-1}(1-\frac{it}{\lambda})^{-1} = (1-\frac{it}{\lambda})^{-2}$, and this is the characteristic function of $Gamma(2, \lambda^{-1})$.

-

Thanks so much for your help. I'm still having some trouble, however. Currently for (X+Y)/X I have denoted X+Y = t, adn the distribution of T is \int \boldsymbol{\alpha e^{-\alpha x}(1+\alpha x + \frac{(\alpha x)^2}{2})}. Then doing the integral caculations for the distribution, I get \int \boldsymbol{\alpha e^{-\alpha t x}(1+\alpha t x + \frac{(\alpha t x)^2}{2})}. This seems right but for some reason I'm not getting the answer I'm supposed to. Is it because X+Y and X are related? Would this work for (X+Y)/Z?

Thanks!

-