Birthday Paradox

The motivation for this comes from The Big Book of Small Python Projects. This is #2, Birthday Pardox.

More commonly known as the "birthday problem", this is relatively straightforward, but may defy the way you think about probabilities at first. The question asks for the probability that, given n random people, at least two will share a birthday (note that this is not asking for the pair to share the exact birthday in the sense of year and day, but rather just the same day in any year).

As you'll see, the number of people that it takes to make the odds better than a coin flip are surprisingly low!