Bus arrival times and minimum of exponential random variables

conditional probabilityexpected valueexponential distributionprobability

I came across a question that is supposed to show us how the properties of the exponential distribution can be used.

I know and have shown that $$P(X_i<min\{ X_1,\dots,X_n\})=\dfrac{\lambda_i}{\lambda_1 + \dots +\lambda_n}$$ where each $X_i$ is an independent exponential random variable with parameter $\lambda_i$

And I also assume I have to use the memory less property for the question too.

Buses numbered 1, 2 and 3 arrive at a bus stop. The time in minutes between consecutive arrivals of buses 1,2 and 3 follow an exponential distribution with parameters $0.1$, $0.2$ and $0.4$ respectively. The time that a bus arrives is independent of the time that any other bus arrives.

  • Find the mean time between arrivals of buses numbered 1.
  • You are currently at the stop waiting for Bus 2. Find the
    probability that a bus numbered 1 arrives before a bus numbered 2.
  • You are currently at the bus stop waiting for a bus numbered 2. Find the probability that a bus numbered 2 will turn up before one numbered 1 or 3.

So far, I calculated that for question 1, $$min\{ X_1,X_2,X_3\} =exp(0.7)$$ which means that the mean is equal to $$\dfrac{1}{0.7}$$

For question 2, I find that $$ P(X_1<X_2)=\dfrac{0.1}{0.3}$$

And finally for question 3, I get $$ \dfrac{0.2}{0.7}$$

I am not sure if I approached this correctly. I guess the setting of the problem makes it harder to understand what I am supposed to be doing.

Best Answer

Busses numbered 1 are $Exp(\lambda_1)$, so the expected waiting time is simply $$\mathbf E [X_1] = \frac{1}{\lambda_1} = 10$$

For question 2 you can either use your result or use the law of iterated expectation $$P(X_1 < X_2) = \mathbf E\big[ P(X_1 < X_2 | X_2)\big] = \mathbf E\big[ 1- \mathrm e^{-\lambda_1 X_2}\big ] = \frac{\lambda_1}{\lambda_1 + \lambda_2} =\frac{0.1}{0.3}$$

For question 3 you can use your result to say that

$$P\big(X_2 < \min\{X_1, X_3\}\big) = \frac{\lambda_2}{\lambda_1+\lambda_2 + \lambda_3}=\frac{0.2}{0.7}$$

Below you find a short Julia simulation to check that the results are actually correct (note that Julia uses the mean instead of the rate as parameter of the exponential distribution)

julia> using Distributions

julia> λ1, λ2, λ3 = 0.1, 0.2, 0.4;

julia> B1 = Distributions.Exponential(1/λ1)
Exponential{Float64}(θ=10.0)

julia> B2 = Distributions.Exponential(1/λ2)
Exponential{Float64}(θ=5.0)

julia> B3 = Distributions.Exponential(1/λ3)
Exponential{Float64}(θ=2.5)

julia> mean([rand(B1) for i in 1:1000000])
10.001321659735758

julia> 1/λ1
10.0

julia> mean([rand(B1)<rand(B2) for i in 1:1000000])
0.333354

julia> λ1 /(λ1+λ2)
0.3333333333333333

julia> mean([rand(B2) < min(rand(B1), rand(B3)) for i in 1:1000000])
0.28588

julia> λ2 /(λ1+λ2+λ3)
0.2857142857142857
Related Question