# If $(X,Y)$ are i.i.d. exponential then $X/(X+Y)$ follows a Beta distribution [duplicate]

I'm asked to show that if $X$ and $Y$ are independent exponential random variables with parameter $\lambda&space;=1$, then $X/(X+Y)$ has a Beta distribution.

Up to know I had to find the new pdf or df when $Y$ was of the kind $Y=aB + c$ which I understand now. Here a hint is given to use "Law of total probability" which I've only seen in measure theory.

My guess would be to compute $\mathbb{P}(X/(X+Y)\leq&space;x)$ using the fact that the df of exponential distribution is $1&space;-&space;e^{-\lambda&space;x}$. I'm stuck at that step.

## marked as duplicate by Did probability-distributions StackExchange.ready(function() { if (StackExchange.options.isMobile) return; $('.dupe-hammer-message-hover:not(.hover-bound)').each(function() { var$hover = $(this).addClass('hover-bound'),$msg = $hover.siblings('.dupe-hammer-message');$hover.hover( function() { $hover.showInfoMessage('', { messageElement:$msg.clone().show(), transient: false, position: { my: 'bottom left', at: 'top center', offsetTop: -7 }, dismissable: false, relativeToBody: true }); }, function() { StackExchange.helpers.removeMessages(); } ); }); }); Mar 1 '17 at 8:50

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

## 2 Answers

The naive approach: we have $$f_X(x) = e^{-x}, \quad f_Y(y) = e^{-y}, \quad x, y > 0.$$ Define $Z = X/(X+Y)$, which implies $Y = X(1/Z - 1)$, and note that we must have $0 < Z < 1$. Then \begin{align*} F_Z(z) &= \Pr[X/(X+Y) \le z] \\ &= \Pr[Y > X(1/z - 1)] \\ &= \int_{x=0}^\infty \Pr[Y > x(1/z - 1) \mid X = x]f_X(x) \, dx, \end{align*} by the law of total probability*. Continuing, $$F_Z(z) = \int_{x=0}^\infty e^{-x(1/z-1)} e^{-x} \, dx = \int_{x=0}^\infty e^{-x/z} \, dx = \left[-ze^{-x/z}\right]_{x=0}^\infty = z,$$ hence $f_Z(z) = F_Z'(z) = 1$, and $Z$ is uniform on $(0,1)$.

*Note. The law of total probability for a continuous random variable $X$ and some event of interest $A$ is $$\Pr[A] = \int_{x \in \Omega} \Pr[A \mid X = x] f_X(x) \, dx,$$ where $\Omega$ is the support of $X$.

• Thanks for your answer. I don't understand what you put inside your first integral. I would have simply said Fz(z) = 1 - df of Y with value x(1/z - 1). Alright, then after it won't help because we have two variables. I need to find the formula for your integral – endlessend2525 Mar 1 '17 at 7:29

Define $U = X/(X+Y) = g_u(X,Y)$ and $V = X+Y = g_v(X,Y)$, thus $$f_{U,V}(u,v) = f_X (g_u^{-1} (u,v))f_{Y} (g_v^{-1} (u,v))| \det\frac{\partial(X,Y)}{\partial(u,v)} |$$ where $X =UV$ and $Y = V (1-U)$, so $$| \det\frac{\partial(X,Y)}{\partial(u,v)} |=v.$$ As such, $$f_{U,V}(u,v)=e^{-uv}e^{-v(1-u)}v=ve^{-v}= \mathcal{G}amma(2,1)\mathcal{B}eta(1,1).$$ Finally, $$f_U(u) = \int f_{U,V}(u,v)dv = \mathcal{B}eta(1,1) = \mathcal{U}(0,1).$$

See here for more details and examples.