[Math] Probability with exponential random variable

probabilityself-learningstochastic-processes

Machine $1$ is currently working. Machine $2$ will be put in use at
time $t$ from now. If the lifetime of machine $i$ is exponential with
rate $\lambda_i=1,2$, what is the probability that machine $1$ is the
first machine to fail?

I tried a few things but I can not get the answer

Let $X_1\sim exp(\lambda_1)$ and $X_2\sim exp(\lambda_2)$ maybe I'm wrong playing, but I think the exercise asks
$$P(X_1<X_2|X_2=t)=\frac{P(X_1<X_2,X_2=t)}{P(X_2=t)}$$

I believe that times are independent of each machine, but I think I can not take it.

Can anyone give a hand?

EDIT: The corret answer is $$1-e^{-\lambda_1t}+e^{-\lambda_1t}\frac{\lambda_1}{\lambda_1+\lambda_2}$$

Best Answer

I don't believe what you wrote is exactly what you want. Since $X_2$ starts at time $t$, it gets a total of time $t$ without failing for free. It seems like you should be looking for $\mathbb{P}(X_1 < X_2 + t) = \mathbb{P}(X_1 - X_2 < t)$. From this page, we know the pdf of $X_1 - X_2$ is $$ f(x) = \frac{\lambda_1\lambda_2}{\lambda_1 + \lambda_2}\left\{ \begin{array}{ll}e^{-\lambda_1x} &\text{ if }x > 0 \\ e^{\lambda_2x} &\text{ if }x < 0\end{array}\right. .$$

Integrating this from $-\infty$ to $t$ gives \begin{align} \mathbb{P}(X_1 - X_2 < t) &=\frac{\lambda_1\lambda_2}{\lambda_1 + \lambda_2} \left(\int\limits_{-\infty}^0 e^{\lambda_2 x}dx + \int\limits_{0}^t e^{-\lambda_1 x} dx\right) \\ &= \frac{\lambda_1\lambda_2}{\lambda_1 + \lambda_2}\left(\frac{1}{\lambda_2} + \frac{1}{\lambda_1} - \frac{1}{\lambda_1} e^{-\lambda_1 t} \right) \\ &= 1 - e^{-\lambda_1 t} + e^{-\lambda_1 t}\frac{\lambda_1}{\lambda_1 + \lambda_2}. \end{align}

Related Question