# Density function of summed variables

Let $X$ and $Y$ be two independent and exponentially distributed random variables with parameter $\lambda$.

Let $U := \frac{X}{X + Y}$.

Find the density function $f_U$ of $U$.

So we basically know: $$f_X(x) = \lambda e^{-\lambda x}\\ f_Y(y) = \lambda e^{-\lambda y}$$

But I really have no clue how to find $f_{\frac{X}{X+Y}}(u)$.

Does anyone have some ideas and could help me?

Use the CDF method. The support of $U$ is in $(0, 1)$ since you're dividing a positive random variable $X$ by a larger positive random variable $X+Y$, so let $u \in (0, 1)$. Then $$\mathbb{P}(U \leq u) = \mathbb{P}\left(\dfrac{X}{X+Y} \leq u\right) = \mathbb{P}\left(\dfrac{1-u}{u}\cdot X \leq Y\right)\text{.}$$ Since $u \in (0, 1)$, then $\dfrac{1-u}{u}\cdot X$ will be a positively-sloped line in the $X$-$Y$ plane:

and $$\mathbb{P}\left(\dfrac{1-u}{u}\cdot X \leq Y\right) = \int_{0}^{\infty}\int_{(1-u)x/u}^{\infty}f_{X, Y}(x, y)\text{ d}y\text{ d}x\text{.}$$ By independence, $$f_{X, Y}(x, y) = \lambda^2e^{-\lambda x}e^{-\lambda y}$$ for $x, y > 0$. Hence, \begin{align} \int_{0}^{\infty}\int_{(1-u)x/u}^{\infty}f_{X, Y}(x, y)\text{ d}y\text{ d}x &= \lambda\int_{0}^{\infty}e^{-\lambda x}e^{-\lambda (1-u)x/u}\text{ d}x \\ &= \lambda\int_{0}^{\infty}e^{-\lambda x/u}\text{ d}x \\ &= \lambda \cdot \dfrac{u}{\lambda} \\ &= u\text{.} \end{align} There are several shortcuts that I used above that you should be able to identify. If you don't understand how I got from one step to the next, please let me know. Take the derivative of this with respect to $u$ to get $$f_{U}(u) = \begin{cases} 1, & u \in (0, 1) \\ 0, & \text{otherwise.} \end{cases}$$ Hence, $U$ is uniform in $(0, 1)$.

• Thanks for the answer! I actually didn't get from $P[U\leq u]$ to the last expression with P – Ergo Jan 7 '17 at 19:45
• @Ergo Graph a positively sloped line which goes through the origin where $X$ and $Y$ are $\geq 0$. Draw the region where $Y$ is greater than that line. $Y$ will range from that line (in this case, $y = (1-u)/u * x$) to $\infty$, and $X$ will range from $0$ to $\infty$. – Clarinetist Jan 7 '17 at 19:47
• @Ergo I've inserted an image. – Clarinetist Jan 7 '17 at 19:52
• Oh yeah I got this part thanks! But can I ask how do you procede everytime such question is asked? Like what is a general way to procede, and why do we have that inequality with Y and not X? Because I understood all your process but if I get a problem like this, maybe a little different I wouldn't have a general approach to solve it! Thanks again – Ergo Jan 7 '17 at 20:00
• @Ergo The general idea is this: when you're trying to find the CDF of a transformation of two variables $U$, you solve $\mathbb{P}(U \leq u)$ and write it as a function of $Y$ or $X$ - I choose $Y$ because it's easier to graph with. Then you integrate over that region. Take the derivative to find the PDF of $U$. Does that make sense? – Clarinetist Jan 7 '17 at 20:01