[Math] Finding the probability density function of $X+Y$

density functionfunctionsprobability

Question: Let $X$ and $Y$ be two independent and identically distributed exponential random variables with parameter $\lambda>0$. Compute the probability density function of $X+Y$.

My Answer: I have found the joint probability density function of $X$ and $Y$ to be $f_{X,Y}(x,y)=\lambda^2e^{-\lambda x – \lambda y}$. I then let $Z=X+Y$ and calculated $F_Z(z)=\lambda^2e^{-\lambda z}$.

I know I need to integrate $F_Z(z)$ to calculate the density function but am unsure on what the limits should be or if I found $F_Z(z)$ correctly. I was also wondering if there is a quicker way to tackle such questions or if this method is okay.

Best Answer

You can use convolution to solve the problem.

Let $z \geq 0$,

\begin{align}f_Z(z) &= \int_0^z f_X(x)f_Y(z-x) dx \\ &= \int_0^z \lambda \exp(-\lambda x) \lambda \exp(-\lambda (z-x)) dx \\ &= \int_0^z \lambda^2 \exp(-\lambda z) dx \\ &= \lambda^2 z\exp(-\lambda z) \end{align}

As for the problem of how to find the limit of integration, we want $0 \leq x < \infty$ and $0 \leq z-x<\infty $. Solving for $x$ in the inequalities give you $0 \leq x \leq z$.

Remark $1$: Sum of independent identical exponential distributions is known as Erlang Distribution, which is a special case of gamma distribution.

Remark $2$: To find pdf from CDF, we differentiate rather than integrate.

Remark $3$: Now, suppose we insist to find CDF from joint distribution and then find the pdf by differentiating it.

Let $z > 0$,

\begin{align} F_Z(z) &= Pr(Z \leq z)\\ &= \int_0^z \int_0^{z-x} \lambda^2 \exp(-\lambda x) \exp( - \lambda y)dy dx \\ &= \int_0^z \lambda \exp(-\lambda x) \left( 1-\exp(-\lambda(z-x))\right) dx \\ &= \int_0^z \lambda \left( \exp(-\lambda x)-\exp(-\lambda z)\right) dx \\ &= 1- \exp(-\lambda z) - \lambda z \exp(-\lambda z) \\ &= 1 - (1+\lambda z) \exp(-\lambda z) \end{align}

Differentiating:

\begin{align} f_Z(z) &=-\lambda \exp(-\lambda z) -(1+\lambda z)(-\lambda)\exp(-\lambda z)\\ &= \lambda^2 z \exp(-\lambda z) \end{align}

Related Question