# Distribution of the lifetime of a system consisting of two exponentially distributed components, one being backup

I have a system consisting of components $S_1$ and $S_2$ whose lifetimes $T_1$ and $T_2$ follow the exponential distribution with parameter $\lambda$. At time $t=0$ the component $S_1$ is switched on and $S_2$ is kept off until $S_1$ fails (and is immediately switched on). What is the distribution of the lifetime of the system?

To me the logical solution would be $f(T_1,\lambda)+f(T_2,\lambda)$ where f is the probability density function $f(x,\lambda)=\lambda e^{-\lambda x}$.

$\Rightarrow$ $\lambda e^{-\lambda T_1}+\lambda e^{-\lambda T_2}$

but I have nothing to verify it with. Am I on the right track?

The CDF of the sum of any two independent continuous random variables can be computed using the law of total probability $$F_{X+Y}(u)=P(X+Y\leq u)=\int_{-\infty}^\infty f_x(x)P(Y<u-x)dx.$$
Plug in the exponential distribution and you can compute the integral. Make sure you get the limits of the integral right ($X$ and $Y$ cannot be negative).
To get the density you take derivative with respect to $u$. If you do everything correctly you should get a Gamma distribution with parameters $2$ and $\lambda$.
• I must be doing something wrong because my integral does not converge. I'm interpreting $P(Y<u-x)=F_y(Y<u-x)=1-e^{-\lambda (u-x)}$, is this correct? That gives $F_{X+Y}(u)=P(X+Y\leq u)=\int_{0}^\infty \lambda e^{-\lambda x}(1-e^{-\lambda (u-x)})$, which according to my calculations does not converge. – Markus K. Apr 1 '15 at 15:16
• The integral limit is wrong, x cannot be greater than the sum: i.e. $0\leq x\leq u$. – QQQ Apr 1 '15 at 16:38