# Probability involving exponentially distributed random variabl

Two buses A and B arrive independently at a bus station at random rate of 5/hour and 4/hour respectively. A passenger comes to the bus station at 10 am. What is the probability that it takes at most 5 minutes before the first bus arrives at the station?

Attempt

Let X and Y be random variables indicating time of arrivals of Bus A and B respectively. Then, X and Y are exponentially distributed random variables with rate 5 and 4 respectively. So the probability density functions of X and Y are 5*exp(-5*t) and 4*exp(-4*t).

Now, let Z = min(X,Y) be a new random variable. Then, I need to calculate P(Z<5/60).

Question: My solution sheet goes as follows: P(Z<5/60) = 1-P(Z>5/60) = 1-P(X>5/60, Y>5/60) and goes on like this. But why cannot I just calculate P(Z<5/60) = P(X<5/60, Y<5/60) directly? These two give me different answers, meaning my attempt might be wrong. Why do we need to calculate the complementary probability?

• It does not matter if the second bus arrives before 5 minutes if the first one does arrive in 5 minutes. You only care about the complement of the event that no busses arrive within 5 minutes. Apr 24, 2018 at 18:22
• I did not get it. @TimDikland Apr 24, 2018 at 18:24
• There are four possible interesting events. P(X<5, Y<5), P(X<5, Y>5), P(X>5, Y<5), P(X>5, Y<5). Now ask yourself which of those events are desirable and which are not. (Here X<5 means bus X arrives within 5 minutes) Apr 24, 2018 at 18:29
• I am still confused. So, if the question was: What is the probability that she waits at least 5 mins before the first bus arrives? Would I directly calculate P(Z>5/60) = P(X>5/60,Y>5/60)? Apr 24, 2018 at 18:34
• Exactly. Your mistake in your first calculation is that $P(Z < 5/60) \neq P(X<5/60,Y<5/60)$. If you would do it correctly then you would find that $P(Z<5/60) = P(X<5/60, Y<5/60) + P(X<5/60, Y>5/60) + P(X>5/60, Y<5/60)$, which is obviously more work to calculate Apr 24, 2018 at 18:38

Here's another interesting way to approach this problem. I'll start out with a more general version, and then we'll look at the case you need.

Let $X_1, X_2, \cdots X_n$ be independent and let $X_{(1)}$ be the minimum observation. Let's find the CDF of $X_{(1)}$.

\begin{align*} F_1(x) &= P(X_{(1)} \leq x) & \text{(definition)} \\ &= 1 - P(X_{(1)} > x) & \text{(complement)} \\ &= 1 - P(X_1 > x, \ X_2 > x, \ \cdots, \ X_n > x) & \text{(min > x $\Leftrightarrow$ all > x)} \\ &= 1 - P(X_1 > x)P(X_2 > x)\cdots P(X_n > x) & \text{(independence)} \\ \end{align*}

## Back to the problem

Let $$X \sim Exp(4) \quad Y \sim Exp(5) \quad Z = min(X, Y)$$ $$P(X > x) = e^{-4x}$$ $$P(Y > x) = e^{-5x}$$ Hence, by the above result we can write the CDF of the minimum as: $$P(Z \leq x) = 1 - e^{-4x}e^{-5x} = 1 - e^{-9x}$$

Now you can calculate the desired probability easily.

Note that this is equivalent mathematically to the approach that Davis gives, but with this approach we see that the the minimum of independent exponential random variables is itself Exponentially distributed! Specifically, $Z \sim Exp(4+5)$.

$Z < \frac{5}{60}$ might occur without $X < \frac{5}{60}$ occurring, specifically, if $Y < \frac{5}{60}$.

Multiplying probabilities of independent events gives you the probability of their intersection (both events happen), but what you want is the probability of their union. Call $E$ the event that bus A arrives before the given time, and $F$ the event that bus B arrives before the given time. Then, the event you are interested in is:

$E \cup F = (E^c \cap F^c)^c$

The equality is by DeMorgan's law. Now you can figure out the probability by multiplying the probabilities of $E^c$ and $F^c$.