LeoMath

Explore

The birthday problem

Change the group size, simulate class after class, and watch the frequency approach the formula; compare the exact value with the exponential bound.

  • some two share a day
  • exponential bound1−e−n(n−1)/730
  • someone shares the first person's day
1−365⋅364⋯(365−n+1)365npairs 253exact 0.507297exponential bound 0.500002someone shares the first person's day 0.058571
classes simulated 0with a shared day 0frequency —
Back to the article →

Experiment idea from: github.com/huzhuofan1020-svg/GDGX

What did you observe?Play first, then answer. Read the explanation only after you have thought it through.

  1. 1.Drag the group size from 10 to 60. Where does the curve rise fastest? From how many people on is the probability above one half?
  2. 2.At n = 23 “some two share a day” is about 50%, yet “someone shares the first person's day” is only about 6%. What is the difference?
  3. 3.Simulate only 10 classes: how far is the frequency from the theory? And after 1000 classes?
Related concept: Probability spaces

Discussion

Found a mistake, have a question or a suggestion? You can also write to 620026600@qq.com

No comments yet. Share your understanding, ask a question, or point out an error on this page.

Log in to join the discussion