# Sum of two independent exponential distributions

Let $Y_1\sim \exp(\lambda_1)$ and $Y_2\sim \exp(\lambda_2)$ be two independent r.v.'s.

Show that the pdf $p_V(x)$ for their sum $V=Y_1+Y_2$ has the following form $$p_V(x)=\frac{e^\frac{-v}{\lambda_1}-e^\frac{-v}{\lambda_2}}{\lambda_1-\lambda_2};\quad v\ge0$$

### My attempt:

distribution of $Y_i$, $$p_{Y_i}(y_i)=\frac{1}{\lambda_i}e^\frac{-{y_i}}{\lambda_i};\quad x\ge0;\quad i=1,2$$

joint distribution of $Y_1$ and $Y_2$, $$p_{Y_1,Y_2}(y_1,y_2)=\frac{1}{\lambda_1\lambda_2}e^{\frac{-{y_1}}{\lambda_1}-\frac{{y_2}}{\lambda_2}};\quad {y_1},{y_2}\ge0$$

Given, $V=Y_1+Y_2$

let $U=Y_2$

So the Jacobian of Transformation is $1$

and hence joint distribution of $V$ and $U$, $$p_{V,U}(v,u)=\frac{1}{\lambda_1\lambda_2}e^{\frac{-{v-u}}{\lambda_1}-\frac{{u}}{\lambda_2}};\quad {v},{u}\ge0$$

so the distribution of $v$ $$p_{V}(v)=\int_0^\infty p_{V,U}(v,u)du=\frac{e^\frac{-v}{\lambda_1}}{\lambda_1-\lambda_2};\quad v\ge0$$

which doesn't match with the result.

We could calculate the cumulative distribution function of $V$, and then differentiate. It is quicker to use the convolution $$\int_{-\infty}^\infty f_1(z-t)f_2(t)\,dt,$$ where $f_1$ and $f_2$ are the densities of our random variables.
The density function $f_V(v)$ of $V$ is $0$ for $v\lt 0$. So we look only at the case $v\ge 0$. In our case, since the exponentials have density $0$ to the left of $0$, the actual expression is $$f_V(v)=\int_{t=0}^v \lambda_1 \lambda_2 e^{-\lambda_1(v-t)}e^{-\lambda_2 t}\,dt.$$ We are basically integrating $e^{-(\lambda_2-\lambda_1)t}$, which is not difficult.
• In one of my courses Sampling Distributions i read there are $4$ methods of finding sampling distributions.One of the methods are analytical method. The method can be used when there is only $2$ random variables.According to the method the distribution of the statistic $V=Y_1+Y_2$ is $$\int_{-\infty}^\infty f_1(z-t)f_2(t)\,dt,\ldots(1)$$. Could you please tell me (1)Why does not the range is $0$ to $\infty$ here? Why have you considered the cdf.If i consider eqn(1),this is pdf. – ABC Aug 24 '13 at 4:30
• (2)Also in my attempt if i consider the range from $0$ to $v$, i come up with the result. I did many convolutions according to my attempt and analytical method with the range of statistic.There i faced no problem. – ABC Aug 24 '13 at 4:33
• (2) We are integrating in principle from $-\infty$ to $\infty$, as I mentioned in the first formula. However, $\lambda_1 e^{-\lambda_1( v-t)}$ is only correct for the density of $Y_1$ when $v-t\ge 0$. Others like to use indicator functions to take care of this problem. It comes down to the same thing. – André Nicolas Aug 24 '13 at 4:41
• I apologize. I haven't understood yet. If $v-t\ge0$ then $v\ge t$. Does it mean $v$ ranges $t$ to $\infty$? Let $X_i\sim^{iid}N(0,1);i=1,2$. When i tried to find the distribution of $Y=X_1+X_2$ by analytical method i found $$f(y)=\int^{-\infty}_{\infty}\frac{1}{\sqrt{2\pi}}e^\frac{-(y-x_2)^2}{2}\frac{1}{\sqrt{2\pi}}e^\frac{-{x_2}^2}{2}dx_2$$ If i take the range from ${-\infty}$ to $y$, i don't come up with the result. Why will i take the range ${-\infty}$ to ${\infty}$ here? – ABC Aug 24 '13 at 5:00