# Chance of meeting in a bar

Two people have to spend exactly 15 consecutive minutes in a bar on a given day, between 12:00 and 13:00. Assuming uniform arrival times, what is the probability they will meet?

I am mainly interested to see how people would model this formally. I came up with the answer 50% (wrong!) based on the assumptions that:

• independent uniform arrival
• they will meet iff they actually overlap by some $\epsilon > 0$
• we can measure time continuously

but my methods felt a little ad hoc to me, and I would like to learn to make it more formal.

Also I'm curious whether people think the problem is formulated unambiguously. I added the assumption of independent arrival myself for instance, because I think without such an assumption the problem is not well defined.

• The $\epsilon$ stuff is unnecessary. If we model the process by assuming independent arrival times, each uniformly distributed in a specific interval of length $45$ minutes, then the probability that B arrives xactly when A leaves is $0$. Jan 27, 2012 at 17:28
• actually I think the 37.5% is wrong, it doesn't take into account that you cannot arrive past min 45 ! I m amending my answer to 50% Jan 27, 2012 at 17:48
• My quick calculation gives $5/9$. Jan 27, 2012 at 18:13

This is a great question to answer graphically. First note that the two can't arrive after 12:45, since they have to spend at least 15 minutes in the bar. Second, note that they meet if their arrival times differ by less than 15 minutes.

If we plot the arrival time of person 1 on the x axis, and person 2 on the y axis, then they meet if the point representing their arrival times is between the two blue lines in the figure below. So we just need to calculate that area, relative to the area of the whole box.

The whole box clearly has area

$$45 \times 45 = 2025$$

The two triangles together have area

$$2\times \tfrac{1}{2} \times 30 \times 30 = 900$$

Therefore the probability of the friends meeting is

$$(2025-900)/2025 = 1125/2025 = 5/9$$ • Nice. What if both arrived and left randomly between noon and 1 pm? I can think of defining two Uniform Distributions U1, U2 for persons 1,2 respectfully in [0,60] ( 0:=noon, 60 = 1 p.m) ; assume and then computing the probability that Min U2 > MaxU1 , which entails P(MinU2 -MaxU1 >=0). But that seems top heavy, since we have to first compute the distributions of the Max, Min and the difference. Can you think of something simpler?
– MSIS
Sep 26, 2021 at 22:27
• Great answer! What should we add to the graphic to show how this probability works if someone can spend less than 15 mins? There's just evidence that at least a minute in a hour every of persons will be here.. Is there any clever geometrical solution? If there are n persons, we just need to pow the time diff of 60 - minutes in bar by n, right? is it extendable to many dimensions? Jan 2 at 3:46 $$\text{chance they meet} = \frac{\text{green area}}{\text{green area + blue area}} = \frac{45^2 - 30^2}{45^2}$$

I'd say that each of them arrives at some time uniformly distributed on [12:00, 12:45], where the times are independent. They meet if their arrival times differ by less than fifteen minutes.

In the interest of not having annoying numbers all over the place, measure time in units of fifteen minutes, starting at noon. Let the first person's arrival time be $X$ and the second person's arrival time be $Y$. Then $X$ and $Y$ are independent and uniform on $[0,3]$ and we want $P(|X-Y|<1)$.

Then this becomes a geometry problem. The area in the square $[0,3] \times [0,3]$ which satisfies $|x-y|<1$ is $5$; the area of the whole square is $9$; the answer is $5/9$.

• Out of curiosity, is there a straightforward non-geometric proof?
– user2468
Jan 27, 2012 at 18:57
• You could justify $\iint_{0\le X,Y\le 3;|X-Y|<1}\mathrm{d}X\mathrm{d}Y/\iint_{0\le X,Y\le 3}\mathrm{d}X\mathrm{d}Y$ on non-geometrical grounds, but the easiest way to do that first integral is geometrically. So I think trying to leave geometry out of the proof entirely is just making it more complicated than it needs to be. Jan 27, 2012 at 21:03
• @J.D. The answer $$\frac{5}{9}=1-\frac{4}{9}=1-\left(\frac{2}{3}\right)^2$$ is so reminiscent of $$1-P(A^c)P(B^c)=P(A)+P(B)-P(A)P(B)=P(A\cup B)$$ where $A$ and $B$ are independent events of probability $\frac{1}{3}$ that I too wonder if there is a simple non-geometric argument that we are all overlooking. Jan 28, 2012 at 17:22
• @user2468: Not sure if this is simple : Given two uniforms U1(0,60) and U2(0,60), assuming U1 arrives first, we need to integrate the difference of MinU2 -MaxU1 from 0 to 60. I guess we need convolution product.
– MSIS
Oct 1, 2021 at 21:09
• @Michael Lugo: What if we just new X,Y arrived and left uniformly in the interval [12:00,1:00]:=[0,1]? I am thinking we set X to have arrived first, then we find the integral of Min Y- Max X , from 0 to 1. But that seems a bit clumsy. Can you think of a nicer way?
– MSIS
Oct 9, 2021 at 0:37

I had a hard time envisioning both A and B times simultaneously, so I considered the probability as a function of A's arrival time. Given: both arrival times are in the range 12:00-12:45, so A can arrive at any time in those 45 minutes.

If A arrives at 12:00, B is met iff B arrives in the first 15 minutes, so the probability is 1/3. If A arrives at 12:15, B can arrive any time from 0-30 minutes, so p = 2/3. This value of 2/3 remains until 12:30, because there remains a 30 minute window that their times could overlap.
After 12:30, p decreases until it reaches 1/3 at 12:45 (symmetric to the condition at 12:00).

Here is a graph (not as pretty as above, but I thought I'd give google docs drawing a try):

not included because this is my first math post.
LINK: graph of p(A meets B | A's arrival time)

The shaded portion of the first and third segments are half the area of that segment, the middle is 2/3, so the total area is $$p = {1\over 3} \times ({1\over 2} + {2\over 3} + {1\over 2}) = {1 \over 3} \times {5\over 3} \ = {5\over 9}$$

Here is a simple qbasic simulation of the situation:

The answer yielded over 1 million trials was 0.5555 ~ 5/9

CLS

RANDOMIZE TIMER

count = 0

N = 1000000

FOR i = 1 TO N

LET x = (RND * 45 + 1)

LET y = (RND * 45 + 1)

tx = x + 15

ty = y + 15

IF ABS(tx - ty) < 15 THEN

count = count + 1

END IF

NEXT i

PRINT count / N

• I downvoted you. What you posted is not an acceptable within the scope & purpose for math.stackexchange. Empirical proofs are only acceptable when there are no mathematical explanations. Please read the answers above.
– user2468
Jan 28, 2012 at 18:24
• thanks, I should have also used a simulation to give my initial (wrong) answer a sanity check. I was looking for the reasoning behind a rigorous answer though. For that I find empirical methods less useful. Jan 28, 2012 at 20:35
• @J.D.: I think your words are unnecessarily harsh. I'd certainly expect an empirical answer to receive fewer votes than an exact one (when one exists), but I don't think that makes empirical answers "not acceptable" on this site. Feb 2, 2012 at 15:42
• @CamMcLeman I was trying to leave an explanation on why I downvoted this answer. In any case, thank you for pointing this out to me, and I apologize to if my words are inappropriate.
– user2468
Feb 2, 2012 at 16:17
• Is this BASIC? Wow, that's a blast from the past. Feb 7, 2012 at 9:30

Rather than measure time continuously, lets start with discrete time to try to get a handle on an approach. Divide the time into n equal minutes: d, 2d, 3d, ...,nd where nd= 1 hr. = 60 min. The first person arrives at time jd. Ignoring end points, the probability that the next person arrives within 15d of that time is (j-15)d to (j+15)d or 30d. Since j can be any of n numbers we have, ignoring end points, the probability is 30d/60d = 50%.

That gives us an approach, but we have to take into account the end points, i.e. the time restriction. Well 1/n times the arrival will be at 1d and the sum will be restricted to d to 16d or just 15d. Next is arrive at 2d and sum is 16d, etc. So, instead of a constant function of 30d, we have a ramp function starting at 15d going up to 30d, staying there for awhile and going back down to 15d. Add those up with the proper weights.