[Math] time it takes to service a car with exponential random variable with rate 1

probabilityprobability theoryrandom variables

Need help with this question here. Ill post exactly what it says then show my ideas so far.

"The time it takes to service a car is an exponential random variable with rate 1. (a) If A brings his car in at time 0 and B brings her car in at time t, what is the probability that B's car is ready before A's car? (Assume service times are independent and service begins upon arrival of the car.)
(b) If both cars are brought in at time 0, with work starting on B's car only when A's car has been completely serviced, what is the probability B's car is ready before time 2?"

I have the answers from the back of the book. (a) $(1/2)e^{(-t)}$ (b) $1-3e^{(-2)}$

I tried setting up an integral: $\int_{t}^{\infty}\int(e^{(-x)})dydx$ where Y is A's car and X is B's car but I don't know what bounds to put for X. So I tried working backward from the answer and arrived at $(1/2)\int_{t}^{\infty}e^{(-x)}dx$. Is it $\int_{t}^{\infty}\int_{x}^{\infty}e^{(-(x+y))}dydx$?

All help is appreciated.

Best Answer

Both cars has to be finished before time 2. Thus you have to calculate $P(X+Y<2)$.

$$P(X+Y<2)=\int_0^2 \int_0^{2-y}e^{-(x+y)} \, dx \, dy$$

A has to be finished before B. Thus A has time from $0$ to $2-y$. And the finishing time of B has to always greater than the finishing time of A: $y>2-x$

X can vary from 0 to 2. Therefore Y can vary from 0 to 2, too.

Related Question