Imagine you're at a party, surrounded by a couple dozen friends. What's the probability that a pair of them share a birthday? As incredible as it may seem, it's possible to prove mathematically that if the number of guests is 23, the probability exceeds 50%. And if your party has more than 60 guests, you can bet that two of them share a birthday with a 99% chance of winning. Welcome to the birthday paradox.
Again we're faced with one of those logical contradictions that, although from a strictly mathematical point of view they don't deserve the name of 'paradox', they contradict common sense enough for many people to consider them as such. In this case, besides leaving you thinking for a while about something you probably never considered, you'll learn a new trick to become (or not) the coolest guy at the party.
The (mis)called Birthday Paradox states that if 23 people are in a meeting, the probability that at least two of them share a birthday is 50.7%. The percentage seems, at first glance, too high. One tends to reason as follows: “Let's see. The year has about 365 days, and if there are only 23 people here, then the probability that two of us were born on the same day must be 23/365*100 = 6.3%” Error!
Where do we go wrong when we reason that way? In that we are actually calculating the probability that any of the attendees was born on a particular day, something that has nothing to do with the problem. To really calculate the probability that two people in the group share a birthday we have to consider pairs, not individuals. Let's see how to do it correctly.
Calculating the probability
The key to understanding the problem is to focus on calculating the probability that a couple shares a birthday, regardless of who the members of the couple are or the particular day. Suppose there are 23 people at our party. 23 x 22 / 2 = 253 different pairs can be formed among them. If you haven't realized why we calculate that number by multiplying 23 by 22, you can think that for the first member of the pair there are 23 possible candidates, while for the second there are only 22, since one of them already is part of the pair.
Now, let's calculate the approximate probability that in a room of n people, at least two share a birthday, discarding leap years and assuming that any day of the year has the same birth rate as any other. We begin by first calculating the probability that “n” birthdays are all different. This probability is given by the following equation:
That series of fractions represents the fact that the second person cannot have the same birthday as the first (364/365), the third person cannot have the same birthday as the first two (363/365), and so on. We can simplify that formula a lot using the so-called “factorial numbers”. The “factorial” of a number (n!) is obtained by multiplying that number by all the integers smaller than it. The factorial of 5, for example, is 5! = 5 x 4 x 3 x 2 x 1 = 120. Using factorial numbers, the equation can be written as follows:
Where “p” is the probability that two people do not share a birthday. To find the result we are looking for - the probability that at least two people have the same birthday - we must compute 1-p. If the equation is complicated enough that you don't even feel like trying to solve it, don't worry: we've done it for you. For n = 23 we get a value of 0.507, which is the same as a probability of around 50.7%.
So the next time you go to a party with 20 or 30 other guests, you can try to find out if two of them share a birthday. If there are more than 50, you can even grab the mic and make a bet about it, with a high probability of winning and going home with the prettiest girl at the party. And if it fails, you can entertain yourself calculating the chances that such a catastrophe would occur. Do you dare?
https://old.neoteo.com/la-paradoja-de-los-cuatro-hijos/