[Math] Probability of two events occurring at overlapping times

probabilityprobability theory

I am trying to workout something at work and would like some input/feedback.

I have a 1km section of road and I would like to figure out the probability of 2 vehicles passing each other over an hour period.

Lets say the road runs north-to-south and there are 26 vehicles travelling northbound and 22 vehicles travelling southbound. If the vehicles travel at 50km/h and their arrival is evenly distributed over the hour for each direction, what is the probability that two vehicles will pass each other over the 1km section?

Initially I worked through it as follows but i suspect it is not as simple as this;
1km @ 50km/h – 72 seconds per trip. Therefore, over an hour there are 50 72 second blocks.

$(26/50)*(22/50) = 22.9%$

This is clearly wrong because it doesn't consider overlapping time periods. Which i'm not sure how to consider.

Any help would be great!

Thanks.

Best Answer

We assume that all arrival times are independent an uniform on the interval $[0,1]$. Suppose that a northbound car $A$ starts at time $t_0.$ Which are the possible arrival times for a fixed southbound car $B$ so that $A$ encounters $B$ on the road? A quick calculation shows that $B$ should arrive in the interval $$[t_0 {-}1/50, \ t_0 {+} 1/50]$$ where we have chose to count time in hours. This is because at time $t_0{-}1/50$ the car $A$ is just starting the trip. So if $B$ arrives before that time they don't meet. On the other hand if $B$ arrives after time $t_0{+}1/50$ if must have started after time $t_0,$ so by that time $A$ has already arrived.

Now, for any $t_0 \in[ 1/50, \ 1{-} 1/50]$ the probability of $B$ arriving in this interval is $2/50$ while for $t_0 \ge 1- 1/50$ the probability is $ 1/50 + (1-t_0),$ simply because $B$ has to start before time $1.$ Similarly if $t_0 < 1/50$ the probability that $B$ arrives in the required time interval is $t_0 + 1/50$ So we can write, with the help of some mathematical formalism, which encodes the fact that the arrival time of $A$ is uniform, which I hope is understandable:

\begin{align*} P(A \text{ encounters }& B) = \int_0^1P(A \text{ encounters } B \ |\ A \text{ arrives at time } t_0) \ dt_0 \\ & =\int_{1/50}^{1 - 1/50} 2/50 \ dt_0 + \int_{1-1/50}^1 (1/50 + 1-t_0) \ dt_0 + \int_{0}^{1/50} (1/50 + t_0) \ dt_0 \\ & =\int_{1/50}^{1 - 1/50} 2/50 \ dt_0 + 2\int_{0}^{1/50} (1/50 + t_0) \ dt_0 \\ &= \frac{99}{50^2} = p \simeq 3.96 \% \end{align*} Assuming that my calculations are correct this is a pretty high probability. In any case you get a probability $p$ of a car $A$ encountering a car $B.$ From this you can compute the probability that a given northbound car $A$ encounters no south bound car at all. This amounts to $22$ independent unsuccessful trials. You can thus compute: $$ P(A \text{ encounters no car at all}) = (1-p)^{22} $$ and now you can compute the probability of no car encountering nobody, which means that for $26$ times in a row a given car $A$ encounters no car, which gives a probabilty $$ P(\text{ no encounters }) =\big( (1-p)^{22})^{26} = (1-p)^{22 \times 26} = (1-p)^{572} \simeq 9 \times 10^{-11} \simeq 0 $$

So eventually the probability that there will be at least one encounter is $$1 - P(\text{ no encounters }) \simeq 1 -9 \times 10^{-11} \simeq 1.$$

So you can be very sure that there will be an encounter. Although you should assume that I have done some errors in the calculations, which adds an additional probability distribution to the variable $p$ :)

Related Question