## Birthday paradox, if there are 20 people in a room there’s a 50/50 chance that two of them will have the same birthday.

It turns out it is useful in several different areas : cryptography and hashing algorithms. You can try it yourself — the next time you are at a gathering of 20 or 30 people, ask everyone for their birth date. It is likely that two people in the group will have the same birthday. It always surprises people!

The reason this is so surprising is because we are used to comparing our particular birthdays with others. If you meet someone randomly and ask him what his birthday is, the chance of the two of you having the same birthday is only 1/365 (0.27%). The probability of any two individuals having the same birthday is extremely low. Even if you ask 20 people, the probability is still low — less than 5%. So we feel like it is very rare to meet anyone with the same birthday as our own.

Birthday Paradox can be used to explain a remarkable concurrence of events or circumstances without apparent causal connection.

When you put 20 people in a room, however, the thing that changes is the fact that each of the 20 people is now asking each of the other 19 people about their birthdays. Each individual person only has a small, less than 5% chance of success, but each person is trying it 19 times. That increases the probability dramatically.

If you want to calculate the exact probability, one way to look at it is like this. Let’s say you have a big wall calendar with all 365 days on it. You walk in and put a big X on your birthday. The next person who walks in has only a 364 possible open days available, so the probability of the two dates not colliding is 364/365. The next person has only 363 open days, so the probability of not colliding is 363/365. If you multiply the probabilities for all 20 people not colliding, then you get: 364/365 × 363/365 × … 365-20+1/365 = Chances of no collisions