I am solving a question using a different approach to the one I have found in my maths material. My teacher presented one solution and mentioned that there several other ways to solve this problem. I was intrigued, and I am now trying to find an alternative, but I am not 100% sure if the way I mathematically formulate the problem makes sense...
Here is my small problem:
Two software developers are working separately on two independent app projects. Developer A needs to independently prepare a simple user interface for an app, and developer B also needs to prepare a similar user interface independently. They know from experience that the time it will take to complete such task is exponentially distributed with $\lambda = 0.02$ for each of them. The question I am trying to answer is: what is the probability that the time required by developer B to finish his/her task will be at least 2 hours longer than the time needed by developer A?
How I formulated the events is as follows:
$X$: time required by developer A
$Y$: time required by developer B
I am formulating this as the following conditional probability: $P(B \geq t + 2 \ | \ A \geq t)$
Is this correct? I am not 100% sure... I know that I should be able to leverage the memoryless property of the exponential distribution.
I got an interesting alternative method based on the first comment posted here.
Let $Z$ be the difference between $X$ and $Y$, i.e. $Y-X$. Since $X$ and $Y$ are iid, $P(Z \geq 2)$ can be solved using the Laplace distribution (double exponential distribution) as mentioned in this wikipedia page. The PDF is the as follows:
$$P(Z \geq z) = 1 - \left ( 1 - \frac{1}{2} \exp{ \left ( - \frac{z-\mu}{1 / \lambda} \right )}\right )$$
where $\lambda$ is the original parameter from the exponential distribution followed by $X$ and $Y$ and $\mu$ is a location parameter, which for this particular case of difference of iid random variables is $0$. Then the answer would be:
$$P(Z \geq 2) = \frac{1}{2} \exp{ \left ( -2 \cdot 0.02 \right )} = 0.4803947$$