Skip to main content

Birthday Paradox

A Classic Counterintuitive Probability

📚 Introduction

🎂 Birthday Paradox

How many people needed for >50% chance of shared birthday?

Intuition says many - after all, there are 365 days. But the answer will surprise you...

23
people for >50% probability
50
people for ~97% probability
70
people for >99.9% probability

🤔 Why so counterintuitive?

We're not asking 'someone shares YOUR birthday', but 'ANY two share a birthday'. 23 people form 253 pairs - each could match!

💡 The Math

It's easier to calculate 'all different': First person any day (365/365), second avoids first (364/365), third avoids both (363/365)... These multiply and shrink fast.

🌍 Real Applications

  • Cryptography: Hash collision attacks
  • Databases: Primary key collision probability
  • Random generation: Duplicate detection

⚙️ Adjust Group Size

100%50%0%02370
People vs Probability curve (yellow line marks 23)

🎮 Interactive Simulation

Probability of shared birthday among 23 people
50.7%
More than 50% chance of a match!
🎂

Click to generate random birthdays

📊 Batch Verification

📊

点击按钮运行批量模拟

Verify theoretical probability with data