Sum of two independent exponential functions Hey, I need a little help with this question.
Let $X$ and $Y$ be independent, exponentially distributed random variables.
What is the distribution of $Z=\frac X {X+Y}$?
I just can't figure it out because of the sum on the denominator, thank you for your help.
 A: We will assume that the parameters of the exponentials are not necessarily the same. Let $X$ have paramemter $\kappa$ and let $Y$ have parameter $\lambda$. Then the joint density (when $x\gt 0$, $y\gt 0$) is $\kappa \lambda e^{-\kappa x}e^{-\lambda y}$.  
We go after the cdf $F_Z(z)$ of $Z$. Note that $z$ ranges over the interval $[0,1]$ and it does no harm to assume that $z$ is neither $0$ nor $1$. 
We have $\frac{X}{X+Y} \le z$ if and only if $X\le (X+Y)z$ if and only if $Y\ge X\frac{1-z}{z}$. Thus
$$F_Z(z)=\Pr(Z\le z)=\int_{x=0}^\infty \kappa \exp(-\kappa x)\left(\int_{y=x(1-z)/z}^\infty \lambda \exp(-\lambda y)\,dy\right)\,dx.$$
The inner integral is easy to evaluate, it is just the right-tail of an exponential, and is equal to $\exp(-x\lambda(1-z)/z)$.
So now we need to evaluate 
$$\int_0^\infty \kappa \exp\left(-x(\kappa +\lambda(1-z)/z   )\right)\,dx.$$
The integration is straightforward, we get a quite simple function of $z$. 
So now we have the cdf of $Z$. Differentiate to find the density. 
