[Math] Train wait problem, probability

probabilityprobability distributions

If one commuter train comes every $15$ minutes and another comes every $40$ minutes, what is the average amount of time one would have to wait before getting on a train? Suppose that they are not synchronized.

The answer by the way is $6.5$ minutes.

I don't see how the trains are not synchronized. Because they will arrive at the same time in $15*40$ minutes. Not sure if I understood the problem.

I think it relates to the uniform distribution and the expected value of the uniform distribution.

Please show steps in how you solve it.

Best Answer

The probability that you have to wait more than $x$ minutes for the $15$-minute train is the probability that you are in the first $15-x$ minutes of its cycle, which assuming a uniform distribution is $$\frac{15-x}{15}=1-\frac{x}{15}\quad\hbox{for $0\le x\le15$}\ .$$ The probability that you have to wait more than $x$ minutes for the other train is similarly $$1-\frac{x}{40}\quad\hbox{for $0\le x\le40$}\ .$$ The probability that you have to wait more than $x$ minutes for the first train to arrive is $$\Bigl(1-\frac{x}{15}\Bigr)\Bigl(1-\frac{x}{40}\Bigr)\quad\hbox{for $0\le x\le15$}\ ,$$ assuming independence since the trains are not synchronised. The cumulative probability function for your waiting time is $$P(X\le x)=1-\Bigl(1-\frac{x}{15}\Bigr)\Bigl(1-\frac{x}{40}\Bigr) =\frac{11x}{120}-\frac{x^2}{600}\ .$$ The density function is $$f(x)=\frac{d}{dx}P(X\le x)=\frac{11}{120}-\frac{x}{300}\quad\hbox{for $0\le x\le15$}$$ and the expected waiting time is $$E(X)=\int_0^{15} xf(x)\,dx=\cdots=6.5625\ .$$

Related Question