Conditional probability with identically distributed variables

73 Views Asked by At

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.

2

There are 2 best solutions below

0
On

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$$

0
On

The original solution presented by the teacher is:

$X$: developer A finishes first

$Y$: developer B takes at least two hours longer than B

Therefore:

$$P(X) = \frac{1}{2}$$

then: $$P(Y) = P(Y|X)P(X)$$

Let R be the additional time required by B after A finished. Here is where the memoryless property of the exponential distribution can be used. Furthermore, here is where the two solutions start to converge:

$$P(Y) = P(R \geq 2) · P(X)$$

therefore:

$$P(Y) = (1 − (1 − \exp{(−0.02 \cdot 2))}) \frac{1}{2} = 0.4803947$$