Probability can be highly intuitive yet at times completely nonsensical. Famous mathematicians have fallen victim to the idea that everything in probability can be done without rigorous calculation and thought.
The problem above is a famous or some might say infamous one. How should we start to go about this solving this?
Firstly, it is best to start with writing down what you know.
There are 365 days in a year. The event where no-one shares a birthday is the opposite of the event where at least one pairing does - we say these events are disjoint.
Now, occasionally it is better to work out the probability of the opposite event and we can use the fact that the probability disjoint events must sum to 1.
So lets do that.
Naturally, its clear that we have at most 365 in the room, as otherwise by the pigeonhole principle two people must share a birthday!
So lets number each person by number.
Lets say person 1 has a birthday, say Jan 1st. Whats the chance that person two has a different birthday, well of course its 364/365 as they have 364 other days to choose from. Now what about person 3, he must differ in birthday to person 1 and 2 so the probability is 363/365. Continuing in this manner we reach an equation for the probability of a room filled with n people (all having different birthdays) that looks like this.
(364363362*......(365-n+1))/(365^(n-1))
Remember the idea that the prob of opposite (disjoint) events add to 1.
We note that when the equation is made to equal 0.5. The opposite event must equal 0.5 too - 0.5+0.5=1.
So if (364363362......*(365-n+1))/(365^(n-1))=0.5 what do we get for n?
It turns out that with n=23 we get the probability at least 0.5 and so that is our answer.