Find density function of sum of exponentially distributed $X_1,X_2$

72 Views Asked by At

Let's assume that $X_1,X_2$ are independent and both obey the same exponential distribution \begin{align*} &\rho(x)=\begin{cases} \lambda e^{-\lambda x},& \text{ if } x\geq 0\\ 0, & \text{ if } x<0, \end{cases} \end{align*} where $\lambda >0$. Find the density function and the distribution function of $Y:=X_1+X_2$.

My approach:

Let be $0\leq z$ then \begin{align*} &P(X_1+X_2\leq z)=P(x_1\geq 0,0\leq x_2\leq z-x_1)=\int\limits_{0}^{\infty}\int\limits_0^{z-x_1}\rho_{x_1}(x_1)\rho_{x_2}(x_2)~\!dx_2~dx_1\\ &\underset{\text{substitution}}{=}\int\limits_{x_1}^{z}\int\limits_{0}^{\infty}\rho_{x_1}(x_1)\rho_{x_2}(x_2-x_1)~\!dx_1dx_2. \end{align*} If we take the definition of the exponential density function into account, we get \begin{align*} &\int\limits_{x_1}^{z}\int\limits_{0}^{\infty}\rho_{x_1}(x_1)\rho_{x_2}(x_2-x_1)~\!dx_1~dx_2=\int\limits_{x_1}^{z}\int\limits_{0}^{x_2}\rho_{x_1}(x_1)\rho_{x_2}(x_2-x_1)~\!dx_1~dx_2\\ &=\int\limits_{x_1}^{z}\int\limits_{0}^{x_2}\lambda^2e^{-\lambda x_1}e^{-\lambda(x_2-x_1)}~\!dx_1~dx_2=\int\limits_{x_1}^{z}\int\limits_{0}^{x_2}\lambda^2e^{-\lambda x_2}~\!dx_1~dx_2 \end{align*} At this point I don't know how to continue as in both integration bounds appear the integration variables!?

3

There are 3 best solutions below

0
On

In general, if $X_1$ has density functions $\rho_{X_1}$ and $X_2$ has density $\rho_{X_2}$, then $Y = X_1 + X_2$ has density equal to the convolution of $\rho_{X_1}$ and $\rho_{X_2}$. That is $$\rho_y(y) = (\rho_{X_1} \ast \rho_{X_2})(y) := \int_{-\infty}^{\infty} \rho_{X_1}(y - x)\rho_{X_2}(x) \: dx $$

You have correctly written

$$P(Y \leq z) = \int_{-\infty}^{\infty}\int_{-\infty}^{z-x}\rho_{X_1}(x_1)\rho_{X_2}(x_2) \: dx_2dx_1$$

You can in fact recover the result about the convolution by differentiating your expression for $P(Y \leq z)$ with respect to $z$, using the Leibniz integral rule. We can then carry out the convolution integral to obtain $$ \rho_y(y) = (\rho_{X_1} \ast \rho_{X_2})(y) = \lambda^2 y e^{-\lambda y}, \; \; y \geq 0$$

I will leave the details of the integral to you. Note that the resulting distribution is a gamma distribution with parameters $(\alpha = 2, \beta = \lambda)$.

10
On

Let $z\geq 0$. Consider a fixed value $X_1=x_1\leq z$. Then

\begin{align*} &P(x_1+X_2\leq z)=P(X_2\leq z-x_1)=\int\limits_0^{z-x_1}\rho(x_2) dx_2 \end{align*}

(If $x_1>z$ then the integral above is zero.)

Now integrate over all values of $x_1\leq z$:

\begin{align*} &P(X_1+X_2\leq z)=P(X_2\leq z-X_1)=\int\limits_0^z\rho(x_1)\int\limits_0^{z-x_1}\rho(x_2) dx_2dx_1 \end{align*}

Now substitute the formula for $\rho$ and do the integration: \begin{align*} &P(X_1+X_2\leq z)=\int\limits_{0}^{z}\lambda e^{-\lambda x_1}\int\limits_0^{z-x_1}\lambda e^{-\lambda x_2}dx_2dx_1. \end{align*}

We have

$$\int\limits_0^{z-x_1}\lambda e^{-\lambda x_2}dx_2=\left[-e^{-\lambda x_2}\right]_0^{z-x_1}=1-e^{-\lambda (z-x_1)}$$

and so

\begin{align*} P(X_1+X_2\leq z)&=\int\limits_{0}^{z}\lambda e^{-\lambda x_1}\left(1-e^{-\lambda (z-x_1)}\right)dx_1\\ &=\int\limits_{0}^{z}\left(\lambda e^{-\lambda x_1}-\lambda e^{-\lambda z}\right)dx_1\\ &=\left[- e^{-\lambda x_1}-\lambda e^{-\lambda z}x_1\right]_0^z\\ &=1- e^{-\lambda z}(1+\lambda z) \end{align*}


If we were to do the substitution you have done, i.e. $y=x_1+x_2$ (or $x_2=y-x_1$), then we would get

$$ \begin{align*} \int\limits_{0}^{z}\rho(x_1)\int\limits_0^{z-x_1}\rho(x_2) dx_2dx_1&=\int\limits_{0}^{z}\rho(x_1)\int\limits_{x_1}^{z}\rho(y-x_1) dydx_1 \end{align*} $$

which is different from your expression. Apart from the difference in the bounds of integration, you seem to have changed the order of integration.

How did you do your substitution? After your substitution, the outer integral (with respect to $x_2$) has a lower bound of $x_1$, so there is an error in the step where you did your substitution.

0
On

If you are familiar with that you can use generating momentum function for the exponential distribution: $$e^{tX_1}=e^{tX_2}=\frac{\lambda}{\lambda-t}$$

As $X_1$ and $X_2$ are indipendent we have $$e^{tY}=e^{tX_1}\cdot e^{tX_2}=\left(\frac{\lambda}{\lambda-t}\right)^2$$ This is the generating moment function of a gamma distribution $\text{Gamma}(2, \lambda)$.