Library · Geometric Probability · Chapter 11

Three friends at the café

Revised Report an error

Problem 11.1

Three friends each arrive at a café at an independent uniform random time in a one-hour window, and each waits exactly ww hours before leaving, where 0≤w≤10 \leq w \leq 1. What is the probability that all three end up meeting (i.e., the last to arrive reaches the café before the first to leave)?

Solution. Let T1,T2,T3T_1, T_2, T_3 be iid uniform arrivals in [0,1][0, 1] (units of one hour). Friend ii is present during the interval [Ti,Ti+w][T_i, T_i + w]. All three are simultaneously present iff the intersection of their intervals is non-empty, i.e., iff Tmax⁡≤Tmin⁡+w      ⟺      max⁡Ti−min⁡Ti≤w,T_{\max} \leq T_{\min} + w \;\;\iff\;\; \max T_i - \min T_i \leq w, where Tmax⁡,Tmin⁡T_{\max}, T_{\min} are the largest and smallest arrival times.

For nn iid uniform random variables in [0,1][0, 1], the range R=T(n)−T(1)R = T_{(n)} - T_{(1)} has the classical density fR(r)=n(n−1)rn−2(1−r)f_R(r) = n(n-1) r^{n-2} (1 - r) on [0,1][0, 1]. Integrating, P(R≤w)=∫0wn(n−1)rn−2(1−r) dr=nwn−1−(n−1)wn.\mathbb{P}(R \leq w) = \int_0^w n(n-1) r^{n-2}(1 - r) \, dr = n w^{n-1} - (n-1) w^n. For n=3n = 3: P(all meet)=3w2−2w3.■\boxed{\mathbb{P}(\text{all meet}) = 3 w^2 - 2 w^3.} \qedhere

For common waiting times:

  • w=14w = \tfrac14: P=316−132=532≈0.156\mathbb{P} = \tfrac{3}{16} - \tfrac{1}{32} = \tfrac{5}{32} \approx 0.156.

  • w=13w = \tfrac13: P=13−227=727≈0.259\mathbb{P} = \tfrac{1}{3} - \tfrac{2}{27} = \tfrac{7}{27} \approx 0.259.

  • w=12w = \tfrac12: P=34−14=12\mathbb{P} = \tfrac34 - \tfrac14 = \tfrac12.

  • w=23w = \tfrac23: P=43−1627=2027≈0.741\mathbb{P} = \tfrac43 - \tfrac{16}{27} = \tfrac{20}{27} \approx 0.741.

Compare with the two-friend case (Chapter 5), where the meeting probability is 1−(1−w)21 - (1 - w)^2. For w=14w = \tfrac14 the two-friend case gives 716\tfrac{7}{16}, far exceeding the three-friend 532\tfrac{5}{32}. Adding a third friend sharply reduces the chance of simultaneous meeting.

import numpy as np
w = 0.4
arr = np.random.rand(3, 10**7)
meet = (arr.max(axis=0) - arr.min(axis=0)) <= w
print(f"sim: {meet.mean():.5f}   exact: {3*w**2 - 2*w**3:.5f}")
# sim: 0.35272   exact: 0.35200
Report an error on this page

Reports are stored by Netlify. See the privacy note.