# X1 X2 independent variables exponential distribution - Looking for simpler solution

Let $X_1 \sim \exp(\lambda)$ and $X_2 \sim \exp(\lambda)$ be two independent exponentially distributed random variables. Find the mean and variance of random variable $Y=X_1 + X_2$.

$x=x_1 + x_2$

$$f_x(X)= \int_{-\infty}^{+\infty} f_{x_1}(x_1) - f_{x_2}(x-x_1)dx = \dots$$

$$\dfrac{λ^2}{Γ(2)} x^{2-1}e^{-λx} , x>0$$

$E(x)=\dfrac{2}{λ}$ $V(x)=\dfrac{2}{λ^2}$

I am trying to find if this can be solved easier...

• What is $\lambda$? – Henry Sep 26 '12 at 21:03
• number λ>0.. numba :) – GorillaApe Sep 26 '12 at 21:04
• @Parhs I think that what Henry is trying to get at is that your problem has $\lambda_1$ and $\lambda_2$ but no $\lambda$. Your solution has $\lambda$, but no $\lambda_1$ or $\lambda_2$. There is no connection between your problem and your solution, which is very confusing. You have not expressed yourself very clearly. – user940 Sep 27 '12 at 1:33
• i am sorry i did copy paste for the first sentence :( editing – GorillaApe Sep 27 '12 at 8:15

If $X$ and $Y$ are any random variables, and $a$ and $b$ are constants, then $$E(aX+bY)=aE(X)+bE(Y).$$

If $X$ and $Y$ are independent random variables, and $a$ and $b$ are constants, then $$\text{Var}(aX+bY)=a^2\text{Var}(X)+b^2\text{Var}(Y).$$

In our case we have $a=b=1$, but the general expressions may be useful to you later.

So you don't need to find the distribution of the random variable $X_1+X_2$, all you need is formulas for the mean and variance of an exponential random variable $T$ with parameter $\lambda$. These are respectively $\dfrac{1}{\lambda}$ and $\dfrac{1}{\lambda^2}$. Thus your mean and variance are respectively
$$\frac{1}{\lambda_1}+\frac{1}{\lambda_2}\quad\text{and}\quad \frac{1}{\lambda_1^2}+\frac{1}{\lambda_2^2}.$$

Edit: The question was changed. It turns out that $\lambda_1=\lambda_2=\lambda$. that is just a special case of the above formulas.

It is not clear whether you were asking also about how to compute the individual means and variances, or whether you already know these. We need $E(T)$, and $E(T^2)$, since $\text{Var}(T)=E(T^2)-(E(T))^2$.

The expectations can be found as usual by integration. There are some shortcuts, but they tend to involve more advanced notions. In case you are interested, let me mention the term moment generating function.

Added: We compute the moment generating function $m(s)$ of our random variable $T$ (sorry about $s$, the traditional $t$ is already taken). So we want $$E(e^{Ts})=\int_0^\infty e^{ts}\lambda e^{-\lambda t}\,dt=\int_0^\infty \lambda e^{-(\lambda-s)t}\,dt.$$ Integrate by substitution, easy. We get $$m(s)=\frac{\lambda}{\lambda-s}=\frac{1}{1-\frac{s}{\lambda}}.$$ So $m(s)$ has a very nice Taylor expansion $m(s)=1+\frac{1}{\lambda}s+\frac{1}{\lambda^2}s^2+\cdots$. From this we can pick up $E(X^k)$ for any $k$. In particular, $E(X)=\frac{1}{\lambda}$, and $E(X^2)=\frac{2!}{\lambda^2}$.

We can even get the moment-generating function of $X_1+X_2$, since the mgf of an independent sum is the product of the mgf's..

• thanks a lot , i have computed the moment generating function before this, but how can it help here ?Also sorry i mistyped there is only $λ_1$ not $λ_1$ $λ_2$ – GorillaApe Sep 27 '12 at 8:18
• i meant only $λ$ – GorillaApe Sep 27 '12 at 8:46