The birthday problem — An excursion into probability

Suppose you are hosting a party. How many people would you have to invite so that the probability of at any two people sharing a birthday is at least 50%?The birthday problem, which is also sometimes called a “paradox” is a simple illustration of our intuitions about probability.

PNPNPN…..

NPNPNP…..

NNNPPP….. Since at every position we
have two choices which are equally likely, there are 2¹⁰⁰ of such sequences, which is astonishingly large number (a number with 30 digits). Out of 2¹⁰⁰ sequences, exactly one sequence consists of only N’s. The likelihood of this happening
is 1 / 2(¹⁰⁰) which is a vanishingly small number. The symmetrically opposite case of conducting 100 parties and on all occasions having at least two people share a birthday gives a probability of 1 / 2¹⁰⁰. These are two extreme cases
in a distribution which is known as the normal distribution, recognizable by the bell curve. Before I discuss the solution , this might be a good time to try and solve it on your own.

.

.

.

and none of those parties
resulted in any birthdays being shared. How improbable is this?

P(n=2) = 1 — (364/365) which is equal to 0.0027 which is about 3 in 1000.

With three people,

P(n=3) = 1 — [ (364/365) * (363/365) ] which is about 8 in 1000

With four people,

P(n=4) = 1 — [(364/365) * (363/365) * (362/365)] is about 16 in 1000

If you extrapolate this way (you can see the results in the little program I wrote), by the time you reach 23 people, the probability is 1 in 2 or 50%. By 57 people, the probability is 99%! Here is a graph that I plotted using
the output of the program —