# What is the probability density function of $X_1+X_2$?

Given $X_1 \sim \exp(\lambda_1)$ and $X_2 \sim \exp(\lambda_2)$, and that they are independent, how can I calculate the probability density function of $X_1+X_2$?

I tried to define $Z=X_1+X_2$ and then: $f_Z(z)=\int_{-\infty}^\infty f_{Z,X_1}(z,x) \, dx = \int_0^\infty f_{Z,X_1}(z,x) \, dx$.
And I don't know how to continue from this point.

• You cannot, unless it is given also that $X_1$ and $X_2$ are independent. In that case you can apply convolution. Try that out and if you get stuck then edit your question, add your efforts and tell us where you got stuck. – drhab May 9 '18 at 11:01
• @drhab I did that, than you. – AskMath May 9 '18 at 11:06
• @drhab : It is somewhat exaggerated to say this can be done only when they are independent. But certainly one needs at least some information about their joint distribution. – Michael Hardy May 9 '18 at 11:18
• @MichaelHardy That's right. "More info needed" is more appropriate. My words were inspired by the fact that a.s. the OP had forgotten to mention that the rv's were independent. – drhab May 9 '18 at 11:21

$$f_Z(z)=\int f_{X_1}(x)f_{X_2}(z-x)dx$$

Note that in your case the RHS has integrand $0$ if $z\leq0$ so that $f_Z(z)=0$ if $z\leq0$.

For $z>0$ we have:$$f_Z(z)=\int f_{X_1}(x)f_{X_2}(z-x)dx=\int_0^{z}f_{X_1}(x)f_{X_2}(z-x)dx$$

Work this out yourself.

HINT:

Assuming independence.

We are given that the P.D.F. of $X$ is $f_X(x)=\lambda e^{-\lambda x},\, x\ge0$ and the P.D.F. of $Y$ is $f_Y(Y)=\lambda e^{-\lambda y},\, y\ge0$.

Then using convolution, \begin{align}f_{X+Y}(x+y)&=\int_{-\infty}^\infty f_X(x+y-y)f_Y(y)\,dy\\&=\int_0^{x+y}\lambda e^{-\lambda(x+y)}\lambda e^{-\lambda y}\,dy\end{align} which should now to easy to integrate.

• Can you explain how to integrate that? – AskMath May 9 '18 at 11:09
• Further hint: take the $\lambda$s outside of the integral and use the exponential rule to combine the $\exp$ terms. Since we are integrating over $y$, treat $x$ as a constant. – TheSimpliFire May 9 '18 at 11:10
• But $y$ in the upper limit of the integral – AskMath May 9 '18 at 11:12
• So? Just integrate it w.r.t. $y$ and then substitute $x+y$ and $0$ into the integrated expression respectively. – TheSimpliFire May 9 '18 at 11:12

Just as has been pointed out by the other answers, you can simply calculate the pdf for $X_1 + X_2$ by using the principle of convolution. In fact, in general one can show that if $X_1,X_2,...X_n$ are i.i.d variables with exponential distribution with parameter $\lambda$ then $S = \sum_{k=1}^{n}X_k \sim \Gamma (n,\lambda)$.