## Birthday Paradox

The *Birthday Paradox* is not real paradox, you will not find any logical contradiction in the next few paragraphs. It is called a paradox because it is very counter-intuitive, and you will soon find out why.

The paradox is demonstrated in the following way: Choose people randomly. What is the probability that two of them were born on the same date? (only day and month, discarding the year. and assuming there are 365 days every year)

Lets say that , what do you think that chances are?

Most people will think the probability is very low, but is it?

First lets define our sample space:

The vector defines a series of dates for every person. Meaning is the birthday of the first person, of the second and so on…

The event we are interested in is the following:

Apparently, Doing the direct calculation to solve this problem is hard, too hard. So we’ll attack the problem from a different angle.

Lets take a look at the complement of A (meaning, that every person in the group was born on a unique date):

It is easily calculated that the number of elements in is:

And of course the number of elements in our sample space (meaning the number of options for birthdays for people) is:

Assuming uniform probability, the probability that every person was born on a unique date is:

Therefore, the probability that at least two people were born on the same day is:

So, said right? lets calculate! (Don’t worry, you can let WolframAlpha do the calculations for you)

So it seems the probability is more than 89%! Amazing, isn’t it?

If you want, you can checkout and find that after 23 people, the probability pass the 50% barrier, and that after only 57 people the probability is more than 99%!