🎉 Birthday Paradox Calculator
📐 计算公式
P = 1 - exp(Σ ln(1 - i/D), i = 0 ... N-1)
Calculate the probability that at least two people share a birthday in a group of N, with a day-count parameter.
请输入人数
模型假设:每个人的生日相互独立,并在 D 天中等概率分布;默认不考虑 2 月 29 日与真实出生率的季节差异。结果用于概率科普和课堂演示,不代表特定人群的精确概率。
📐 公式说明
生日悖论:在 23 人的随机群体中,有 50.7% 的概率至少两人生日相同
计算公式(互补概率):
P(至少一对相同) = 1 - D! / ((D-N)! × D^N)
其中 D = 365(不考虑闰年),N = 人数
对数展开避免大数计算:
P = 1 - exp(Σ ln(1 - i/D), i = 0 ... N-1)
关键值:23人→50.7%;50人→97.0%;70人→99.9%
📚 深度解析:生日悖论计算器
💡 常见使用场景
- 模型假设:生日相互独立、按天数等概率分布,默认不考虑 2 月 29 日与真实出生率的季节差异。
- 班级点名或抽奖前估算撞生日概率,向同事解释 23 人就有约一半概率重复。
计算
23 人时至少两人同生日概率≈50.7%;50 人≈97%。
❓ 常见问题(FAQ)
- 为何反直觉?
- 是两两组合爆炸,非单人与全年比。
- 为什么 23 人就能到 50%?
- 组合数随人数平方增长:23 人有 253 对两两组合,任一对生日相同的概率累积起来就接近一半。
Formula & Standard References
| Item | Formula / Note | Source / Standard |
|---|---|---|
| Shared birthday | the chance of a shared birthday is one minus the falling factorial over 365 to the n | Probability theory |
| Threshold size | with twenty-three people the chance passes one half | Probability theory |
| Approximation | one minus e to the minus n(n-1) over 730 approximates well | Probability theory |
⚠️ 使用说明与注意事项
- 本工具纯前端运行,数据不会上传到服务器
- 建议在主流浏览器(Chrome/Safari/Firefox/Edge)中使用
- 计算结果仅供参考,请以实际应用场景为准