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 bound
- someone shares the first person's day
classes simulated 0with a shared day 0frequency —
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.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.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.Simulate only 10 classes: how far is the frequency from the theory? And after 1000 classes?
The exact curve rises fastest around (it is steep from roughly to ) and first exceeds at . What matters is the number of pairs, not people: people make pairs, each a chance of a match; “sharing the first person's day” involves only pairs, probability . A frequency is random; the more classes simulated, the closer it gets, the gap shrinking roughly like . Making that precise is the job of the law of large numbers later on.
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