15
$\begingroup$

Let $X_1$ and $X_2$ be independent and identically distributed exponential random variables with rate $\lambda$. Let $S_2 = X_1 + X_2$.

Q: Show that $S_2$ has PDF $f_{S_2}(x) = \lambda^2 x \text{e}^{-\lambda x},\, x\ge 0$.

Note that if events occurred according to a Poisson Process (PP) with rate $\lambda$, $S_2$ would represent the time of the 2nd event.

Alternate approaches are appreciated. The approaches provided are commonly used when learning queueing theory & stochastic processes.


Recall the Exponential distribution is a special case of the Gamma distribution (with shape parameter $1$). I've learned there is a more general version of this here that can be applied.

$\endgroup$
6
  • 2
    $\begingroup$ This question is a very special case (and one of the simplest possible examples) of a sum of Gamma distributions. (The Exponential is a Gamma distribution with a shape parameter of $1.$) Thus, you could apply any of the answers at stats.stackexchange.com/questions/72479. $\endgroup$
    – whuber
    Aug 12, 2019 at 12:28
  • 1
    $\begingroup$ Thank you. I was unaware of that more general question, though I did know the Exponential is a Gamma distribution with a shape parameter of 1. I hope you'll agree this Q/A is ok as-is and shouldn't be deleted. This is a very frequent question in some engineering disciplines and is certainly more accessible than jumping straight into adding Gamma distributions. $\endgroup$ Aug 12, 2019 at 21:38
  • $\begingroup$ @whuber I've updated the question specifically mention the more general question. Thank you. $\endgroup$ Aug 12, 2019 at 21:40
  • 1
    $\begingroup$ For the reasons you gave, and because you have offered a clear account of solutions that work specifically in this case, I have not voted to close this as a duplicate. $\endgroup$
    – whuber
    Aug 12, 2019 at 21:46
  • 2
    $\begingroup$ I think the voting on your question and your answer has clearly indicated what the community thinks of this thread. :-) $\endgroup$
    – whuber
    Aug 12, 2019 at 21:52

1 Answer 1

14
$\begingroup$

Conditioning Approach
Condition on the value of $X_1$. Start with the cumulative distribution function (CDF) for $S_2$.

$\begin{align} F_{S_2}(x) &= P(S_2\le x) \\ &= P(X_1 + X_2 \le x) \\ &= \int_0^\infty P(X_1+X_2\le x|X_1=x_1)f_{X_1}(x_1)dx_1 \\ &= \int_0^x P(X_1+X_2\le x|X_1=x_1)\lambda \text{e}^{-\lambda x_1}dx_1 \\ &= \int_0^x P(X_2 \le x - x_1)\lambda \text{e}^{-\lambda x_1}dx_1 \\ &= \int_0^x\left(1-\text{e}^{-\lambda(x-x_1)}\right)\lambda \text{e}^{-\lambda x_1}dx_1\\ &=(1-e^{-\lambda x}) - \lambda x e^{-\lambda x}\end{align} $

This is the CDF of the distribution. To get the PDF, differentiate with respect to $x$ (see here).

$$f_{S_2}(x) = \lambda^2 x \text{e}^{-\lambda x} \quad\square$$

This is an Erlang$(2,\lambda)$ distribution (see here).


General Approach
Direct integration relying on the independence of $X_1$ & $X_2$. Again, start with the cumulative distribution function (CDF) for $S_2$.

$\begin{align} F_{S_2}(x) &= P(S_2\le x) \\ &= P(X_1 + X_2 \le x) \\ &= P\left( (X_1,X_2)\in A \right) \quad \quad \text{(See figure below)}\\ &= \int\int_{(x_1,x_2)\in A} f_{X_1,X_2}(x_1,x_2)dx_1 dx_2 \\ &(\text{Joint distribution is the product of marginals by independence}) \\ &= \int_0^{x} \int_0^{x-x_{2}} f_{X_1}(x_1)f_{X_2}(x_2)dx_1 dx_2\\ &= \int_0^{x} \int_0^{x-x_{2}} \lambda \text{e}^{-\lambda x_1}\lambda \text{e}^{-\lambda x_2}dx_1 dx_2\\ \end{align}$

Since this is the CDF, differentiation gives the PDF, $f_{S_2}(x) = \lambda^2 x \text{e}^{-\lambda x} \quad\square$ Figure


MGF Approach
This approach uses the moment generating function (MGF).

$\begin{align} M_{S_2}(t) &= \text{E}\left[\text{e}^{t S_2}\right] \\ &= \text{E}\left[\text{e}^{t(X_1 + X_2)}\right] \\ &= \text{E}\left[\text{e}^{t X_1 + t X_2}\right] \\ &= \text{E}\left[\text{e}^{t X_1} \text{e}^{t X_2}\right] \\ &= \text{E}\left[\text{e}^{t X_1}\right]\text{E}\left[\text{e}^{t X_2}\right] \quad \text{(by independence)} \\ &= M_{X_1}(t)M_{X_2}(t) \\ &= \left(\frac{\lambda}{\lambda-t}\right)\left(\frac{\lambda}{\lambda-t}\right) \quad \quad t<\lambda\\ &= \frac{\lambda^2}{(\lambda-t)^2} \quad \quad t<\lambda \end{align}$

While this may not yield the PDF, once the MGF matches that of a known distribution, the PDF also known.

$\endgroup$
11
  • 4
    $\begingroup$ You wrote both the question and the answer. What is your point, if I may ask? $\endgroup$
    – Xi'an
    Oct 14, 2018 at 11:58
  • 9
    $\begingroup$ @Xi'an, I thought SE encouraged asking the question and answering it...I can screenshot where SE seems to encourage that for you if you want. I've seen a lot of basic questions repeatedly asked and I've been thinking about posting some specific approaches to refer people to. I wasn't able to find something like this and I can refer people to this for a variety of things. If the CV community really hates this post that much, I will voluntarily delete it. $\endgroup$ Oct 15, 2018 at 14:31
  • 3
    $\begingroup$ @Xi'an, Respectfully, I believe you both asked and answered a question here. $\endgroup$ Oct 15, 2018 at 17:24
  • 5
    $\begingroup$ @Xi'an You may wish to read stats.stackexchange.com/help/self-answer $\endgroup$
    – Sycorax
    Oct 15, 2018 at 17:37
  • 1
    $\begingroup$ @Alex good question. I wasn't thinking about getting PDF analytically from MGF. Instead, if you identify the MGF, then you've solved the problem (see my edit). $\endgroup$ May 24, 2020 at 12:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.