[Math] sum of independent exponential random variables

probabilityprobability distributions

Let $X$ be the sum of two independent exponential random variables: $X_{1}$ with parameter $\lambda_{1} = \frac{1}{5}$ and $X_{2}$ with parameter $\lambda_{2} = 2 $. These random variables have values in the interval $[0,60]$

I want to prove the variance of $X$ is $401$.
I found by looking into some references that the p.d.f of $X$ is:
$$ f_{X}(t) = \sum_{i=1}^{2} {\frac{\lambda_{1} \lambda_{2} }{\prod_{j=1,j \ne i}^{2}(\lambda_{j} -\lambda_{i})} exp(-\lambda_{i} t)} $$

I wanted to know if the above density is correct or not since I did find a value different than what I'm supposed to get for the variance computation.

Thanks.

Best Answer

There are a few points to be addressed in your question. First of all, exponential distributions are supported on the entirety of the positive real line, meaning that $X_1, X_2$ take values in $[0,\infty)$, rather than $[0,60]$ as you claim; moreover their sum $X = X_1 + X_2$ also takes values in $[0,\infty)$.

There are two immediate approaches to calculate the variance of $X$. The first one depends only on the fact that they are independent. A basic fact in probability theory asserts that if $U, V$ are independent random variables, then

\begin{align*} \text{Var}(U+V) &= \mathbf E[ (U+ V)^2] - \mathbf E[U + V]^2 \\ & = \mathbf E[U^2] + \mathbf E[V^2] + 2\mathbf E[U]\mathbf E[V] - (\mathbf E[U]^2 + \mathbf E[V]^2 + 2\mathbf E[U]\mathbf E[V] )\\ & = \text{Var}[U] + \text{Var}[V] \end{align*}

From this it follows from the fact that the variance of an $\text{Exp}(\lambda)$ variable is $\lambda^{-2}$, that \begin{align*} \text{Var}(X_1 + X_2) & = \lambda_1^{-2} + \lambda_2^{-2} \\ & = \frac{101}{4}. \end{align*} for $\lambda_1 = 1/5$, $\lambda_2 = 2$.

Note that in this approach we did not need any properties of the distributions, other than knowledge of their variances (i.e. if you gave me two distributions $U,V$, with $\text{Var}[U] = \lambda_1, \, \text{Var}[V] = \lambda_2$, the answer would not change).

A second approach would be to argue via the probability density functions (p.d.f.s), as you suggest in the question. This will in general be a harder approach, as we will have to derive the variance of the sum from the p.d.f., as well as computing the p.d.f.

In general for independent $U, V$, with p.d.f. $f_U, f_V$ respectively, the distribution of their sum is given as the convolution of their p.d.f.s \begin{align*} f_{U +V}(x) = \int_{-\infty}^\infty f_U(y)f_V(x-y)dy. \end{align*} In the case of a exponential distributions, the p.d.f. of a $\lambda$ exponential distribution is \begin{align*} f(x) = \lambda e^{-\lambda{x}} \end{align*} And so for two independent exponentials with parameters $ \lambda_1 \neq \lambda_2$ \begin{align*} f_{X}(x) &= f_{X_1 + X_2}(x) \\ & = \int_{0}^x \lambda_1 e^{-\lambda_1 y} \lambda_2 e^{-\lambda_2(x-y)}dy \\ & = \lambda_1 \lambda_2 e^{-\lambda_2 x}\int_{0}^x e^{(\lambda_2-\lambda_1)y}dy \\ & = \frac{\lambda_1 \lambda_2}{\lambda_2-\lambda_1}( e^{-\lambda_1 x}-e^{-\lambda_2 x}). \end{align*} Note that we only integrate over the region supported by the p.d.f.s. From this we can then proceed to calculate the variance from the p.d.f. by the standard formulae \begin{align*} \mathbf E[V] &= \int_{-\infty}^\infty x f_V(x) d x,\\ \mathbf E[V^2] &= \int_{-\infty}^\infty x^2 f_V(x) dx \end{align*}

In all, I hope that my post has made it clear that this second approach requires a lot more work, and is more prone to calculation error!