Birthday Problem…and starches

Here’s a pretty interesting problem that I heard. How many people in a room would you need for there to be a 50% chance that two people in the room share the same birthday?

The answer is 23, which smaller than what most people first think, here’s how that works:

Lets start small and say there is one person in the room

That person will have to have a birthday so we will pick any day for them (doesn’t matter the day) 365/365. And do the following:

(1-(365/365)) = 1 – 1 = 0%

The more people that enter the room will be multiplied onto the total probability in a sort of sequence, and each next term of the sequence keeps track to ensure each persons birthday is unique, and then looks at the probability for the days to coincide.

The second person comes in, and has a a 364/365 chance from having a different birthday from he first person.

So the probability is (1 – (364/365)x(365/365)) = 0.03%

The sequence starts slow but around 5 people we will have

(1-((365/365)x(364/365)x(363/365)x(362/365)x(361/365)) = (1 – (0.973)) = 2.7%

We can also write this sequence in terms of any n = 1, 2, 3 … as

(365! / 365^n *(365-n)!). Here is a graph of probability that two people have the same birthday, as we add more people into the room. Can’t say we are keeping track of leap year b days sadly enough.

As you can see we break the 0.500 probability right at 23 people. This is a lot less than one might think and I find it to be very counter intuitive.

I also think the shape of this graph is cool if we expand it a little more we see: