Skip to content

Birthdays – Get in line

June 2, 2015

Imagine a line of people, one behind the other, all facing the same way (to the head of the line).

You get a prize if you are the the first person in the line (from the front person,  working backwards) to have a person ahead of them with the same birthday.

Where to stand to have the best chance of getting the prize?

This is the easiest of the three birthday problems, although I didn’t think so at the start.

To be more explicit in the problem definition, we say that, if you are the nth person in the line, then
(a) the n-1 people in front of you must all have different birth dates
(b) you must have the same birthday as one of those (n-1) people

So, the trick is to find where the decreasing probability of (a) outweighs the increasing probability of (b).

Let’s say you are indeed the nth person in the line.
Let’s also says that the probability that the (n-1) people in front of you all have different birth dates is p.
(It’s actually some mildly complicated expression we figured out in Birthday Pairings.)
Then the probability of you being the winner is (assuming a simple 365 day year)

 p =====                       (1)

Now imagine you move back one space, to the (n+1)th position. That extra person
– must have a different birth date to all those in front, but also
– provides an extra birth date for you to match with.

So now, the probability of you as the person being the winner is

   (366-n)  n  
 p ======= ===                (2)
     365   365

So, the best position will be the smallest n for which expression (1) is greater than expression (2) i.e.

   (n-1)     (366-n)  n  
 p ===== p ======= ===
    365        365   365

Cancelling common factors, then moving 365 to the left hand side, we find that
365 (n-1) > (366-n) n
365n – 365 > 366n – n2
n2 > n + 365

This is first true for n = 20, so stand 20th in line.

For those born on 29 February…

For someone with their birthday on 29 February, the equation is (approximately)

  (n-1)     (1462-n)  n  
p ===== p ======= ===
   1461       1461  1461

Simplifying this expression in the same way as for other dates above, we find that
1461 (n-1) > (1462-n) n
1461n – 1461 > 1462n – n2
n2 > n + 1461

This is first true for n = 39, so stand 39th in line.

Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: