{"id":206,"date":"2019-06-26T23:01:30","date_gmt":"2019-06-26T23:01:30","guid":{"rendered":"http:\/\/funfacts.104.42.120.246.xip.io\/?page_id=206"},"modified":"2019-11-18T22:03:35","modified_gmt":"2019-11-18T22:03:35","slug":"birthday-problem","status":"publish","type":"page","link":"https:\/\/math.hmc.edu\/funfacts\/birthday-problem\/","title":{"rendered":"Birthday Problem"},"content":{"rendered":"\n<p>How many people do you need in a group to ensure at least a 50 percent probability that 2 people in the group share a birthday?<\/p>\n\n\n\n<p>Let&#8217;s take a show of hands. How many people think 30 people is enough? 60? 90? 180? 360?<\/p>\n\n\n\n<p>Surprisingly, the answer is only 23 people to have at least a 50 percent chance of a match. This goes up to 70 percent for 30 people, 90 percent for 41 people, 95 percent for 47 people. With 57 people there is better than a 99 percent chance of a birthday match!<\/p>\n\n\n\n<p><strong>Presentation&nbsp;Suggestions:<\/strong><br>If you have a large class, it is fun to try to take a poll of birthdays: have people call out their birthdays. But of course, whether or not you have a match proves nothing&#8230;<\/p>\n\n\n\n<p><strong>The&nbsp;Math&nbsp;Behind&nbsp;the&nbsp;Fact:<\/strong><br>Most people find this result surprising because they are tempted to calculate the&nbsp;probability&nbsp;of a birthday match with one particular person. But the calculation should be done over all pairs of people. Here is a trick that makes the calculation easier.<\/p>\n\n\n\n<p>To calculate the probability of a match, calculate the probability of no match and subtract from 1. But the probability of no match among n people is just (365\/365)(364\/365)(363\/365)(362\/365)&#8230;((366-n)\/365), where the k-th term in the product arises from considering the probability that the k-th person in the group doesn&#8217;t have a birthday match with the (k-1) people before her.<\/p>\n\n\n\n<p>If you want to do this calculation quickly, you can use an approximation: note that for&nbsp;<em>i<\/em>&nbsp;much smaller than&nbsp;<em>365<\/em>, the term (1-i\/365) can be approximated by EXP(-i\/365). Hence, for n much smaller than 365, the probability of no match is close to<br>EXP( &#8211; SUM<sub>i=1 to (n-1)<\/sub>&nbsp;i\/365) = EXP( &#8211; n(n-1)\/(2*365)).<br>When n=23, this evaluates to 0.499998 for the probability of no match. The probability of at least one match is thus 1 minus this quantity.<\/p>\n\n\n\n<p>For still more fun, if you know some probability: to find the probability that in a given set of n people there are exactly M matches, you can use a Poisson approximation. The Poisson distribution is usually used to model a random variable that counts a number of &#8220;rare events&#8221;, each independent and identically distributed and with average frequency lambda.<\/p>\n\n\n\n<p>Here, the probability of a match in a given pair is 1\/365. The matches can be considered to be approximately independent. The frequency lambda is the product of the number of pairs times the probability of a match in a pair: (n choose 2)\/365. Then the approximate probability that there are exactly M matches is: (lambda)<sup>M<\/sup>&nbsp;* EXP(-lambda) \/ M! which gives the same formula as above when M=0 and n=-365.<\/p>\n\n\n\n<p><strong>How to Cite this Page:<\/strong>\u00a0<br>Su, Francis E., et al. &#8220;Birthday Problem.&#8221;\u00a0<em>Math Fun Facts<\/em>. &lt;http:\/\/www.math.hmc.edu\/funfacts>.<\/p>\n\n\n\n<p><strong>Fun Fact suggested by:<\/strong><br>Francis Su<\/p>\n","protected":false},"excerpt":{"rendered":"<p>How many people do you need in a group to ensure at least a 50 percent probability that 2 people&#46;&#46;&#46;<\/p>\n","protected":false},"author":7,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"tags":[40,3,45],"class_list":["post-206","page","type-page","status-publish","hentry","tag-demonstration","tag-easy","tag-probability"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/math.hmc.edu\/funfacts\/wp-json\/wp\/v2\/pages\/206","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/math.hmc.edu\/funfacts\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/math.hmc.edu\/funfacts\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/math.hmc.edu\/funfacts\/wp-json\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/math.hmc.edu\/funfacts\/wp-json\/wp\/v2\/comments?post=206"}],"version-history":[{"count":3,"href":"https:\/\/math.hmc.edu\/funfacts\/wp-json\/wp\/v2\/pages\/206\/revisions"}],"predecessor-version":[{"id":1363,"href":"https:\/\/math.hmc.edu\/funfacts\/wp-json\/wp\/v2\/pages\/206\/revisions\/1363"}],"wp:attachment":[{"href":"https:\/\/math.hmc.edu\/funfacts\/wp-json\/wp\/v2\/media?parent=206"}],"wp:term":[{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/math.hmc.edu\/funfacts\/wp-json\/wp\/v2\/tags?post=206"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}