Think back to when you were at school, or if you are still at school, then stay in the present. Did two people in your class share a birthday? With 365 days1 to choose from and only 30 or so people in the class, surely this isn't likely?

In fact, if you had more than 23 people in your class, it would be more likely than not that two people actually did share a birthday. This counter-intuitive fact is known as the 'Birthday Paradox'. It is an example of how language and people's preconceptions often get in the way of the mathematics of probability.

### Writing Probability

Before we start, we will make a quick detour into how probabilities can be expressed. In this Entry, we will use the normal mathematical way of writing probability, as a number between 0 and 1 inclusive.

• A probability of 1 means something will definitely happen.

• A probability of 0 means something will never happen.

• A probability of 0.5 means something is equally as likely to happen as not to happen.

• A probability of over 0.5 means that something is more likely than not to happen. If a horse had a probability of 0.75 of winning a race, you could also say it had a 75% chance or it would win three times out of four.

Since everything must either happen or not happen, the probability of something happening and the probability of the same thing not happening must add up to 1. If there's a probability of 0.75 that the horse wins the race, then there's a probability of 0.25 that the horse loses the race.

### It's Not My Birthday

Okay, now let's go back to class and get on with a proof. Don't worry, it isn't that scary. The key to this paradox is that we are not looking to see which of your classmates shares your birthday, we are just looking for any two who share a birthday.

We'll pick a child out at random. His birthday could be any day of the year.

Now pick out a second child at random. The second children can have any one of 365 different birthdays: in one of these dates, she shares her birthday with the first child. In 364 of them, she has a different birthday from the first child. So the probability of these two people sharing a birthday is 1/365, which is 0.003, highly unlikely. Conversely, the chances of these people not sharing a birthday is 364/365, which is 0.997, which we should know by now is pretty likely.

Now we find a third person. The chances of this third person not sharing a birthday with either of the first two is 363/365. This is 0.995, less likely than the first case, but still very close to 1. The chance that the first two do not share the same birthday and the third does not share either of their birthdays is 364/365 multiplied by 363/365, this is 0.991.

For a fourth person, this would be 364/365 times 363/365 times 362/365, which is 0.983.

We could carry on with this maths for a while, but we won't; we will skip straight to the answer. For 23 people, the chance of none of these people sharing a birthday is 0.493. This means that the chance of two or more of the people sharing a birthday is 1 − 0.493, which is 0.507. As we have learned earlier, this means that for 23 people with a random distribution of birthdays, it is more likely than not that two people share a birthday.

### But it Is my Birthday

Well happy birthday. Have some cake. Let's say that you share a birthday with William Shatner, television's TJ Hooker, which would be 22 March. You are in that class of 23 people again, so what are the chances of someone in the class sharing a birthday with you and just you?

In this case, the likelihood that 23 others will not share your birthday is 364/365 to the power of 22, the number of other people in your class. This works out that in a class of 23 people, you have only a 0.06 chance of somebody sharing your birthday - very unlikely. In fact, you have to be in a class of 254 people for there to be a better than even chance of somebody sharing your birthday.

This is the kind of number we would have expected at first glance as the solution to the Birthday Paradox.

### Beyond Birthdays

There are loads of different birthday paradoxes. We can consider how many people need to be in a class for four people to share a birthday. We can consider, if a class has a certain number of boys and a certain number of girls, what are the chances that a boy and girl will share a birthday. We can consider how long the queue for William Shatner's autograph would be for it to be likely that two consecutive people share birthdays.

Birthday paradoxes are examples of what are known as occupancy paradoxes, which can have real world uses outside of joint birthday parties and William Shatner. These are mathematical paradoxes that deal with pairings, and are mainly variations of putting m balls2 into n bins3. For example, Satyendra Nath Bose used similar calculations to those above to model the energy levels of photons when considering Einstein's theories on the nature of light.

1We'll ignore leap years for this Entry.2Or other objects.3Or other containers.