CINXE.COM

Birthday problem - Wikipedia

<!DOCTYPE html> <html class="client-nojs vector-feature-language-in-header-enabled vector-feature-language-in-main-page-header-disabled vector-feature-page-tools-pinned-disabled vector-feature-toc-pinned-clientpref-1 vector-feature-main-menu-pinned-disabled vector-feature-limited-width-clientpref-1 vector-feature-limited-width-content-enabled vector-feature-custom-font-size-clientpref-1 vector-feature-appearance-pinned-clientpref-1 vector-feature-night-mode-enabled skin-theme-clientpref-day vector-sticky-header-enabled vector-toc-available" lang="en" dir="ltr"> <head> <meta charset="UTF-8"> <title>Birthday problem - Wikipedia</title> <script>(function(){var className="client-js vector-feature-language-in-header-enabled vector-feature-language-in-main-page-header-disabled vector-feature-page-tools-pinned-disabled vector-feature-toc-pinned-clientpref-1 vector-feature-main-menu-pinned-disabled vector-feature-limited-width-clientpref-1 vector-feature-limited-width-content-enabled vector-feature-custom-font-size-clientpref-1 vector-feature-appearance-pinned-clientpref-1 vector-feature-night-mode-enabled skin-theme-clientpref-day vector-sticky-header-enabled vector-toc-available";var cookie=document.cookie.match(/(?:^|; )enwikimwclientpreferences=([^;]+)/);if(cookie){cookie[1].split('%2C').forEach(function(pref){className=className.replace(new RegExp('(^| )'+pref.replace(/-clientpref-\w+$|[^\w-]+/g,'')+'-clientpref-\\w+( |$)'),'$1'+pref+'$2');});}document.documentElement.className=className;}());RLCONF={"wgBreakFrames":false,"wgSeparatorTransformTable":["",""],"wgDigitTransformTable":["",""],"wgDefaultDateFormat":"dmy","wgMonthNames":["","January","February","March","April","May","June","July","August","September","October","November","December"],"wgRequestId":"eaab4fb2-b27d-4c36-be0b-d436d6a13b2f","wgCanonicalNamespace":"","wgCanonicalSpecialPageName":false,"wgNamespaceNumber":0,"wgPageName":"Birthday_problem","wgTitle":"Birthday problem","wgCurRevisionId":1279006540,"wgRevisionId":1279006540,"wgArticleId":73242,"wgIsArticle":true,"wgIsRedirect":false,"wgAction":"view","wgUserName":null,"wgUserGroups":["*"],"wgCategories":["CS1: long volume value","Articles with short description","Short description is different from Wikidata","All articles with unsourced statements","Articles with unsourced statements from September 2019","Articles with unsourced statements from December 2016","Probability theory paradoxes","Probability problems","Applied probability","Birthdays","Mathematical problems","Coincidence"],"wgPageViewLanguage":"en","wgPageContentLanguage":"en","wgPageContentModel":"wikitext","wgRelevantPageName":"Birthday_problem","wgRelevantArticleId":73242,"wgIsProbablyEditable":true,"wgRelevantPageIsProbablyEditable":true,"wgRestrictionEdit":[],"wgRestrictionMove":[],"wgRedirectedFrom":"Birthday_paradox","wgNoticeProject":"wikipedia","wgCiteReferencePreviewsActive":false,"wgFlaggedRevsParams":{"tags":{"status":{"levels":1}}},"wgMediaViewerOnClick":true,"wgMediaViewerEnabledByDefault":true,"wgPopupsFlags":0,"wgVisualEditor":{"pageLanguageCode":"en","pageLanguageDir":"ltr","pageVariantFallbacks":"en"},"wgMFDisplayWikibaseDescriptions":{"search":true,"watchlist":true,"tagline":false,"nearby":true},"wgWMESchemaEditAttemptStepOversample":false,"wgWMEPageLength":50000,"wgInternalRedirectTargetUrl":"/wiki/Birthday_problem","wgEditSubmitButtonLabelPublish":true,"wgULSPosition":"interlanguage","wgULSisCompactLinksEnabled":false,"wgVector2022LanguageInHeader":true,"wgULSisLanguageSelectorEmpty":false,"wgWikibaseItemId":"Q339000","wgCheckUserClientHintsHeadersJsApi":["brands","architecture","bitness","fullVersionList","mobile","model","platform","platformVersion"],"GEHomepageSuggestedEditsEnableTopics":true,"wgGETopicsMatchModeEnabled":false,"wgGELevelingUpEnabledForUser":false}; RLSTATE={"ext.globalCssJs.user.styles":"ready","site.styles":"ready","user.styles":"ready","ext.globalCssJs.user":"ready","user":"ready","user.options":"loading","ext.cite.styles":"ready","ext.math.styles":"ready","skins.vector.search.codex.styles":"ready","skins.vector.styles":"ready","skins.vector.icons":"ready","ext.wikimediamessages.styles":"ready","ext.visualEditor.desktopArticleTarget.noscript":"ready","ext.uls.interlanguage":"ready","wikibase.client.init":"ready"};RLPAGEMODULES=["mediawiki.action.view.redirect","ext.cite.ux-enhancements","mediawiki.page.media","ext.scribunto.logs","site","mediawiki.page.ready","mediawiki.toc","skins.vector.js","ext.centralNotice.geoIP","ext.centralNotice.startUp","ext.gadget.ReferenceTooltips","ext.gadget.switcher","ext.urlShortener.toolbar","ext.centralauth.centralautologin","mmv.bootstrap","ext.popups","ext.visualEditor.desktopArticleTarget.init","ext.visualEditor.targetLoader","ext.echo.centralauth","ext.eventLogging","ext.wikimediaEvents","ext.navigationTiming","ext.uls.interface","ext.cx.eventlogging.campaigns","ext.cx.uls.quick.actions","wikibase.client.vector-2022","ext.checkUser.clientHints","ext.quicksurveys.init","ext.growthExperiments.SuggestedEditSession"];</script> <script>(RLQ=window.RLQ||[]).push(function(){mw.loader.impl(function(){return["user.options@12s5i",function($,jQuery,require,module){mw.user.tokens.set({"patrolToken":"+\\","watchToken":"+\\","csrfToken":"+\\"}); }];});});</script> <link rel="stylesheet" href="/w/load.php?lang=en&amp;modules=ext.cite.styles%7Cext.math.styles%7Cext.uls.interlanguage%7Cext.visualEditor.desktopArticleTarget.noscript%7Cext.wikimediamessages.styles%7Cskins.vector.icons%2Cstyles%7Cskins.vector.search.codex.styles%7Cwikibase.client.init&amp;only=styles&amp;skin=vector-2022"> <script async="" src="/w/load.php?lang=en&amp;modules=startup&amp;only=scripts&amp;raw=1&amp;skin=vector-2022"></script> <meta name="ResourceLoaderDynamicStyles" content=""> <link rel="stylesheet" href="/w/load.php?lang=en&amp;modules=site.styles&amp;only=styles&amp;skin=vector-2022"> <meta name="generator" content="MediaWiki 1.44.0-wmf.21"> <meta name="referrer" content="origin"> <meta name="referrer" content="origin-when-cross-origin"> <meta name="robots" content="max-image-preview:standard"> <meta name="format-detection" content="telephone=no"> <meta property="og:image" content="https://upload.wikimedia.org/wikipedia/commons/thumb/e/e7/Birthday_Paradox.svg/1200px-Birthday_Paradox.svg.png"> <meta property="og:image:width" content="1200"> <meta property="og:image:height" content="773"> <meta property="og:image" content="https://upload.wikimedia.org/wikipedia/commons/thumb/e/e7/Birthday_Paradox.svg/800px-Birthday_Paradox.svg.png"> <meta property="og:image:width" content="800"> <meta property="og:image:height" content="515"> <meta property="og:image" content="https://upload.wikimedia.org/wikipedia/commons/thumb/e/e7/Birthday_Paradox.svg/640px-Birthday_Paradox.svg.png"> <meta property="og:image:width" content="640"> <meta property="og:image:height" content="412"> <meta name="viewport" content="width=1120"> <meta property="og:title" content="Birthday problem - Wikipedia"> <meta property="og:type" content="website"> <link rel="preconnect" href="//upload.wikimedia.org"> <link rel="alternate" media="only screen and (max-width: 640px)" href="//en.m.wikipedia.org/wiki/Birthday_problem"> <link rel="alternate" type="application/x-wiki" title="Edit this page" href="/w/index.php?title=Birthday_problem&amp;action=edit"> <link rel="apple-touch-icon" href="/static/apple-touch/wikipedia.png"> <link rel="icon" href="/static/favicon/wikipedia.ico"> <link rel="search" type="application/opensearchdescription+xml" href="/w/rest.php/v1/search" title="Wikipedia (en)"> <link rel="EditURI" type="application/rsd+xml" href="//en.wikipedia.org/w/api.php?action=rsd"> <link rel="canonical" href="https://en.wikipedia.org/wiki/Birthday_problem"> <link rel="license" href="https://creativecommons.org/licenses/by-sa/4.0/deed.en"> <link rel="alternate" type="application/atom+xml" title="Wikipedia Atom feed" href="/w/index.php?title=Special:RecentChanges&amp;feed=atom"> <link rel="dns-prefetch" href="//meta.wikimedia.org" /> <link rel="dns-prefetch" href="login.wikimedia.org"> </head> <body class="skin--responsive skin-vector skin-vector-search-vue mediawiki ltr sitedir-ltr mw-hide-empty-elt ns-0 ns-subject mw-editable page-Birthday_problem rootpage-Birthday_problem skin-vector-2022 action-view"><a class="mw-jump-link" href="#bodyContent">Jump to content</a> <div class="vector-header-container"> <header class="vector-header mw-header"> <div class="vector-header-start"> <nav class="vector-main-menu-landmark" aria-label="Site"> <div id="vector-main-menu-dropdown" class="vector-dropdown vector-main-menu-dropdown vector-button-flush-left vector-button-flush-right" title="Main menu" > <input type="checkbox" id="vector-main-menu-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-main-menu-dropdown" class="vector-dropdown-checkbox " aria-label="Main menu" > <label id="vector-main-menu-dropdown-label" for="vector-main-menu-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only " aria-hidden="true" ><span class="vector-icon mw-ui-icon-menu mw-ui-icon-wikimedia-menu"></span> <span class="vector-dropdown-label-text">Main menu</span> </label> <div class="vector-dropdown-content"> <div id="vector-main-menu-unpinned-container" class="vector-unpinned-container"> <div id="vector-main-menu" class="vector-main-menu vector-pinnable-element"> <div class="vector-pinnable-header vector-main-menu-pinnable-header vector-pinnable-header-unpinned" data-feature-name="main-menu-pinned" data-pinnable-element-id="vector-main-menu" data-pinned-container-id="vector-main-menu-pinned-container" data-unpinned-container-id="vector-main-menu-unpinned-container" > <div class="vector-pinnable-header-label">Main menu</div> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-pin-button" data-event-name="pinnable-header.vector-main-menu.pin">move to sidebar</button> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button" data-event-name="pinnable-header.vector-main-menu.unpin">hide</button> </div> <div id="p-navigation" class="vector-menu mw-portlet mw-portlet-navigation" > <div class="vector-menu-heading"> Navigation </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="n-mainpage-description" class="mw-list-item"><a href="/wiki/Main_Page" title="Visit the main page [z]" accesskey="z"><span>Main page</span></a></li><li id="n-contents" class="mw-list-item"><a href="/wiki/Wikipedia:Contents" title="Guides to browsing Wikipedia"><span>Contents</span></a></li><li id="n-currentevents" class="mw-list-item"><a href="/wiki/Portal:Current_events" title="Articles related to current events"><span>Current events</span></a></li><li id="n-randompage" class="mw-list-item"><a href="/wiki/Special:Random" title="Visit a randomly selected article [x]" accesskey="x"><span>Random article</span></a></li><li id="n-aboutsite" class="mw-list-item"><a href="/wiki/Wikipedia:About" title="Learn about Wikipedia and how it works"><span>About Wikipedia</span></a></li><li id="n-contactpage" class="mw-list-item"><a href="//en.wikipedia.org/wiki/Wikipedia:Contact_us" title="How to contact Wikipedia"><span>Contact us</span></a></li> </ul> </div> </div> <div id="p-interaction" class="vector-menu mw-portlet mw-portlet-interaction" > <div class="vector-menu-heading"> Contribute </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="n-help" class="mw-list-item"><a href="/wiki/Help:Contents" title="Guidance on how to use and edit Wikipedia"><span>Help</span></a></li><li id="n-introduction" class="mw-list-item"><a href="/wiki/Help:Introduction" title="Learn how to edit Wikipedia"><span>Learn to edit</span></a></li><li id="n-portal" class="mw-list-item"><a href="/wiki/Wikipedia:Community_portal" title="The hub for editors"><span>Community portal</span></a></li><li id="n-recentchanges" class="mw-list-item"><a href="/wiki/Special:RecentChanges" title="A list of recent changes to Wikipedia [r]" accesskey="r"><span>Recent changes</span></a></li><li id="n-upload" class="mw-list-item"><a href="/wiki/Wikipedia:File_upload_wizard" title="Add images or other media for use on Wikipedia"><span>Upload file</span></a></li><li id="n-specialpages" class="mw-list-item"><a href="/wiki/Special:SpecialPages"><span>Special pages</span></a></li> </ul> </div> </div> </div> </div> </div> </div> </nav> <a href="/wiki/Main_Page" class="mw-logo"> <img class="mw-logo-icon" src="/static/images/icons/wikipedia.png" alt="" aria-hidden="true" height="50" width="50"> <span class="mw-logo-container skin-invert"> <img class="mw-logo-wordmark" alt="Wikipedia" src="/static/images/mobile/copyright/wikipedia-wordmark-en.svg" style="width: 7.5em; height: 1.125em;"> <img class="mw-logo-tagline" alt="The Free Encyclopedia" src="/static/images/mobile/copyright/wikipedia-tagline-en.svg" width="117" height="13" style="width: 7.3125em; height: 0.8125em;"> </span> </a> </div> <div class="vector-header-end"> <div id="p-search" role="search" class="vector-search-box-vue vector-search-box-collapses vector-search-box-show-thumbnail vector-search-box-auto-expand-width vector-search-box"> <a href="/wiki/Special:Search" class="cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only search-toggle" title="Search Wikipedia [f]" accesskey="f"><span class="vector-icon mw-ui-icon-search mw-ui-icon-wikimedia-search"></span> <span>Search</span> </a> <div class="vector-typeahead-search-container"> <div class="cdx-typeahead-search cdx-typeahead-search--show-thumbnail cdx-typeahead-search--auto-expand-width"> <form action="/w/index.php" id="searchform" class="cdx-search-input cdx-search-input--has-end-button"> <div id="simpleSearch" class="cdx-search-input__input-wrapper" data-search-loc="header-moved"> <div class="cdx-text-input cdx-text-input--has-start-icon"> <input class="cdx-text-input__input" type="search" name="search" placeholder="Search Wikipedia" aria-label="Search Wikipedia" autocapitalize="sentences" title="Search Wikipedia [f]" accesskey="f" id="searchInput" > <span class="cdx-text-input__icon cdx-text-input__start-icon"></span> </div> <input type="hidden" name="title" value="Special:Search"> </div> <button class="cdx-button cdx-search-input__end-button">Search</button> </form> </div> </div> </div> <nav class="vector-user-links vector-user-links-wide" aria-label="Personal tools"> <div class="vector-user-links-main"> <div id="p-vector-user-menu-preferences" class="vector-menu mw-portlet emptyPortlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> </ul> </div> </div> <div id="p-vector-user-menu-userpage" class="vector-menu mw-portlet emptyPortlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> </ul> </div> </div> <nav class="vector-appearance-landmark" aria-label="Appearance"> <div id="vector-appearance-dropdown" class="vector-dropdown " title="Change the appearance of the page&#039;s font size, width, and color" > <input type="checkbox" id="vector-appearance-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-appearance-dropdown" class="vector-dropdown-checkbox " aria-label="Appearance" > <label id="vector-appearance-dropdown-label" for="vector-appearance-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only " aria-hidden="true" ><span class="vector-icon mw-ui-icon-appearance mw-ui-icon-wikimedia-appearance"></span> <span class="vector-dropdown-label-text">Appearance</span> </label> <div class="vector-dropdown-content"> <div id="vector-appearance-unpinned-container" class="vector-unpinned-container"> </div> </div> </div> </nav> <div id="p-vector-user-menu-notifications" class="vector-menu mw-portlet emptyPortlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> </ul> </div> </div> <div id="p-vector-user-menu-overflow" class="vector-menu mw-portlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="pt-sitesupport-2" class="user-links-collapsible-item mw-list-item user-links-collapsible-item"><a data-mw="interface" href="https://donate.wikimedia.org/?wmf_source=donate&amp;wmf_medium=sidebar&amp;wmf_campaign=en.wikipedia.org&amp;uselang=en" class=""><span>Donate</span></a> </li> <li id="pt-createaccount-2" class="user-links-collapsible-item mw-list-item user-links-collapsible-item"><a data-mw="interface" href="/w/index.php?title=Special:CreateAccount&amp;returnto=Birthday+problem" title="You are encouraged to create an account and log in; however, it is not mandatory" class=""><span>Create account</span></a> </li> <li id="pt-login-2" class="user-links-collapsible-item mw-list-item user-links-collapsible-item"><a data-mw="interface" href="/w/index.php?title=Special:UserLogin&amp;returnto=Birthday+problem" title="You&#039;re encouraged to log in; however, it&#039;s not mandatory. [o]" accesskey="o" class=""><span>Log in</span></a> </li> </ul> </div> </div> </div> <div id="vector-user-links-dropdown" class="vector-dropdown vector-user-menu vector-button-flush-right vector-user-menu-logged-out" title="Log in and more options" > <input type="checkbox" id="vector-user-links-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-user-links-dropdown" class="vector-dropdown-checkbox " aria-label="Personal tools" > <label id="vector-user-links-dropdown-label" for="vector-user-links-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only " aria-hidden="true" ><span class="vector-icon mw-ui-icon-ellipsis mw-ui-icon-wikimedia-ellipsis"></span> <span class="vector-dropdown-label-text">Personal tools</span> </label> <div class="vector-dropdown-content"> <div id="p-personal" class="vector-menu mw-portlet mw-portlet-personal user-links-collapsible-item" title="User menu" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="pt-sitesupport" class="user-links-collapsible-item mw-list-item"><a href="https://donate.wikimedia.org/?wmf_source=donate&amp;wmf_medium=sidebar&amp;wmf_campaign=en.wikipedia.org&amp;uselang=en"><span>Donate</span></a></li><li id="pt-createaccount" class="user-links-collapsible-item mw-list-item"><a href="/w/index.php?title=Special:CreateAccount&amp;returnto=Birthday+problem" title="You are encouraged to create an account and log in; however, it is not mandatory"><span class="vector-icon mw-ui-icon-userAdd mw-ui-icon-wikimedia-userAdd"></span> <span>Create account</span></a></li><li id="pt-login" class="user-links-collapsible-item mw-list-item"><a href="/w/index.php?title=Special:UserLogin&amp;returnto=Birthday+problem" title="You&#039;re encouraged to log in; however, it&#039;s not mandatory. [o]" accesskey="o"><span class="vector-icon mw-ui-icon-logIn mw-ui-icon-wikimedia-logIn"></span> <span>Log in</span></a></li> </ul> </div> </div> <div id="p-user-menu-anon-editor" class="vector-menu mw-portlet mw-portlet-user-menu-anon-editor" > <div class="vector-menu-heading"> Pages for logged out editors <a href="/wiki/Help:Introduction" aria-label="Learn more about editing"><span>learn more</span></a> </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="pt-anoncontribs" class="mw-list-item"><a href="/wiki/Special:MyContributions" title="A list of edits made from this IP address [y]" accesskey="y"><span>Contributions</span></a></li><li id="pt-anontalk" class="mw-list-item"><a href="/wiki/Special:MyTalk" title="Discussion about edits from this IP address [n]" accesskey="n"><span>Talk</span></a></li> </ul> </div> </div> </div> </div> </nav> </div> </header> </div> <div class="mw-page-container"> <div class="mw-page-container-inner"> <div class="vector-sitenotice-container"> <div id="siteNotice"><!-- CentralNotice --></div> </div> <div class="vector-column-start"> <div class="vector-main-menu-container"> <div id="mw-navigation"> <nav id="mw-panel" class="vector-main-menu-landmark" aria-label="Site"> <div id="vector-main-menu-pinned-container" class="vector-pinned-container"> </div> </nav> </div> </div> <div class="vector-sticky-pinned-container"> <nav id="mw-panel-toc" aria-label="Contents" data-event-name="ui.sidebar-toc" class="mw-table-of-contents-container vector-toc-landmark"> <div id="vector-toc-pinned-container" class="vector-pinned-container"> <div id="vector-toc" class="vector-toc vector-pinnable-element"> <div class="vector-pinnable-header vector-toc-pinnable-header vector-pinnable-header-pinned" data-feature-name="toc-pinned" data-pinnable-element-id="vector-toc" > <h2 class="vector-pinnable-header-label">Contents</h2> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-pin-button" data-event-name="pinnable-header.vector-toc.pin">move to sidebar</button> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button" data-event-name="pinnable-header.vector-toc.unpin">hide</button> </div> <ul class="vector-toc-contents" id="mw-panel-toc-list"> <li id="toc-mw-content-text" class="vector-toc-list-item vector-toc-level-1"> <a href="#" class="vector-toc-link"> <div class="vector-toc-text">(Top)</div> </a> </li> <li id="toc-Calculating_the_probability" class="vector-toc-list-item vector-toc-level-1"> <a class="vector-toc-link" href="#Calculating_the_probability"> <div class="vector-toc-text"> <span class="vector-toc-numb">1</span> <span>Calculating the probability</span> </div> </a> <ul id="toc-Calculating_the_probability-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Approximations" class="vector-toc-list-item vector-toc-level-1"> <a class="vector-toc-link" href="#Approximations"> <div class="vector-toc-text"> <span class="vector-toc-numb">2</span> <span>Approximations</span> </div> </a> <button aria-controls="toc-Approximations-sublist" class="cdx-button cdx-button--weight-quiet cdx-button--icon-only vector-toc-toggle"> <span class="vector-icon mw-ui-icon-wikimedia-expand"></span> <span>Toggle Approximations subsection</span> </button> <ul id="toc-Approximations-sublist" class="vector-toc-list"> <li id="toc-Simple_exponentiation" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Simple_exponentiation"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.1</span> <span>Simple exponentiation</span> </div> </a> <ul id="toc-Simple_exponentiation-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Poisson_approximation" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Poisson_approximation"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.2</span> <span>Poisson approximation</span> </div> </a> <ul id="toc-Poisson_approximation-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Square_approximation" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Square_approximation"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.3</span> <span>Square approximation</span> </div> </a> <ul id="toc-Square_approximation-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Approximation_of_number_of_people" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Approximation_of_number_of_people"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.4</span> <span>Approximation of number of people</span> </div> </a> <ul id="toc-Approximation_of_number_of_people-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Probability_table" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Probability_table"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.5</span> <span>Probability table</span> </div> </a> <ul id="toc-Probability_table-sublist" class="vector-toc-list"> </ul> </li> </ul> </li> <li id="toc-An_upper_bound_on_the_probability_and_a_lower_bound_on_the_number_of_people" class="vector-toc-list-item vector-toc-level-1"> <a class="vector-toc-link" href="#An_upper_bound_on_the_probability_and_a_lower_bound_on_the_number_of_people"> <div class="vector-toc-text"> <span class="vector-toc-numb">3</span> <span>An upper bound on the probability and a lower bound on the number of people</span> </div> </a> <ul id="toc-An_upper_bound_on_the_probability_and_a_lower_bound_on_the_number_of_people-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Generalizations" class="vector-toc-list-item vector-toc-level-1"> <a class="vector-toc-link" href="#Generalizations"> <div class="vector-toc-text"> <span class="vector-toc-numb">4</span> <span>Generalizations</span> </div> </a> <button aria-controls="toc-Generalizations-sublist" class="cdx-button cdx-button--weight-quiet cdx-button--icon-only vector-toc-toggle"> <span class="vector-icon mw-ui-icon-wikimedia-expand"></span> <span>Toggle Generalizations subsection</span> </button> <ul id="toc-Generalizations-sublist" class="vector-toc-list"> <li id="toc-Arbitrary_number_of_days" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Arbitrary_number_of_days"> <div class="vector-toc-text"> <span class="vector-toc-numb">4.1</span> <span>Arbitrary number of days</span> </div> </a> <ul id="toc-Arbitrary_number_of_days-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-More_than_two_people_sharing_a_birthday" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#More_than_two_people_sharing_a_birthday"> <div class="vector-toc-text"> <span class="vector-toc-numb">4.2</span> <span>More than two people sharing a birthday</span> </div> </a> <ul id="toc-More_than_two_people_sharing_a_birthday-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Everyone_shares_a_birthday" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Everyone_shares_a_birthday"> <div class="vector-toc-text"> <span class="vector-toc-numb">4.3</span> <span>Everyone shares a birthday</span> </div> </a> <ul id="toc-Everyone_shares_a_birthday-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Probability_of_a_shared_birthday_(collision)" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Probability_of_a_shared_birthday_(collision)"> <div class="vector-toc-text"> <span class="vector-toc-numb">4.4</span> <span>Probability of a shared birthday (collision)</span> </div> </a> <ul id="toc-Probability_of_a_shared_birthday_(collision)-sublist" class="vector-toc-list"> <li id="toc-Probability_of_a_unique_collision" class="vector-toc-list-item vector-toc-level-3"> <a class="vector-toc-link" href="#Probability_of_a_unique_collision"> <div class="vector-toc-text"> <span class="vector-toc-numb">4.4.1</span> <span>Probability of a unique collision</span> </div> </a> <ul id="toc-Probability_of_a_unique_collision-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Generalization_to_multiple_types_of_people" class="vector-toc-list-item vector-toc-level-3"> <a class="vector-toc-link" href="#Generalization_to_multiple_types_of_people"> <div class="vector-toc-text"> <span class="vector-toc-numb">4.4.2</span> <span>Generalization to multiple types of people</span> </div> </a> <ul id="toc-Generalization_to_multiple_types_of_people-sublist" class="vector-toc-list"> </ul> </li> </ul> </li> </ul> </li> <li id="toc-Other_birthday_problems" class="vector-toc-list-item vector-toc-level-1"> <a class="vector-toc-link" href="#Other_birthday_problems"> <div class="vector-toc-text"> <span class="vector-toc-numb">5</span> <span>Other birthday problems</span> </div> </a> <button aria-controls="toc-Other_birthday_problems-sublist" class="cdx-button cdx-button--weight-quiet cdx-button--icon-only vector-toc-toggle"> <span class="vector-icon mw-ui-icon-wikimedia-expand"></span> <span>Toggle Other birthday problems subsection</span> </button> <ul id="toc-Other_birthday_problems-sublist" class="vector-toc-list"> <li id="toc-First_match" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#First_match"> <div class="vector-toc-text"> <span class="vector-toc-numb">5.1</span> <span>First match</span> </div> </a> <ul id="toc-First_match-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Same_birthday_as_you" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Same_birthday_as_you"> <div class="vector-toc-text"> <span class="vector-toc-numb">5.2</span> <span>Same birthday as you</span> </div> </a> <ul id="toc-Same_birthday_as_you-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Number_of_people_with_a_shared_birthday" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Number_of_people_with_a_shared_birthday"> <div class="vector-toc-text"> <span class="vector-toc-numb">5.3</span> <span>Number of people with a shared birthday</span> </div> </a> <ul id="toc-Number_of_people_with_a_shared_birthday-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Number_of_people_until_every_birthday_is_achieved" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Number_of_people_until_every_birthday_is_achieved"> <div class="vector-toc-text"> <span class="vector-toc-numb">5.4</span> <span>Number of people until every birthday is achieved</span> </div> </a> <ul id="toc-Number_of_people_until_every_birthday_is_achieved-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Near_matches" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Near_matches"> <div class="vector-toc-text"> <span class="vector-toc-numb">5.5</span> <span>Near matches</span> </div> </a> <ul id="toc-Near_matches-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Number_of_days_with_a_certain_number_of_birthdays" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Number_of_days_with_a_certain_number_of_birthdays"> <div class="vector-toc-text"> <span class="vector-toc-numb">5.6</span> <span>Number of days with a certain number of birthdays</span> </div> </a> <ul id="toc-Number_of_days_with_a_certain_number_of_birthdays-sublist" class="vector-toc-list"> <li id="toc-Number_of_days_with_at_least_one_birthday" class="vector-toc-list-item vector-toc-level-3"> <a class="vector-toc-link" href="#Number_of_days_with_at_least_one_birthday"> <div class="vector-toc-text"> <span class="vector-toc-numb">5.6.1</span> <span>Number of days with at least one birthday</span> </div> </a> <ul id="toc-Number_of_days_with_at_least_one_birthday-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Number_of_days_with_at_least_two_birthdays" class="vector-toc-list-item vector-toc-level-3"> <a class="vector-toc-link" href="#Number_of_days_with_at_least_two_birthdays"> <div class="vector-toc-text"> <span class="vector-toc-numb">5.6.2</span> <span>Number of days with at least two birthdays</span> </div> </a> <ul id="toc-Number_of_days_with_at_least_two_birthdays-sublist" class="vector-toc-list"> </ul> </li> </ul> </li> <li id="toc-Number_of_people_who_repeat_a_birthday" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Number_of_people_who_repeat_a_birthday"> <div class="vector-toc-text"> <span class="vector-toc-numb">5.7</span> <span>Number of people who repeat a birthday</span> </div> </a> <ul id="toc-Number_of_people_who_repeat_a_birthday-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Average_number_of_people_to_get_at_least_one_shared_birthday" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Average_number_of_people_to_get_at_least_one_shared_birthday"> <div class="vector-toc-text"> <span class="vector-toc-numb">5.8</span> <span>Average number of people to get at least one shared birthday</span> </div> </a> <ul id="toc-Average_number_of_people_to_get_at_least_one_shared_birthday-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Reverse_problem" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Reverse_problem"> <div class="vector-toc-text"> <span class="vector-toc-numb">5.9</span> <span>Reverse problem</span> </div> </a> <ul id="toc-Reverse_problem-sublist" class="vector-toc-list"> </ul> </li> </ul> </li> <li id="toc-Partition_problem" class="vector-toc-list-item vector-toc-level-1"> <a class="vector-toc-link" href="#Partition_problem"> <div class="vector-toc-text"> <span class="vector-toc-numb">6</span> <span>Partition problem</span> </div> </a> <ul id="toc-Partition_problem-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-In_fiction" class="vector-toc-list-item vector-toc-level-1"> <a class="vector-toc-link" href="#In_fiction"> <div class="vector-toc-text"> <span class="vector-toc-numb">7</span> <span>In fiction</span> </div> </a> <ul id="toc-In_fiction-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Notes" class="vector-toc-list-item vector-toc-level-1"> <a class="vector-toc-link" href="#Notes"> <div class="vector-toc-text"> <span class="vector-toc-numb">8</span> <span>Notes</span> </div> </a> <ul id="toc-Notes-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-References" class="vector-toc-list-item vector-toc-level-1"> <a class="vector-toc-link" href="#References"> <div class="vector-toc-text"> <span class="vector-toc-numb">9</span> <span>References</span> </div> </a> <ul id="toc-References-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Bibliography" class="vector-toc-list-item vector-toc-level-1"> <a class="vector-toc-link" href="#Bibliography"> <div class="vector-toc-text"> <span class="vector-toc-numb">10</span> <span>Bibliography</span> </div> </a> <ul id="toc-Bibliography-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-External_links" class="vector-toc-list-item vector-toc-level-1"> <a class="vector-toc-link" href="#External_links"> <div class="vector-toc-text"> <span class="vector-toc-numb">11</span> <span>External links</span> </div> </a> <ul id="toc-External_links-sublist" class="vector-toc-list"> </ul> </li> </ul> </div> </div> </nav> </div> </div> <div class="mw-content-container"> <main id="content" class="mw-body"> <header class="mw-body-header vector-page-titlebar"> <nav aria-label="Contents" class="vector-toc-landmark"> <div id="vector-page-titlebar-toc" class="vector-dropdown vector-page-titlebar-toc vector-button-flush-left" title="Table of Contents" > <input type="checkbox" id="vector-page-titlebar-toc-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-page-titlebar-toc" class="vector-dropdown-checkbox " aria-label="Toggle the table of contents" > <label id="vector-page-titlebar-toc-label" for="vector-page-titlebar-toc-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only " aria-hidden="true" ><span class="vector-icon mw-ui-icon-listBullet mw-ui-icon-wikimedia-listBullet"></span> <span class="vector-dropdown-label-text">Toggle the table of contents</span> </label> <div class="vector-dropdown-content"> <div id="vector-page-titlebar-toc-unpinned-container" class="vector-unpinned-container"> </div> </div> </div> </nav> <h1 id="firstHeading" class="firstHeading mw-first-heading"><span class="mw-page-title-main">Birthday problem</span></h1> <div id="p-lang-btn" class="vector-dropdown mw-portlet mw-portlet-lang" > <input type="checkbox" id="p-lang-btn-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-p-lang-btn" class="vector-dropdown-checkbox mw-interlanguage-selector" aria-label="Go to an article in another language. Available in 39 languages" > <label id="p-lang-btn-label" for="p-lang-btn-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--action-progressive mw-portlet-lang-heading-39" aria-hidden="true" ><span class="vector-icon mw-ui-icon-language-progressive mw-ui-icon-wikimedia-language-progressive"></span> <span class="vector-dropdown-label-text">39 languages</span> </label> <div class="vector-dropdown-content"> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li class="interlanguage-link interwiki-ar mw-list-item"><a href="https://ar.wikipedia.org/wiki/%D9%85%D8%B9%D8%B6%D9%84%D8%A9_%D9%8A%D9%88%D9%85_%D8%A7%D9%84%D9%85%D9%8A%D9%84%D8%A7%D8%AF" title="معضلة يوم الميلاد – Arabic" lang="ar" hreflang="ar" data-title="معضلة يوم الميلاد" data-language-autonym="العربية" data-language-local-name="Arabic" class="interlanguage-link-target"><span>العربية</span></a></li><li class="interlanguage-link interwiki-bs mw-list-item"><a href="https://bs.wikipedia.org/wiki/Ro%C4%91endanski_paradoks" title="Rođendanski paradoks – Bosnian" lang="bs" hreflang="bs" data-title="Rođendanski paradoks" data-language-autonym="Bosanski" data-language-local-name="Bosnian" class="interlanguage-link-target"><span>Bosanski</span></a></li><li class="interlanguage-link interwiki-ca mw-list-item"><a href="https://ca.wikipedia.org/wiki/Problema_dels_aniversaris" title="Problema dels aniversaris – Catalan" lang="ca" hreflang="ca" data-title="Problema dels aniversaris" data-language-autonym="Català" data-language-local-name="Catalan" class="interlanguage-link-target"><span>Català</span></a></li><li class="interlanguage-link interwiki-cs mw-list-item"><a href="https://cs.wikipedia.org/wiki/Narozeninov%C3%BD_probl%C3%A9m" title="Narozeninový problém – Czech" lang="cs" hreflang="cs" data-title="Narozeninový problém" data-language-autonym="Čeština" data-language-local-name="Czech" class="interlanguage-link-target"><span>Čeština</span></a></li><li class="interlanguage-link interwiki-da mw-list-item"><a href="https://da.wikipedia.org/wiki/F%C3%B8dselsdagsparadokset" title="Fødselsdagsparadokset – Danish" lang="da" hreflang="da" data-title="Fødselsdagsparadokset" data-language-autonym="Dansk" data-language-local-name="Danish" class="interlanguage-link-target"><span>Dansk</span></a></li><li class="interlanguage-link interwiki-de mw-list-item"><a href="https://de.wikipedia.org/wiki/Geburtstagsparadoxon" title="Geburtstagsparadoxon – German" lang="de" hreflang="de" data-title="Geburtstagsparadoxon" data-language-autonym="Deutsch" data-language-local-name="German" class="interlanguage-link-target"><span>Deutsch</span></a></li><li class="interlanguage-link interwiki-el mw-list-item"><a href="https://el.wikipedia.org/wiki/%CE%A0%CE%B1%CF%81%CE%AC%CE%B4%CE%BF%CE%BE%CE%BF_%CF%84%CF%89%CE%BD_%CE%B3%CE%B5%CE%BD%CE%B5%CE%B8%CE%BB%CE%AF%CF%89%CE%BD" title="Παράδοξο των γενεθλίων – Greek" lang="el" hreflang="el" data-title="Παράδοξο των γενεθλίων" data-language-autonym="Ελληνικά" data-language-local-name="Greek" class="interlanguage-link-target"><span>Ελληνικά</span></a></li><li class="interlanguage-link interwiki-es mw-list-item"><a href="https://es.wikipedia.org/wiki/Paradoja_del_cumplea%C3%B1os" title="Paradoja del cumpleaños – Spanish" lang="es" hreflang="es" data-title="Paradoja del cumpleaños" data-language-autonym="Español" data-language-local-name="Spanish" class="interlanguage-link-target"><span>Español</span></a></li><li class="interlanguage-link interwiki-eu mw-list-item"><a href="https://eu.wikipedia.org/wiki/Urtebetetzeen_ebazkizuna" title="Urtebetetzeen ebazkizuna – Basque" lang="eu" hreflang="eu" data-title="Urtebetetzeen ebazkizuna" data-language-autonym="Euskara" data-language-local-name="Basque" class="interlanguage-link-target"><span>Euskara</span></a></li><li class="interlanguage-link interwiki-fa mw-list-item"><a href="https://fa.wikipedia.org/wiki/%D9%85%D8%B3%D8%A6%D9%84%D9%87_%D8%AA%D8%A7%D8%B1%DB%8C%D8%AE_%D8%AA%D9%88%D9%84%D8%AF" title="مسئله تاریخ تولد – Persian" lang="fa" hreflang="fa" data-title="مسئله تاریخ تولد" data-language-autonym="فارسی" data-language-local-name="Persian" class="interlanguage-link-target"><span>فارسی</span></a></li><li class="interlanguage-link interwiki-fr mw-list-item"><a href="https://fr.wikipedia.org/wiki/Paradoxe_des_anniversaires" title="Paradoxe des anniversaires – French" lang="fr" hreflang="fr" data-title="Paradoxe des anniversaires" data-language-autonym="Français" data-language-local-name="French" class="interlanguage-link-target"><span>Français</span></a></li><li class="interlanguage-link interwiki-gl mw-list-item"><a href="https://gl.wikipedia.org/wiki/Paradoxo_do_aniversario" title="Paradoxo do aniversario – Galician" lang="gl" hreflang="gl" data-title="Paradoxo do aniversario" data-language-autonym="Galego" data-language-local-name="Galician" class="interlanguage-link-target"><span>Galego</span></a></li><li class="interlanguage-link interwiki-ko mw-list-item"><a href="https://ko.wikipedia.org/wiki/%EC%83%9D%EC%9D%BC_%EB%AC%B8%EC%A0%9C" title="생일 문제 – Korean" lang="ko" hreflang="ko" data-title="생일 문제" data-language-autonym="한국어" data-language-local-name="Korean" class="interlanguage-link-target"><span>한국어</span></a></li><li class="interlanguage-link interwiki-hy mw-list-item"><a href="https://hy.wikipedia.org/wiki/%D4%BE%D5%B6%D5%B6%D5%A4%D5%B5%D5%A1%D5%B6_%D6%85%D6%80%D5%A5%D6%80%D5%AB_%D5%AD%D5%B6%D5%A4%D5%AB%D6%80" title="Ծննդյան օրերի խնդիր – Armenian" lang="hy" hreflang="hy" data-title="Ծննդյան օրերի խնդիր" data-language-autonym="Հայերեն" data-language-local-name="Armenian" class="interlanguage-link-target"><span>Հայերեն</span></a></li><li class="interlanguage-link interwiki-hr mw-list-item"><a href="https://hr.wikipedia.org/wiki/Ro%C4%91endanski_problem" title="Rođendanski problem – Croatian" lang="hr" hreflang="hr" data-title="Rođendanski problem" data-language-autonym="Hrvatski" data-language-local-name="Croatian" class="interlanguage-link-target"><span>Hrvatski</span></a></li><li class="interlanguage-link interwiki-it mw-list-item"><a href="https://it.wikipedia.org/wiki/Paradosso_del_compleanno" title="Paradosso del compleanno – Italian" lang="it" hreflang="it" data-title="Paradosso del compleanno" data-language-autonym="Italiano" data-language-local-name="Italian" class="interlanguage-link-target"><span>Italiano</span></a></li><li class="interlanguage-link interwiki-he mw-list-item"><a href="https://he.wikipedia.org/wiki/%D7%A4%D7%A8%D7%93%D7%95%D7%A7%D7%A1_%D7%99%D7%95%D7%9D_%D7%94%D7%94%D7%95%D7%9C%D7%93%D7%AA" title="פרדוקס יום ההולדת – Hebrew" lang="he" hreflang="he" data-title="פרדוקס יום ההולדת" data-language-autonym="עברית" data-language-local-name="Hebrew" class="interlanguage-link-target"><span>עברית</span></a></li><li class="interlanguage-link interwiki-la mw-list-item"><a href="https://la.wikipedia.org/wiki/Problema_natalium" title="Problema natalium – Latin" lang="la" hreflang="la" data-title="Problema natalium" data-language-autonym="Latina" data-language-local-name="Latin" class="interlanguage-link-target"><span>Latina</span></a></li><li class="interlanguage-link interwiki-lt mw-list-item"><a href="https://lt.wikipedia.org/wiki/Gimimo_dien%C5%B3_paradoksas" title="Gimimo dienų paradoksas – Lithuanian" lang="lt" hreflang="lt" data-title="Gimimo dienų paradoksas" data-language-autonym="Lietuvių" data-language-local-name="Lithuanian" class="interlanguage-link-target"><span>Lietuvių</span></a></li><li class="interlanguage-link interwiki-hu mw-list-item"><a href="https://hu.wikipedia.org/wiki/Sz%C3%BClet%C3%A9snap-paradoxon" title="Születésnap-paradoxon – Hungarian" lang="hu" hreflang="hu" data-title="Születésnap-paradoxon" data-language-autonym="Magyar" data-language-local-name="Hungarian" class="interlanguage-link-target"><span>Magyar</span></a></li><li class="interlanguage-link interwiki-ml mw-list-item"><a href="https://ml.wikipedia.org/wiki/%E0%B4%9C%E0%B4%A8%E0%B5%8D%E0%B4%AE%E0%B4%A6%E0%B4%BF%E0%B4%A8%E0%B4%AA%E0%B5%8D%E0%B4%B0%E0%B4%B6%E0%B5%8D%E0%B4%A8%E0%B4%82" title="ജന്മദിനപ്രശ്നം – Malayalam" lang="ml" hreflang="ml" data-title="ജന്മദിനപ്രശ്നം" data-language-autonym="മലയാളം" data-language-local-name="Malayalam" class="interlanguage-link-target"><span>മലയാളം</span></a></li><li class="interlanguage-link interwiki-mr mw-list-item"><a href="https://mr.wikipedia.org/wiki/%E0%A4%B5%E0%A4%BE%E0%A4%A2%E0%A4%A6%E0%A4%BF%E0%A4%B5%E0%A4%B8_%E0%A4%B8%E0%A4%AE%E0%A4%B8%E0%A5%8D%E0%A4%AF%E0%A4%BE" title="वाढदिवस समस्या – Marathi" lang="mr" hreflang="mr" data-title="वाढदिवस समस्या" data-language-autonym="मराठी" data-language-local-name="Marathi" class="interlanguage-link-target"><span>मराठी</span></a></li><li class="interlanguage-link interwiki-nl mw-list-item"><a href="https://nl.wikipedia.org/wiki/Verjaardagenparadox" title="Verjaardagenparadox – Dutch" lang="nl" hreflang="nl" data-title="Verjaardagenparadox" data-language-autonym="Nederlands" data-language-local-name="Dutch" class="interlanguage-link-target"><span>Nederlands</span></a></li><li class="interlanguage-link interwiki-ja mw-list-item"><a href="https://ja.wikipedia.org/wiki/%E8%AA%95%E7%94%9F%E6%97%A5%E3%81%AE%E3%83%91%E3%83%A9%E3%83%89%E3%83%83%E3%82%AF%E3%82%B9" title="誕生日のパラドックス – Japanese" lang="ja" hreflang="ja" data-title="誕生日のパラドックス" data-language-autonym="日本語" data-language-local-name="Japanese" class="interlanguage-link-target"><span>日本語</span></a></li><li class="interlanguage-link interwiki-oc mw-list-item"><a href="https://oc.wikipedia.org/wiki/Parad%C3%B2xa_dels_anniversaris" title="Paradòxa dels anniversaris – Occitan" lang="oc" hreflang="oc" data-title="Paradòxa dels anniversaris" data-language-autonym="Occitan" data-language-local-name="Occitan" class="interlanguage-link-target"><span>Occitan</span></a></li><li class="interlanguage-link interwiki-pl mw-list-item"><a href="https://pl.wikipedia.org/wiki/Paradoks_dni_urodzin" title="Paradoks dni urodzin – Polish" lang="pl" hreflang="pl" data-title="Paradoks dni urodzin" data-language-autonym="Polski" data-language-local-name="Polish" class="interlanguage-link-target"><span>Polski</span></a></li><li class="interlanguage-link interwiki-pt mw-list-item"><a href="https://pt.wikipedia.org/wiki/Paradoxo_do_anivers%C3%A1rio" title="Paradoxo do aniversário – Portuguese" lang="pt" hreflang="pt" data-title="Paradoxo do aniversário" data-language-autonym="Português" data-language-local-name="Portuguese" class="interlanguage-link-target"><span>Português</span></a></li><li class="interlanguage-link interwiki-ru mw-list-item"><a href="https://ru.wikipedia.org/wiki/%D0%9F%D0%B0%D1%80%D0%B0%D0%B4%D0%BE%D0%BA%D1%81_%D0%B4%D0%BD%D0%B5%D0%B9_%D1%80%D0%BE%D0%B6%D0%B4%D0%B5%D0%BD%D0%B8%D1%8F" title="Парадокс дней рождения – Russian" lang="ru" hreflang="ru" data-title="Парадокс дней рождения" data-language-autonym="Русский" data-language-local-name="Russian" class="interlanguage-link-target"><span>Русский</span></a></li><li class="interlanguage-link interwiki-sq mw-list-item"><a href="https://sq.wikipedia.org/wiki/Problemi_i_dit%C3%ABlindjes" title="Problemi i ditëlindjes – Albanian" lang="sq" hreflang="sq" data-title="Problemi i ditëlindjes" data-language-autonym="Shqip" data-language-local-name="Albanian" class="interlanguage-link-target"><span>Shqip</span></a></li><li class="interlanguage-link interwiki-sr mw-list-item"><a href="https://sr.wikipedia.org/wiki/Problem_ro%C4%91endana" title="Problem rođendana – Serbian" lang="sr" hreflang="sr" data-title="Problem rođendana" data-language-autonym="Српски / srpski" data-language-local-name="Serbian" class="interlanguage-link-target"><span>Српски / srpski</span></a></li><li class="interlanguage-link interwiki-fi mw-list-item"><a href="https://fi.wikipedia.org/wiki/Syntym%C3%A4p%C3%A4iv%C3%A4ongelma" title="Syntymäpäiväongelma – Finnish" lang="fi" hreflang="fi" data-title="Syntymäpäiväongelma" data-language-autonym="Suomi" data-language-local-name="Finnish" class="interlanguage-link-target"><span>Suomi</span></a></li><li class="interlanguage-link interwiki-sv mw-list-item"><a href="https://sv.wikipedia.org/wiki/F%C3%B6delsedagsparadoxen" title="Födelsedagsparadoxen – Swedish" lang="sv" hreflang="sv" data-title="Födelsedagsparadoxen" data-language-autonym="Svenska" data-language-local-name="Swedish" class="interlanguage-link-target"><span>Svenska</span></a></li><li class="interlanguage-link interwiki-th mw-list-item"><a href="https://th.wikipedia.org/wiki/%E0%B8%9B%E0%B8%B1%E0%B8%8D%E0%B8%AB%E0%B8%B2%E0%B8%A7%E0%B8%B1%E0%B8%99%E0%B9%80%E0%B8%81%E0%B8%B4%E0%B8%94" title="ปัญหาวันเกิด – Thai" lang="th" hreflang="th" data-title="ปัญหาวันเกิด" data-language-autonym="ไทย" data-language-local-name="Thai" class="interlanguage-link-target"><span>ไทย</span></a></li><li class="interlanguage-link interwiki-tr mw-list-item"><a href="https://tr.wikipedia.org/wiki/Do%C4%9Fum_g%C3%BCn%C3%BC_problemi" title="Doğum günü problemi – Turkish" lang="tr" hreflang="tr" data-title="Doğum günü problemi" data-language-autonym="Türkçe" data-language-local-name="Turkish" class="interlanguage-link-target"><span>Türkçe</span></a></li><li class="interlanguage-link interwiki-uk mw-list-item"><a href="https://uk.wikipedia.org/wiki/%D0%9F%D0%B0%D1%80%D0%B0%D0%B4%D0%BE%D0%BA%D1%81_%D0%B4%D0%BD%D1%96%D0%B2_%D0%BD%D0%B0%D1%80%D0%BE%D0%B4%D0%B6%D0%B5%D0%BD%D0%BD%D1%8F" title="Парадокс днів народження – Ukrainian" lang="uk" hreflang="uk" data-title="Парадокс днів народження" data-language-autonym="Українська" data-language-local-name="Ukrainian" class="interlanguage-link-target"><span>Українська</span></a></li><li class="interlanguage-link interwiki-ur mw-list-item"><a href="https://ur.wikipedia.org/wiki/%D8%B3%D8%A7%D9%84%DA%AF%D8%B1%DB%81_%D9%85%D8%B3%D8%A6%D9%84%DB%81" title="سالگرہ مسئلہ – Urdu" lang="ur" hreflang="ur" data-title="سالگرہ مسئلہ" data-language-autonym="اردو" data-language-local-name="Urdu" class="interlanguage-link-target"><span>اردو</span></a></li><li class="interlanguage-link interwiki-vi mw-list-item"><a href="https://vi.wikipedia.org/wiki/B%C3%A0i_to%C3%A1n_ng%C3%A0y_sinh" title="Bài toán ngày sinh – Vietnamese" lang="vi" hreflang="vi" data-title="Bài toán ngày sinh" data-language-autonym="Tiếng Việt" data-language-local-name="Vietnamese" class="interlanguage-link-target"><span>Tiếng Việt</span></a></li><li class="interlanguage-link interwiki-zh-yue mw-list-item"><a href="https://zh-yue.wikipedia.org/wiki/%E7%94%9F%E6%97%A5%E6%82%96%E8%AB%96" title="生日悖論 – Cantonese" lang="yue" hreflang="yue" data-title="生日悖論" data-language-autonym="粵語" data-language-local-name="Cantonese" class="interlanguage-link-target"><span>粵語</span></a></li><li class="interlanguage-link interwiki-zh mw-list-item"><a href="https://zh.wikipedia.org/wiki/%E7%94%9F%E6%97%A5%E5%95%8F%E9%A1%8C" title="生日問題 – Chinese" lang="zh" hreflang="zh" data-title="生日問題" data-language-autonym="中文" data-language-local-name="Chinese" class="interlanguage-link-target"><span>中文</span></a></li> </ul> <div class="after-portlet after-portlet-lang"><span class="wb-langlinks-edit wb-langlinks-link"><a href="https://www.wikidata.org/wiki/Special:EntityPage/Q339000#sitelinks-wikipedia" title="Edit interlanguage links" class="wbc-editpage">Edit links</a></span></div> </div> </div> </div> </header> <div class="vector-page-toolbar"> <div class="vector-page-toolbar-container"> <div id="left-navigation"> <nav aria-label="Namespaces"> <div id="p-associated-pages" class="vector-menu vector-menu-tabs mw-portlet mw-portlet-associated-pages" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="ca-nstab-main" class="selected vector-tab-noicon mw-list-item"><a href="/wiki/Birthday_problem" title="View the content page [c]" accesskey="c"><span>Article</span></a></li><li id="ca-talk" class="vector-tab-noicon mw-list-item"><a href="/wiki/Talk:Birthday_problem" rel="discussion" title="Discuss improvements to the content page [t]" accesskey="t"><span>Talk</span></a></li> </ul> </div> </div> <div id="vector-variants-dropdown" class="vector-dropdown emptyPortlet" > <input type="checkbox" id="vector-variants-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-variants-dropdown" class="vector-dropdown-checkbox " aria-label="Change language variant" > <label id="vector-variants-dropdown-label" for="vector-variants-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet" aria-hidden="true" ><span class="vector-dropdown-label-text">English</span> </label> <div class="vector-dropdown-content"> <div id="p-variants" class="vector-menu mw-portlet mw-portlet-variants emptyPortlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> </ul> </div> </div> </div> </div> </nav> </div> <div id="right-navigation" class="vector-collapsible"> <nav aria-label="Views"> <div id="p-views" class="vector-menu vector-menu-tabs mw-portlet mw-portlet-views" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="ca-view" class="selected vector-tab-noicon mw-list-item"><a href="/wiki/Birthday_problem"><span>Read</span></a></li><li id="ca-edit" class="vector-tab-noicon mw-list-item"><a href="/w/index.php?title=Birthday_problem&amp;action=edit" title="Edit this page [e]" accesskey="e"><span>Edit</span></a></li><li id="ca-history" class="vector-tab-noicon mw-list-item"><a href="/w/index.php?title=Birthday_problem&amp;action=history" title="Past revisions of this page [h]" accesskey="h"><span>View history</span></a></li> </ul> </div> </div> </nav> <nav class="vector-page-tools-landmark" aria-label="Page tools"> <div id="vector-page-tools-dropdown" class="vector-dropdown vector-page-tools-dropdown" > <input type="checkbox" id="vector-page-tools-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-page-tools-dropdown" class="vector-dropdown-checkbox " aria-label="Tools" > <label id="vector-page-tools-dropdown-label" for="vector-page-tools-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet" aria-hidden="true" ><span class="vector-dropdown-label-text">Tools</span> </label> <div class="vector-dropdown-content"> <div id="vector-page-tools-unpinned-container" class="vector-unpinned-container"> <div id="vector-page-tools" class="vector-page-tools vector-pinnable-element"> <div class="vector-pinnable-header vector-page-tools-pinnable-header vector-pinnable-header-unpinned" data-feature-name="page-tools-pinned" data-pinnable-element-id="vector-page-tools" data-pinned-container-id="vector-page-tools-pinned-container" data-unpinned-container-id="vector-page-tools-unpinned-container" > <div class="vector-pinnable-header-label">Tools</div> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-pin-button" data-event-name="pinnable-header.vector-page-tools.pin">move to sidebar</button> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button" data-event-name="pinnable-header.vector-page-tools.unpin">hide</button> </div> <div id="p-cactions" class="vector-menu mw-portlet mw-portlet-cactions emptyPortlet vector-has-collapsible-items" title="More options" > <div class="vector-menu-heading"> Actions </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="ca-more-view" class="selected vector-more-collapsible-item mw-list-item"><a href="/wiki/Birthday_problem"><span>Read</span></a></li><li id="ca-more-edit" class="vector-more-collapsible-item mw-list-item"><a href="/w/index.php?title=Birthday_problem&amp;action=edit" title="Edit this page [e]" accesskey="e"><span>Edit</span></a></li><li id="ca-more-history" class="vector-more-collapsible-item mw-list-item"><a href="/w/index.php?title=Birthday_problem&amp;action=history"><span>View history</span></a></li> </ul> </div> </div> <div id="p-tb" class="vector-menu mw-portlet mw-portlet-tb" > <div class="vector-menu-heading"> General </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="t-whatlinkshere" class="mw-list-item"><a href="/wiki/Special:WhatLinksHere/Birthday_problem" title="List of all English Wikipedia pages containing links to this page [j]" accesskey="j"><span>What links here</span></a></li><li id="t-recentchangeslinked" class="mw-list-item"><a href="/wiki/Special:RecentChangesLinked/Birthday_problem" rel="nofollow" title="Recent changes in pages linked from this page [k]" accesskey="k"><span>Related changes</span></a></li><li id="t-upload" class="mw-list-item"><a href="//en.wikipedia.org/wiki/Wikipedia:File_Upload_Wizard" title="Upload files [u]" accesskey="u"><span>Upload file</span></a></li><li id="t-permalink" class="mw-list-item"><a href="/w/index.php?title=Birthday_problem&amp;oldid=1279006540" title="Permanent link to this revision of this page"><span>Permanent link</span></a></li><li id="t-info" class="mw-list-item"><a href="/w/index.php?title=Birthday_problem&amp;action=info" title="More information about this page"><span>Page information</span></a></li><li id="t-cite" class="mw-list-item"><a href="/w/index.php?title=Special:CiteThisPage&amp;page=Birthday_problem&amp;id=1279006540&amp;wpFormIdentifier=titleform" title="Information on how to cite this page"><span>Cite this page</span></a></li><li id="t-urlshortener" class="mw-list-item"><a href="/w/index.php?title=Special:UrlShortener&amp;url=https%3A%2F%2Fen.wikipedia.org%2Fwiki%2FBirthday_problem"><span>Get shortened URL</span></a></li><li id="t-urlshortener-qrcode" class="mw-list-item"><a href="/w/index.php?title=Special:QrCode&amp;url=https%3A%2F%2Fen.wikipedia.org%2Fwiki%2FBirthday_problem"><span>Download QR code</span></a></li> </ul> </div> </div> <div id="p-coll-print_export" class="vector-menu mw-portlet mw-portlet-coll-print_export" > <div class="vector-menu-heading"> Print/export </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="coll-download-as-rl" class="mw-list-item"><a href="/w/index.php?title=Special:DownloadAsPdf&amp;page=Birthday_problem&amp;action=show-download-screen" title="Download this page as a PDF file"><span>Download as PDF</span></a></li><li id="t-print" class="mw-list-item"><a href="/w/index.php?title=Birthday_problem&amp;printable=yes" title="Printable version of this page [p]" accesskey="p"><span>Printable version</span></a></li> </ul> </div> </div> <div id="p-wikibase-otherprojects" class="vector-menu mw-portlet mw-portlet-wikibase-otherprojects" > <div class="vector-menu-heading"> In other projects </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li class="wb-otherproject-link wb-otherproject-commons mw-list-item"><a href="https://commons.wikimedia.org/wiki/Category:Birthday_paradox" hreflang="en"><span>Wikimedia Commons</span></a></li><li id="t-wikibase" class="wb-otherproject-link wb-otherproject-wikibase-dataitem mw-list-item"><a href="https://www.wikidata.org/wiki/Special:EntityPage/Q339000" title="Structured data on this page hosted by Wikidata [g]" accesskey="g"><span>Wikidata item</span></a></li> </ul> </div> </div> </div> </div> </div> </div> </nav> </div> </div> </div> <div class="vector-column-end"> <div class="vector-sticky-pinned-container"> <nav class="vector-page-tools-landmark" aria-label="Page tools"> <div id="vector-page-tools-pinned-container" class="vector-pinned-container"> </div> </nav> <nav class="vector-appearance-landmark" aria-label="Appearance"> <div id="vector-appearance-pinned-container" class="vector-pinned-container"> <div id="vector-appearance" class="vector-appearance vector-pinnable-element"> <div class="vector-pinnable-header vector-appearance-pinnable-header vector-pinnable-header-pinned" data-feature-name="appearance-pinned" data-pinnable-element-id="vector-appearance" data-pinned-container-id="vector-appearance-pinned-container" data-unpinned-container-id="vector-appearance-unpinned-container" > <div class="vector-pinnable-header-label">Appearance</div> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-pin-button" data-event-name="pinnable-header.vector-appearance.pin">move to sidebar</button> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button" data-event-name="pinnable-header.vector-appearance.unpin">hide</button> </div> </div> </div> </nav> </div> </div> <div id="bodyContent" class="vector-body" aria-labelledby="firstHeading" data-mw-ve-target-container> <div class="vector-body-before-content"> <div class="mw-indicators"> </div> <div id="siteSub" class="noprint">From Wikipedia, the free encyclopedia</div> </div> <div id="contentSub"><div id="mw-content-subtitle"><span class="mw-redirectedfrom">(Redirected from <a href="/w/index.php?title=Birthday_paradox&amp;redirect=no" class="mw-redirect" title="Birthday paradox">Birthday paradox</a>)</span></div></div> <div id="mw-content-text" class="mw-body-content"><div class="mw-content-ltr mw-parser-output" lang="en" dir="ltr"><div class="shortdescription nomobile noexcerpt noprint searchaux" style="display:none">Probability of shared birthdays</div> <style data-mw-deduplicate="TemplateStyles:r1236090951">.mw-parser-output .hatnote{font-style:italic}.mw-parser-output div.hatnote{padding-left:1.6em;margin-bottom:0.5em}.mw-parser-output .hatnote i{font-style:normal}.mw-parser-output .hatnote+link+.hatnote{margin-top:-0.5em}@media print{body.ns-0 .mw-parser-output .hatnote{display:none!important}}</style><div role="note" class="hatnote navigation-not-searchable">For yearly variation in mortality rates, see <a href="/wiki/Birthday_effect" title="Birthday effect">Birthday effect</a>. For the mathematical brain teaser that was asked in the Math Olympiad, see <a href="/wiki/Cheryl%27s_Birthday" title="Cheryl&#39;s Birthday">Cheryl's Birthday</a>.</div> <figure class="mw-default-size" typeof="mw:File/Thumb"><a href="/wiki/File:Birthday_Paradox.svg" class="mw-file-description"><img src="//upload.wikimedia.org/wikipedia/commons/thumb/e/e7/Birthday_Paradox.svg/290px-Birthday_Paradox.svg.png" decoding="async" width="290" height="187" class="mw-file-element" srcset="//upload.wikimedia.org/wikipedia/commons/thumb/e/e7/Birthday_Paradox.svg/435px-Birthday_Paradox.svg.png 1.5x, //upload.wikimedia.org/wikipedia/commons/thumb/e/e7/Birthday_Paradox.svg/580px-Birthday_Paradox.svg.png 2x" data-file-width="1289" data-file-height="830" /></a><figcaption>The computed probability of at least two people sharing the same birthday versus the number of people</figcaption></figure> <p>In <a href="/wiki/Probability_theory" title="Probability theory">probability theory</a>, the <b>birthday problem</b> asks for the probability that, in a set of <span class="texhtml mvar" style="font-style:italic;">n</span> <a href="/wiki/Random" class="mw-redirect" title="Random">randomly</a> chosen people, at least two will share the same <a href="/wiki/Birthday" title="Birthday">birthday</a>. The <b>birthday paradox</b> is the counterintuitive fact that only 23 people are needed for that probability to exceed 50%. </p><p>The birthday paradox is a <a href="/wiki/Veridical_paradox" class="mw-redirect" title="Veridical paradox">veridical paradox</a>: it seems wrong at first glance but is, in fact, true. While it may seem surprising that only 23 individuals are required to reach a 50% probability of a shared birthday, this result is made more intuitive by considering that the birthday comparisons will be made between every possible pair of individuals. With 23 individuals, there are <style data-mw-deduplicate="TemplateStyles:r1214402035">.mw-parser-output .sfrac{white-space:nowrap}.mw-parser-output .sfrac.tion,.mw-parser-output .sfrac .tion{display:inline-block;vertical-align:-0.5em;font-size:85%;text-align:center}.mw-parser-output .sfrac .num{display:block;line-height:1em;margin:0.0em 0.1em;border-bottom:1px solid}.mw-parser-output .sfrac .den{display:block;line-height:1em;margin:0.1em 0.1em}.mw-parser-output .sr-only{border:0;clip:rect(0,0,0,0);clip-path:polygon(0px 0px,0px 0px,0px 0px);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}</style><span class="sfrac">&#8288;<span class="tion"><span class="num">23&#160;×&#160;22</span><span class="sr-only">/</span><span class="den">2</span></span>&#8288;</span>&#160;=&#160;253 pairs to consider. </p><p>Real-world applications for the birthday problem include a cryptographic attack called the <a href="/wiki/Birthday_attack" title="Birthday attack">birthday attack</a>, which uses this probabilistic model to reduce the complexity of finding a <a href="/wiki/Collision_attack" title="Collision attack">collision</a> for a <a href="/wiki/Hash_function" title="Hash function">hash function</a>, as well as calculating the approximate risk of a hash collision existing within the hashes of a given size of population. </p><p>The problem is generally attributed to <a href="/wiki/Harold_Davenport" title="Harold Davenport">Harold Davenport</a> in about 1927, though he did not publish it at the time. Davenport did not claim to be its discoverer "because he could not believe that it had not been stated earlier".<sup id="cite_ref-1" class="reference"><a href="#cite_note-1"><span class="cite-bracket">&#91;</span>1<span class="cite-bracket">&#93;</span></a></sup><sup id="cite_ref-2" class="reference"><a href="#cite_note-2"><span class="cite-bracket">&#91;</span>2<span class="cite-bracket">&#93;</span></a></sup> The first publication of a version of the birthday problem was by <a href="/wiki/Richard_von_Mises" title="Richard von Mises">Richard von Mises</a> in 1939.<sup id="cite_ref-3" class="reference"><a href="#cite_note-3"><span class="cite-bracket">&#91;</span>3<span class="cite-bracket">&#93;</span></a></sup> </p> <meta property="mw:PageProp/toc" /> <div class="mw-heading mw-heading2"><h2 id="Calculating_the_probability">Calculating the probability</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Birthday_problem&amp;action=edit&amp;section=1" title="Edit section: Calculating the probability"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>From a <a href="/wiki/Permutation" title="Permutation">permutations</a> perspective, let the event <span class="texhtml"><i>A</i></span> be the probability of finding a group of 23 people without any repeated birthdays. Where the event <span class="texhtml"><i>B</i></span> is the probability of finding a group of 23 people with at least two people sharing same birthday, <span class="texhtml"><i>P</i>(<i>B</i>) = 1 − <i>P</i>(<i>A</i>)</span>. This is such that <span class="texhtml"><i>P</i>(<i>A</i>)</span> is the ratio of the total number of birthdays, <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle V_{nr}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>V</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> <mi>r</mi> </mrow> </msub> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle V_{nr}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/66d968dc25fe4ec5317655346ff7214b81b21fd0" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:3.315ex; height:2.509ex;" alt="{\displaystyle V_{nr}}" /></span>, without repetitions and order matters (e.g. for a group of 2 people, mm/dd birthday format, one possible outcome is <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \left\{\left\{01/02,05/20\right\},\left\{05/20,01/02\right\},\left\{10/02,08/04\right\},...\right\}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow> <mo>{</mo> <mrow> <mrow> <mo>{</mo> <mrow> <mn>01</mn> <mrow class="MJX-TeXAtom-ORD"> <mo>/</mo> </mrow> <mn>02</mn> <mo>,</mo> <mn>05</mn> <mrow class="MJX-TeXAtom-ORD"> <mo>/</mo> </mrow> <mn>20</mn> </mrow> <mo>}</mo> </mrow> <mo>,</mo> <mrow> <mo>{</mo> <mrow> <mn>05</mn> <mrow class="MJX-TeXAtom-ORD"> <mo>/</mo> </mrow> <mn>20</mn> <mo>,</mo> <mn>01</mn> <mrow class="MJX-TeXAtom-ORD"> <mo>/</mo> </mrow> <mn>02</mn> </mrow> <mo>}</mo> </mrow> <mo>,</mo> <mrow> <mo>{</mo> <mrow> <mn>10</mn> <mrow class="MJX-TeXAtom-ORD"> <mo>/</mo> </mrow> <mn>02</mn> <mo>,</mo> <mn>08</mn> <mrow class="MJX-TeXAtom-ORD"> <mo>/</mo> </mrow> <mn>04</mn> </mrow> <mo>}</mo> </mrow> <mo>,</mo> <mo>.</mo> <mo>.</mo> <mo>.</mo> </mrow> <mo>}</mo> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \left\{\left\{01/02,05/20\right\},\left\{05/20,01/02\right\},\left\{10/02,08/04\right\},...\right\}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/1af65822c4e7ee0d37f977243e4f1d7730ec8970" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:54.64ex; height:2.843ex;" alt="{\displaystyle \left\{\left\{01/02,05/20\right\},\left\{05/20,01/02\right\},\left\{10/02,08/04\right\},...\right\}}" /></span>) divided by the total number of birthdays with repetition and order matters, <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle V_{t}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>V</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>t</mi> </mrow> </msub> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle V_{t}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/27b61a6ac590c5cd1911b10c484f38de1edb58c7" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:2.181ex; height:2.509ex;" alt="{\displaystyle V_{t}}" /></span>, as it is the total space of outcomes from the experiment (e.g. 2 people, one possible outcome is <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \left\{\left\{01/02,01/02\right\},\left\{10/02,08/04\right\},...\right\}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow> <mo>{</mo> <mrow> <mrow> <mo>{</mo> <mrow> <mn>01</mn> <mrow class="MJX-TeXAtom-ORD"> <mo>/</mo> </mrow> <mn>02</mn> <mo>,</mo> <mn>01</mn> <mrow class="MJX-TeXAtom-ORD"> <mo>/</mo> </mrow> <mn>02</mn> </mrow> <mo>}</mo> </mrow> <mo>,</mo> <mrow> <mo>{</mo> <mrow> <mn>10</mn> <mrow class="MJX-TeXAtom-ORD"> <mo>/</mo> </mrow> <mn>02</mn> <mo>,</mo> <mn>08</mn> <mrow class="MJX-TeXAtom-ORD"> <mo>/</mo> </mrow> <mn>04</mn> </mrow> <mo>}</mo> </mrow> <mo>,</mo> <mo>.</mo> <mo>.</mo> <mo>.</mo> </mrow> <mo>}</mo> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \left\{\left\{01/02,01/02\right\},\left\{10/02,08/04\right\},...\right\}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/2b41ca151f4e0564f7a6613292dca65444d73c18" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:38.236ex; height:2.843ex;" alt="{\displaystyle \left\{\left\{01/02,01/02\right\},\left\{10/02,08/04\right\},...\right\}}" /></span>). Therefore <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle V_{nr}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>V</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> <mi>r</mi> </mrow> </msub> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle V_{nr}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/66d968dc25fe4ec5317655346ff7214b81b21fd0" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:3.315ex; height:2.509ex;" alt="{\displaystyle V_{nr}}" /></span> and <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle V_{t}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>V</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>t</mi> </mrow> </msub> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle V_{t}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/27b61a6ac590c5cd1911b10c484f38de1edb58c7" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:2.181ex; height:2.509ex;" alt="{\displaystyle V_{t}}" /></span> are <a href="/wiki/Permutation" title="Permutation">permutations</a>. </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\begin{aligned}V_{nr}&amp;={\frac {n!}{(n-k)!}}={\frac {365!}{(365-23)!}}\\[8pt]V_{t}&amp;=n^{k}=365^{23}\\[8pt]P(A)&amp;={\frac {V_{nr}}{V_{t}}}\approx 0.492703\\[8pt]P(B)&amp;=1-P(A)\approx 1-0.492703\approx 0.507297\quad (50.7297\%)\end{aligned}}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow class="MJX-TeXAtom-ORD"> <mtable columnalign="right left right left right left right left right left right left" rowspacing="1.1em 1.1em 1.1em 0.3em" columnspacing="0em 2em 0em 2em 0em 2em 0em 2em 0em 2em 0em" displaystyle="true"> <mtr> <mtd> <msub> <mi>V</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> <mi>r</mi> </mrow> </msub> </mtd> <mtd> <mi></mi> <mo>=</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <mi>n</mi> <mo>!</mo> </mrow> <mrow> <mo stretchy="false">(</mo> <mi>n</mi> <mo>&#x2212;<!-- − --></mo> <mi>k</mi> <mo stretchy="false">)</mo> <mo>!</mo> </mrow> </mfrac> </mrow> <mo>=</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <mn>365</mn> <mo>!</mo> </mrow> <mrow> <mo stretchy="false">(</mo> <mn>365</mn> <mo>&#x2212;<!-- − --></mo> <mn>23</mn> <mo stretchy="false">)</mo> <mo>!</mo> </mrow> </mfrac> </mrow> </mtd> </mtr> <mtr> <mtd> <msub> <mi>V</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>t</mi> </mrow> </msub> </mtd> <mtd> <mi></mi> <mo>=</mo> <msup> <mi>n</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> </mrow> </msup> <mo>=</mo> <msup> <mn>365</mn> <mrow class="MJX-TeXAtom-ORD"> <mn>23</mn> </mrow> </msup> </mtd> </mtr> <mtr> <mtd> <mi>P</mi> <mo stretchy="false">(</mo> <mi>A</mi> <mo stretchy="false">)</mo> </mtd> <mtd> <mi></mi> <mo>=</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <msub> <mi>V</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> <mi>r</mi> </mrow> </msub> <msub> <mi>V</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>t</mi> </mrow> </msub> </mfrac> </mrow> <mo>&#x2248;<!-- ≈ --></mo> <mn>0.492703</mn> </mtd> </mtr> <mtr> <mtd> <mi>P</mi> <mo stretchy="false">(</mo> <mi>B</mi> <mo stretchy="false">)</mo> </mtd> <mtd> <mi></mi> <mo>=</mo> <mn>1</mn> <mo>&#x2212;<!-- − --></mo> <mi>P</mi> <mo stretchy="false">(</mo> <mi>A</mi> <mo stretchy="false">)</mo> <mo>&#x2248;<!-- ≈ --></mo> <mn>1</mn> <mo>&#x2212;<!-- − --></mo> <mn>0.492703</mn> <mo>&#x2248;<!-- ≈ --></mo> <mn>0.507297</mn> <mspace width="1em"></mspace> <mo stretchy="false">(</mo> <mn>50.7297</mn> <mi mathvariant="normal">&#x25;<!-- % --></mi> <mo stretchy="false">)</mo> </mtd> </mtr> </mtable> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle {\begin{aligned}V_{nr}&amp;={\frac {n!}{(n-k)!}}={\frac {365!}{(365-23)!}}\\[8pt]V_{t}&amp;=n^{k}=365^{23}\\[8pt]P(A)&amp;={\frac {V_{nr}}{V_{t}}}\approx 0.492703\\[8pt]P(B)&amp;=1-P(A)\approx 1-0.492703\approx 0.507297\quad (50.7297\%)\end{aligned}}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/ce8b14f49cb83d4079d928a6aff2c3164c2e8539" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -11.338ex; width:59.927ex; height:23.843ex;" alt="{\displaystyle {\begin{aligned}V_{nr}&amp;={\frac {n!}{(n-k)!}}={\frac {365!}{(365-23)!}}\\[8pt]V_{t}&amp;=n^{k}=365^{23}\\[8pt]P(A)&amp;={\frac {V_{nr}}{V_{t}}}\approx 0.492703\\[8pt]P(B)&amp;=1-P(A)\approx 1-0.492703\approx 0.507297\quad (50.7297\%)\end{aligned}}}" /></span></dd></dl> <p>Another way the birthday problem can be solved is by asking for an approximate probability that in a group of <span class="texhtml mvar" style="font-style:italic;">n</span> people at least two have the same birthday. For simplicity, <a href="/wiki/Leap_year" title="Leap year">leap years</a>, <a href="/wiki/Twin" title="Twin">twins</a>, <a href="/wiki/Selection_bias" title="Selection bias">selection bias</a>, and seasonal and weekly variations in birth rates<sup id="cite_ref-4" class="reference"><a href="#cite_note-4"><span class="cite-bracket">&#91;</span>4<span class="cite-bracket">&#93;</span></a></sup> are generally disregarded, and instead it is assumed that there are 365 possible birthdays, and that each person's birthday is equally likely to be any of these days, independent of the other people in the group. </p><p>For independent birthdays, a <a href="/wiki/Discrete_uniform_distribution" title="Discrete uniform distribution">uniform distribution</a> of birthdays minimizes the probability of two people in a group having the same birthday. Any unevenness increases the likelihood of two people sharing a birthday.<sup id="cite_ref-5" class="reference"><a href="#cite_note-5"><span class="cite-bracket">&#91;</span>5<span class="cite-bracket">&#93;</span></a></sup><sup id="cite_ref-6" class="reference"><a href="#cite_note-6"><span class="cite-bracket">&#91;</span>6<span class="cite-bracket">&#93;</span></a></sup> However real-world birthdays are not sufficiently uneven to make much change: the real-world group size necessary to have a greater than 50% chance of a shared birthday is 23, as in the theoretical uniform distribution.<sup id="cite_ref-Borja_7-0" class="reference"><a href="#cite_note-Borja-7"><span class="cite-bracket">&#91;</span>7<span class="cite-bracket">&#93;</span></a></sup> </p><p>The goal is to compute <span class="texhtml"><i>P</i>(<i>B</i>)</span>, the probability that at least two people in the room have the same birthday. However, it is simpler to calculate <span class="texhtml"><i>P</i>(<i>A</i>′)</span>, the probability that no two people in the room have the same birthday. Then, because <span class="texhtml"><i>B</i></span> and <span class="texhtml"><i>A</i>′</span> are the only two possibilities and are also <a href="/wiki/Mutually_exclusive_events" class="mw-redirect" title="Mutually exclusive events">mutually exclusive</a>, <span class="texhtml"><i>P</i>(<i>B</i>) = 1 − <i>P</i>(<i>A</i>′).</span> </p><p>Here is the calculation of <span class="texhtml"><i>P</i>(<i>B</i>)</span> for 23 people. Let the 23 people be numbered 1 to 23. The <a href="/wiki/Event_(probability_theory)" title="Event (probability theory)">event</a> that all 23 people have different birthdays is the same as the event that person 2 does not have the same birthday as person 1, and that person 3 does not have the same birthday as either person 1 or person 2, and so on, and finally that person 23 does not have the same birthday as any of persons 1 through 22. Let these events be called Event 2, Event 3, and so on. Event 1 is the event of person 1 having a birthday, which occurs with probability 1. This conjunction of events may be computed using <a href="/wiki/Conditional_probability" title="Conditional probability">conditional probability</a>: the probability of Event 2 is <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035" /><span class="sfrac">&#8288;<span class="tion"><span class="num">364</span><span class="sr-only">/</span><span class="den">365</span></span>&#8288;</span>, as person 2 may have any birthday other than the birthday of person 1. Similarly, the probability of Event 3 given that Event 2 occurred is <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035" /><span class="sfrac">&#8288;<span class="tion"><span class="num">363</span><span class="sr-only">/</span><span class="den">365</span></span>&#8288;</span>, as person 3 may have any of the birthdays not already taken by persons 1 and 2. This continues until finally the probability of Event 23 given that all preceding events occurred is <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035" /><span class="sfrac">&#8288;<span class="tion"><span class="num">343</span><span class="sr-only">/</span><span class="den">365</span></span>&#8288;</span>. Finally, the principle of conditional probability implies that <span class="texhtml"><i>P</i>(<i>A</i>′)</span> is equal to the product of these individual probabilities: </p> <style data-mw-deduplicate="TemplateStyles:r1266403038">.mw-parser-output table.numblk{border-collapse:collapse;border:none;margin-top:0;margin-right:0;margin-bottom:0}.mw-parser-output table.numblk>tbody>tr>td{vertical-align:middle;padding:0}.mw-parser-output table.numblk>tbody>tr>td:nth-child(2){width:99%}.mw-parser-output table.numblk>tbody>tr>td:nth-child(2)>table{border-collapse:collapse;margin:0;border:none;width:100%}.mw-parser-output table.numblk>tbody>tr>td:nth-child(2)>table>tbody>tr:first-child>td:first-child,.mw-parser-output table.numblk>tbody>tr>td:nth-child(2)>table>tbody>tr:first-child>td:last-child{padding:0 0.4ex}.mw-parser-output table.numblk>tbody>tr>td:nth-child(2)>table>tbody>tr:first-child>td:nth-child(2){width:100%;padding:0}.mw-parser-output table.numblk>tbody>tr>td:nth-child(2)>table>tbody>tr:last-child>td{padding:0}.mw-parser-output table.numblk>tbody>tr>td:last-child{font-weight:bold}.mw-parser-output table.numblk.numblk-raw-n>tbody>tr>td:last-child{font-weight:unset}.mw-parser-output table.numblk>tbody>tr>td:last-child::before{content:"("}.mw-parser-output table.numblk>tbody>tr>td:last-child::after{content:")"}.mw-parser-output table.numblk.numblk-raw-n>tbody>tr>td:last-child::before,.mw-parser-output table.numblk.numblk-raw-n>tbody>tr>td:last-child::after{content:none}.mw-parser-output table.numblk>tbody>tr>td{border:none}.mw-parser-output table.numblk.numblk-border>tbody>tr>td{border:thin solid}.mw-parser-output table.numblk>tbody>tr>td:nth-child(2)>table>tbody>tr:first-child>td{border:none}.mw-parser-output table.numblk.numblk-border>tbody>tr>td:nth-child(2)>table>tbody>tr:first-child>td{border:thin solid}.mw-parser-output table.numblk>tbody>tr>td:nth-child(2)>table>tbody>tr:last-child>td{border-left:none;border-right:none;border-bottom:none}.mw-parser-output table.numblk.numblk-border>tbody>tr>td:nth-child(2)>table>tbody>tr:last-child>td{border-left:thin solid;border-right:thin solid;border-bottom:thin solid}.mw-parser-output table.numblk:target{color:var(--color-base,#202122);background-color:#cfe8fd}@media screen{html.skin-theme-clientpref-night .mw-parser-output table.numblk:target{color:var(--color-base,#eaecf0);background-color:#301702}}@media screen and (prefers-color-scheme:dark){html.skin-theme-clientpref-os .mw-parser-output table.numblk:target{color:var(--color-base,#eaecf0);background-color:#301702}}</style><table role="presentation" class="numblk" style="margin-left: 1.6em;"><tbody><tr><td class="nowrap"><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle P(A')={\frac {365}{365}}\times {\frac {364}{365}}\times {\frac {363}{365}}\times {\frac {362}{365}}\times \cdots \times {\frac {343}{365}}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>P</mi> <mo stretchy="false">(</mo> <msup> <mi>A</mi> <mo>&#x2032;</mo> </msup> <mo stretchy="false">)</mo> <mo>=</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mn>365</mn> <mn>365</mn> </mfrac> </mrow> <mo>&#xd7;<!-- × --></mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mn>364</mn> <mn>365</mn> </mfrac> </mrow> <mo>&#xd7;<!-- × --></mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mn>363</mn> <mn>365</mn> </mfrac> </mrow> <mo>&#xd7;<!-- × --></mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mn>362</mn> <mn>365</mn> </mfrac> </mrow> <mo>&#xd7;<!-- × --></mo> <mo>&#x22ef;<!-- ⋯ --></mo> <mo>&#xd7;<!-- × --></mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mn>343</mn> <mn>365</mn> </mfrac> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle P(A')={\frac {365}{365}}\times {\frac {364}{365}}\times {\frac {363}{365}}\times {\frac {362}{365}}\times \cdots \times {\frac {343}{365}}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/61ae67e88c81cf0e5a104ad945899c61f4ab9fe5" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.838ex; width:47.624ex; height:5.176ex;" alt="{\displaystyle P(A&#39;)={\frac {365}{365}}\times {\frac {364}{365}}\times {\frac {363}{365}}\times {\frac {362}{365}}\times \cdots \times {\frac {343}{365}}}" /></span></td> <td></td> <td class="nowrap"><span id="math_1" class="reference nourlexpansion" style="font-weight:bold;">1</span></td></tr></tbody></table> <p>The terms of equation (<b><a href="#math_1">1</a></b>) can be collected to arrive at: </p> <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1266403038" /><table role="presentation" class="numblk" style="margin-left: 1.6em;"><tbody><tr><td class="nowrap"><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle P(A')=\left({\frac {1}{365}}\right)^{23}\times (365\times 364\times 363\times \cdots \times 343)}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>P</mi> <mo stretchy="false">(</mo> <msup> <mi>A</mi> <mo>&#x2032;</mo> </msup> <mo stretchy="false">)</mo> <mo>=</mo> <msup> <mrow> <mo>(</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mn>1</mn> <mn>365</mn> </mfrac> </mrow> <mo>)</mo> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>23</mn> </mrow> </msup> <mo>&#xd7;<!-- × --></mo> <mo stretchy="false">(</mo> <mn>365</mn> <mo>&#xd7;<!-- × --></mo> <mn>364</mn> <mo>&#xd7;<!-- × --></mo> <mn>363</mn> <mo>&#xd7;<!-- × --></mo> <mo>&#x22ef;<!-- ⋯ --></mo> <mo>&#xd7;<!-- × --></mo> <mn>343</mn> <mo stretchy="false">)</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle P(A')=\left({\frac {1}{365}}\right)^{23}\times (365\times 364\times 363\times \cdots \times 343)}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/ede5fde44fedfe898408c1e2e8192d903eb5c423" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -2.505ex; width:51.386ex; height:6.509ex;" alt="{\displaystyle P(A&#39;)=\left({\frac {1}{365}}\right)^{23}\times (365\times 364\times 363\times \cdots \times 343)}" /></span></td> <td></td> <td class="nowrap"><span id="math_2" class="reference nourlexpansion" style="font-weight:bold;">2</span></td></tr></tbody></table> <p>Evaluating equation (<b><a href="#math_2">2</a></b>) gives <span class="texhtml"><i>P</i>(<i>A</i>′) ≈ 0.492703</span> </p><p>Therefore, <span class="texhtml"><i>P</i>(<i>B</i>) ≈ 1 − 0.492703 = 0.507297</span>&#160;(50.7297%). </p><p>This process can be generalized to a group of <span class="texhtml mvar" style="font-style:italic;">n</span> people, where <span class="texhtml"><i>p</i>(<i>n</i>)</span> is the probability of at least two of the <span class="texhtml mvar" style="font-style:italic;">n</span> people sharing a birthday. It is easier to first calculate the probability <span class="texhtml"><i><span style="text-decoration:overline;">p</span></i>(<i>n</i>)</span> that all <span class="texhtml mvar" style="font-style:italic;">n</span> birthdays are <i>different</i>. According to the <a href="/wiki/Pigeonhole_principle" title="Pigeonhole principle">pigeonhole principle</a>, <span class="texhtml"><i><span style="text-decoration:overline;">p</span></i>(<i>n</i>)</span> is zero when <span class="texhtml"><i>n</i> &gt; 365</span>. When <span class="texhtml"><i>n</i>&#160;≤&#160;365</span>: </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\begin{aligned}{\bar {p}}(n)&amp;=1\times \left(1-{\frac {1}{365}}\right)\times \left(1-{\frac {2}{365}}\right)\times \cdots \times \left(1-{\frac {n-1}{365}}\right)\\[6pt]&amp;={\frac {365\times 364\times \cdots \times (365-n+1)}{365^{n}}}\\[6pt]&amp;={\frac {365!}{365^{n}(365-n)!}}={\frac {n!\cdot {\binom {365}{n}}}{365^{n}}}={\frac {_{365}P_{n}}{365^{n}}}\end{aligned}}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow class="MJX-TeXAtom-ORD"> <mtable columnalign="right left right left right left right left right left right left" rowspacing="0.9em 0.9em 0.3em" columnspacing="0em 2em 0em 2em 0em 2em 0em 2em 0em 2em 0em" displaystyle="true"> <mtr> <mtd> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-ORD"> <mover> <mi>p</mi> <mo stretchy="false">&#xaf;<!-- ¯ --></mo> </mover> </mrow> </mrow> <mo stretchy="false">(</mo> <mi>n</mi> <mo stretchy="false">)</mo> </mtd> <mtd> <mi></mi> <mo>=</mo> <mn>1</mn> <mo>&#xd7;<!-- × --></mo> <mrow> <mo>(</mo> <mrow> <mn>1</mn> <mo>&#x2212;<!-- − --></mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mn>1</mn> <mn>365</mn> </mfrac> </mrow> </mrow> <mo>)</mo> </mrow> <mo>&#xd7;<!-- × --></mo> <mrow> <mo>(</mo> <mrow> <mn>1</mn> <mo>&#x2212;<!-- − --></mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mn>2</mn> <mn>365</mn> </mfrac> </mrow> </mrow> <mo>)</mo> </mrow> <mo>&#xd7;<!-- × --></mo> <mo>&#x22ef;<!-- ⋯ --></mo> <mo>&#xd7;<!-- × --></mo> <mrow> <mo>(</mo> <mrow> <mn>1</mn> <mo>&#x2212;<!-- − --></mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <mi>n</mi> <mo>&#x2212;<!-- − --></mo> <mn>1</mn> </mrow> <mn>365</mn> </mfrac> </mrow> </mrow> <mo>)</mo> </mrow> </mtd> </mtr> <mtr> <mtd></mtd> <mtd> <mi></mi> <mo>=</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <mn>365</mn> <mo>&#xd7;<!-- × --></mo> <mn>364</mn> <mo>&#xd7;<!-- × --></mo> <mo>&#x22ef;<!-- ⋯ --></mo> <mo>&#xd7;<!-- × --></mo> <mo stretchy="false">(</mo> <mn>365</mn> <mo>&#x2212;<!-- − --></mo> <mi>n</mi> <mo>+</mo> <mn>1</mn> <mo stretchy="false">)</mo> </mrow> <msup> <mn>365</mn> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> </mrow> </msup> </mfrac> </mrow> </mtd> </mtr> <mtr> <mtd></mtd> <mtd> <mi></mi> <mo>=</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <mn>365</mn> <mo>!</mo> </mrow> <mrow> <msup> <mn>365</mn> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> </mrow> </msup> <mo stretchy="false">(</mo> <mn>365</mn> <mo>&#x2212;<!-- − --></mo> <mi>n</mi> <mo stretchy="false">)</mo> <mo>!</mo> </mrow> </mfrac> </mrow> <mo>=</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <mi>n</mi> <mo>!</mo> <mo>&#x22c5;<!-- ⋅ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mrow> <mrow class="MJX-TeXAtom-OPEN"> <mo maxsize="1.2em" minsize="1.2em">(</mo> </mrow> <mfrac linethickness="0"> <mn>365</mn> <mi>n</mi> </mfrac> <mrow class="MJX-TeXAtom-CLOSE"> <mo maxsize="1.2em" minsize="1.2em">)</mo> </mrow> </mrow> </mrow> </mrow> <msup> <mn>365</mn> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> </mrow> </msup> </mfrac> </mrow> <mo>=</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <msub> <mi></mi> <mrow class="MJX-TeXAtom-ORD"> <mn>365</mn> </mrow> </msub> <msub> <mi>P</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> </mrow> </msub> </mrow> <msup> <mn>365</mn> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> </mrow> </msup> </mfrac> </mrow> </mtd> </mtr> </mtable> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle {\begin{aligned}{\bar {p}}(n)&amp;=1\times \left(1-{\frac {1}{365}}\right)\times \left(1-{\frac {2}{365}}\right)\times \cdots \times \left(1-{\frac {n-1}{365}}\right)\\[6pt]&amp;={\frac {365\times 364\times \cdots \times (365-n+1)}{365^{n}}}\\[6pt]&amp;={\frac {365!}{365^{n}(365-n)!}}={\frac {n!\cdot {\binom {365}{n}}}{365^{n}}}={\frac {_{365}P_{n}}{365^{n}}}\end{aligned}}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/97247979ca9c9ce1de6ae233eb2ad1f1bca4ea22" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -10.505ex; width:60.813ex; height:22.176ex;" alt="{\displaystyle {\begin{aligned}{\bar {p}}(n)&amp;=1\times \left(1-{\frac {1}{365}}\right)\times \left(1-{\frac {2}{365}}\right)\times \cdots \times \left(1-{\frac {n-1}{365}}\right)\\[6pt]&amp;={\frac {365\times 364\times \cdots \times (365-n+1)}{365^{n}}}\\[6pt]&amp;={\frac {365!}{365^{n}(365-n)!}}={\frac {n!\cdot {\binom {365}{n}}}{365^{n}}}={\frac {_{365}P_{n}}{365^{n}}}\end{aligned}}}" /></span></dd></dl> <p>where <span class="texhtml">!</span> is the <a href="/wiki/Factorial" title="Factorial">factorial</a> operator, <span class="texhtml"><span style="font-size:160%;">(</span><span class="nowrap" style="padding-left:0.1em; padding-right:0.1em;"><span class="nowrap"><span style="display:inline-block;margin-bottom:-0.3em;vertical-align:-0.4em;line-height:1.2em;font-size:80%;text-align:center"><sup style="font-size:inherit;line-height:inherit;vertical-align:baseline">365</sup><br /><sub style="font-size:inherit;line-height:inherit;vertical-align:baseline"><i>n</i></sub></span></span></span><span style="font-size:160%;">)</span></span> is the <a href="/wiki/Binomial_coefficient" title="Binomial coefficient">binomial coefficient</a> and <span class="texhtml"><i><sub>k</sub>P<sub>r</sub></i></span> denotes <a href="/wiki/Permutation" title="Permutation">permutation</a>. </p><p>The equation expresses the fact that the first person has no one to share a birthday, the second person cannot have the same birthday as the first <span class="texhtml"><span style="font-size:160%;">(</span><span class="nowrap" style="padding-left:0.1em; padding-right:0.1em;"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035" /><span class="sfrac">&#8288;<span class="tion"><span class="num">364</span><span class="sr-only">/</span><span class="den">365</span></span>&#8288;</span></span><span style="font-size:160%;">)</span></span>, the third cannot have the same birthday as either of the first two <span class="texhtml"><span style="font-size:160%;">(</span><span class="nowrap" style="padding-left:0.1em; padding-right:0.1em;"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035" /><span class="sfrac">&#8288;<span class="tion"><span class="num">363</span><span class="sr-only">/</span><span class="den">365</span></span>&#8288;</span></span><span style="font-size:160%;">)</span></span>, and in general the <span class="texhtml mvar" style="font-style:italic;">n</span>th birthday cannot be the same as any of the <span class="texhtml"><i>n</i> − 1</span> preceding birthdays. </p><p>The <a href="/wiki/Event_(probability_theory)" title="Event (probability theory)">event</a> of at least two of the <span class="texhtml mvar" style="font-style:italic;">n</span> persons having the same birthday is <a href="/wiki/Complementary_event" title="Complementary event">complementary</a> to all <span class="texhtml mvar" style="font-style:italic;">n</span> birthdays being different. Therefore, its probability <span class="texhtml"><i>p</i>(<i>n</i>)</span> is </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle p(n)=1-{\bar {p}}(n).}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>p</mi> <mo stretchy="false">(</mo> <mi>n</mi> <mo stretchy="false">)</mo> <mo>=</mo> <mn>1</mn> <mo>&#x2212;<!-- − --></mo> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-ORD"> <mover> <mi>p</mi> <mo stretchy="false">&#xaf;<!-- ¯ --></mo> </mover> </mrow> </mrow> <mo stretchy="false">(</mo> <mi>n</mi> <mo stretchy="false">)</mo> <mo>.</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle p(n)=1-{\bar {p}}(n).}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/0c780c6ec48309bcdc9df716561ea7b4083bd25c" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; margin-left: -0.089ex; width:16.774ex; height:2.843ex;" alt="{\displaystyle p(n)=1-{\bar {p}}(n).}" /></span></dd></dl> <p>The following table shows the probability for some other values of <span class="texhtml mvar" style="font-style:italic;">n</span> (for this table, the existence of leap years is ignored, and each birthday is assumed to be equally likely): </p> <figure class="mw-default-size mw-halign-right" typeof="mw:File/Thumb"><a href="/wiki/File:Birthdaymatch.svg" class="mw-file-description"><img src="//upload.wikimedia.org/wikipedia/commons/thumb/0/06/Birthdaymatch.svg/330px-Birthdaymatch.svg.png" decoding="async" width="310" height="233" class="mw-file-element" srcset="//upload.wikimedia.org/wikipedia/commons/thumb/0/06/Birthdaymatch.svg/500px-Birthdaymatch.svg.png 1.5x, //upload.wikimedia.org/wikipedia/commons/thumb/0/06/Birthdaymatch.svg/620px-Birthdaymatch.svg.png 2x" data-file-width="720" data-file-height="540" /></a><figcaption>The probability that no two people share a birthday in a group of <span class="texhtml mvar" style="font-style:italic;">n</span> people. Note that the vertical scale is logarithmic (each step down is 10<sup>20</sup> times less likely).</figcaption></figure> <dl><dd><table class="wikitable"> <tbody><tr> <th><span class="texhtml mvar" style="font-style:italic;">n</span></th> <th><span class="texhtml"><i>p</i>(<i>n</i>)</span> </th></tr> <tr> <td align="right">1</td> <td><span aria-hidden="true" style="visibility:hidden;color:transparent;">0</span>0.0% </td></tr> <tr> <td align="right">5</td> <td><span aria-hidden="true" style="visibility:hidden;color:transparent;">0</span>2.7% </td></tr> <tr> <td align="right">10</td> <td>11.7% </td></tr> <tr> <td align="right">20</td> <td>41.1% </td></tr> <tr> <td align="right">23</td> <td>50.7% </td></tr> <tr> <td align="right">30</td> <td>70.6% </td></tr> <tr> <td align="right">40</td> <td>89.1% </td></tr> <tr> <td align="right">50</td> <td>97.0% </td></tr> <tr> <td align="right">60</td> <td>99.4% </td></tr> <tr> <td align="right">70</td> <td>99.9% </td></tr> <tr> <td align="right">75</td> <td>99.97% </td></tr> <tr> <td align="right">100</td> <td><span class="nowrap"><span data-sort-value="7001999999700000000♠"></span>99.999<span style="margin-left:.25em;">97</span></span>% </td></tr> <tr> <td align="right">200</td> <td><span class="nowrap"><span data-sort-value="7002100000000000000♠"></span>99.999<span style="margin-left:.25em;">999</span><span style="margin-left:.25em;">999</span><span style="margin-left:.25em;">999</span><span style="margin-left:.25em;">999</span><span style="margin-left:.25em;">999</span><span style="margin-left:.25em;">999</span><span style="margin-left:.25em;">999</span><span style="margin-left:.25em;">9998</span></span>% </td></tr> <tr> <td align="right">300</td> <td>(100 − <span class="nowrap"><span data-sort-value="6920600000000000000♠"></span>6<span style="margin-left:0.25em;margin-right:0.15em;">×</span>10<sup>−80</sup></span>)% </td></tr> <tr> <td align="right">350</td> <td>(100 − <span class="nowrap"><span data-sort-value="6871300000000000000♠"></span>3<span style="margin-left:0.25em;margin-right:0.15em;">×</span>10<sup>−129</sup></span>)% </td></tr> <tr> <td align="right">365</td> <td>(100 − <span class="nowrap"><span data-sort-value="6845145000000000000♠"></span>1.45<span style="margin-left:0.25em;margin-right:0.15em;">×</span>10<sup>−155</sup></span>)% </td></tr> <tr> <td align="right">≥ 366</td> <td>100% </td></tr></tbody></table></dd></dl> <div class="mw-heading mw-heading2"><h2 id="Approximations">Approximations</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Birthday_problem&amp;action=edit&amp;section=2" title="Edit section: Approximations"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <figure class="mw-default-size mw-halign-right" typeof="mw:File/Thumb"><a href="/wiki/File:Birthday_paradox_probability.svg" class="mw-file-description"><img src="//upload.wikimedia.org/wikipedia/commons/thumb/c/ca/Birthday_paradox_probability.svg/310px-Birthday_paradox_probability.svg.png" decoding="async" width="310" height="233" class="mw-file-element" srcset="//upload.wikimedia.org/wikipedia/commons/thumb/c/ca/Birthday_paradox_probability.svg/465px-Birthday_paradox_probability.svg.png 1.5x, //upload.wikimedia.org/wikipedia/commons/thumb/c/ca/Birthday_paradox_probability.svg/620px-Birthday_paradox_probability.svg.png 2x" data-file-width="720" data-file-height="540" /></a><figcaption>Graphs showing the approximate probabilities of at least two people sharing a birthday (<style data-mw-deduplicate="TemplateStyles:r1239334494">@media screen{html.skin-theme-clientpref-night .mw-parser-output div:not(.notheme)>.tmp-color,html.skin-theme-clientpref-night .mw-parser-output p>.tmp-color,html.skin-theme-clientpref-night .mw-parser-output table:not(.notheme) .tmp-color{color:inherit!important}}@media screen and (prefers-color-scheme:dark){html.skin-theme-clientpref-os .mw-parser-output div:not(.notheme)>.tmp-color,html.skin-theme-clientpref-os .mw-parser-output p>.tmp-color,html.skin-theme-clientpref-os .mw-parser-output table:not(.notheme) .tmp-color{color:inherit!important}}</style><span class="tmp-color" style="color:red">red</span>) and its complementary event (<link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1239334494" /><span class="tmp-color" style="color:blue">blue</span>)</figcaption></figure> <figure class="mw-default-size mw-halign-right" typeof="mw:File/Thumb"><a href="/wiki/File:Birthday_paradox_approximation.svg" class="mw-file-description"><img src="//upload.wikimedia.org/wikipedia/commons/thumb/9/9f/Birthday_paradox_approximation.svg/310px-Birthday_paradox_approximation.svg.png" decoding="async" width="310" height="194" class="mw-file-element" srcset="//upload.wikimedia.org/wikipedia/commons/thumb/9/9f/Birthday_paradox_approximation.svg/465px-Birthday_paradox_approximation.svg.png 1.5x, //upload.wikimedia.org/wikipedia/commons/thumb/9/9f/Birthday_paradox_approximation.svg/620px-Birthday_paradox_approximation.svg.png 2x" data-file-width="720" data-file-height="450" /></a><figcaption>A graph showing the accuracy of the approximation 1 − <i>e</i><sup>−<i>n</i><sup>2</sup>/730</sup> (<link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1239334494" /><span class="tmp-color" style="color:red">red</span>)</figcaption></figure> <p>The <a href="/wiki/Taylor_series" title="Taylor series">Taylor series</a> expansion of the <a href="/wiki/Exponential_function" title="Exponential function">exponential function</a> (the constant <span class="texhtml"><i>e</i> ≈ <span class="nowrap"><span data-sort-value="7000271828182800000♠"></span>2.718<span style="margin-left:.25em;">281</span><span style="margin-left:.25em;">828</span></span></span>) </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle e^{x}=1+x+{\frac {x^{2}}{2!}}+\cdots }"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msup> <mi>e</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>x</mi> </mrow> </msup> <mo>=</mo> <mn>1</mn> <mo>+</mo> <mi>x</mi> <mo>+</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <msup> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msup> <mrow> <mn>2</mn> <mo>!</mo> </mrow> </mfrac> </mrow> <mo>+</mo> <mo>&#x22ef;<!-- ⋯ --></mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle e^{x}=1+x+{\frac {x^{2}}{2!}}+\cdots }</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/4f67772264ca200424ea0f2f4270c7ecb31fba0e" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -2.005ex; width:22.311ex; height:5.843ex;" alt="{\displaystyle e^{x}=1+x+{\frac {x^{2}}{2!}}+\cdots }" /></span></dd></dl> <p>provides a first-order approximation for <span class="texhtml"><i>e</i><sup><i>x</i></sup></span> for <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle |x|\ll 1}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow class="MJX-TeXAtom-ORD"> <mo stretchy="false">|</mo> </mrow> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mo stretchy="false">|</mo> </mrow> <mo>&#x226a;<!-- ≪ --></mo> <mn>1</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle |x|\ll 1}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/7a561c2bcbb4c28e95f1ae14e0d11bfd9e2defea" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:7.4ex; height:2.843ex;" alt="{\displaystyle |x|\ll 1}" /></span>: </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle e^{x}\approx 1+x.}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msup> <mi>e</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>x</mi> </mrow> </msup> <mo>&#x2248;<!-- ≈ --></mo> <mn>1</mn> <mo>+</mo> <mi>x</mi> <mo>.</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle e^{x}\approx 1+x.}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/92fda2fe0341e81c735ec8f237647f4c5dd7e918" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.505ex; width:11.334ex; height:2.509ex;" alt="{\displaystyle e^{x}\approx 1+x.}" /></span></dd></dl> <p>To apply this approximation to the first expression derived for <span class="texhtml"><i><span style="text-decoration:overline;">p</span></i>(<i>n</i>)</span>, set <span class="texhtml"><i>x</i> = −<link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035" /><span class="sfrac">&#8288;<span class="tion"><span class="num"><i>a</i></span><span class="sr-only">/</span><span class="den">365</span></span>&#8288;</span></span>. Thus, </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle e^{-a/365}\approx 1-{\frac {a}{365}}.}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msup> <mi>e</mi> <mrow class="MJX-TeXAtom-ORD"> <mo>&#x2212;<!-- − --></mo> <mi>a</mi> <mrow class="MJX-TeXAtom-ORD"> <mo>/</mo> </mrow> <mn>365</mn> </mrow> </msup> <mo>&#x2248;<!-- ≈ --></mo> <mn>1</mn> <mo>&#x2212;<!-- − --></mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mi>a</mi> <mn>365</mn> </mfrac> </mrow> <mo>.</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle e^{-a/365}\approx 1-{\frac {a}{365}}.}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/e9e0ea74e03d760c748a9d866edf8433e5e784ac" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.838ex; width:18.823ex; height:4.676ex;" alt="{\displaystyle e^{-a/365}\approx 1-{\frac {a}{365}}.}" /></span></dd></dl> <p>Then, replace <span class="texhtml mvar" style="font-style:italic;">a</span> with non-negative integers for each term in the formula of <span class="texhtml"><i><span style="text-decoration:overline;">p</span></i>(<i>n</i>)</span> until <span class="texhtml"><i>a</i> = <i>n</i> − 1</span>, for example, when <span class="texhtml"><i>a</i> = 1</span>, </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle e^{-1/365}\approx 1-{\frac {1}{365}}.}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msup> <mi>e</mi> <mrow class="MJX-TeXAtom-ORD"> <mo>&#x2212;<!-- − --></mo> <mn>1</mn> <mrow class="MJX-TeXAtom-ORD"> <mo>/</mo> </mrow> <mn>365</mn> </mrow> </msup> <mo>&#x2248;<!-- ≈ --></mo> <mn>1</mn> <mo>&#x2212;<!-- − --></mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mn>1</mn> <mn>365</mn> </mfrac> </mrow> <mo>.</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle e^{-1/365}\approx 1-{\frac {1}{365}}.}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/1ea599c104d81192e4a969ae87ebe9652452a1db" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.838ex; width:18.776ex; height:5.176ex;" alt="{\displaystyle e^{-1/365}\approx 1-{\frac {1}{365}}.}" /></span></dd></dl> <p>The first expression derived for <span class="texhtml"><i><span style="text-decoration:overline;">p</span></i>(<i>n</i>)</span> can be approximated as </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\begin{aligned}{\bar {p}}(n)&amp;\approx 1\cdot e^{-1/365}\cdot e^{-2/365}\cdots e^{-(n-1)/365}\\[6pt]&amp;=e^{-{\big (}1+2+\,\cdots \,+(n-1){\big )}/365}\\[6pt]&amp;=e^{-{\frac {n(n-1)/2}{365}}}=e^{-{\frac {n(n-1)}{730}}}.\end{aligned}}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow class="MJX-TeXAtom-ORD"> <mtable columnalign="right left right left right left right left right left right left" rowspacing="0.9em 0.9em 0.3em" columnspacing="0em 2em 0em 2em 0em 2em 0em 2em 0em 2em 0em" displaystyle="true"> <mtr> <mtd> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-ORD"> <mover> <mi>p</mi> <mo stretchy="false">&#xaf;<!-- ¯ --></mo> </mover> </mrow> </mrow> <mo stretchy="false">(</mo> <mi>n</mi> <mo stretchy="false">)</mo> </mtd> <mtd> <mi></mi> <mo>&#x2248;<!-- ≈ --></mo> <mn>1</mn> <mo>&#x22c5;<!-- ⋅ --></mo> <msup> <mi>e</mi> <mrow class="MJX-TeXAtom-ORD"> <mo>&#x2212;<!-- − --></mo> <mn>1</mn> <mrow class="MJX-TeXAtom-ORD"> <mo>/</mo> </mrow> <mn>365</mn> </mrow> </msup> <mo>&#x22c5;<!-- ⋅ --></mo> <msup> <mi>e</mi> <mrow class="MJX-TeXAtom-ORD"> <mo>&#x2212;<!-- − --></mo> <mn>2</mn> <mrow class="MJX-TeXAtom-ORD"> <mo>/</mo> </mrow> <mn>365</mn> </mrow> </msup> <mo>&#x22ef;<!-- ⋯ --></mo> <msup> <mi>e</mi> <mrow class="MJX-TeXAtom-ORD"> <mo>&#x2212;<!-- − --></mo> <mo stretchy="false">(</mo> <mi>n</mi> <mo>&#x2212;<!-- − --></mo> <mn>1</mn> <mo stretchy="false">)</mo> <mrow class="MJX-TeXAtom-ORD"> <mo>/</mo> </mrow> <mn>365</mn> </mrow> </msup> </mtd> </mtr> <mtr> <mtd></mtd> <mtd> <mi></mi> <mo>=</mo> <msup> <mi>e</mi> <mrow class="MJX-TeXAtom-ORD"> <mo>&#x2212;<!-- − --></mo> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-ORD"> <mo maxsize="1.2em" minsize="1.2em">(</mo> </mrow> </mrow> <mn>1</mn> <mo>+</mo> <mn>2</mn> <mo>+</mo> <mspace width="thinmathspace"></mspace> <mo>&#x22ef;<!-- ⋯ --></mo> <mspace width="thinmathspace"></mspace> <mo>+</mo> <mo stretchy="false">(</mo> <mi>n</mi> <mo>&#x2212;<!-- − --></mo> <mn>1</mn> <mo stretchy="false">)</mo> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-ORD"> <mo maxsize="1.2em" minsize="1.2em">)</mo> </mrow> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mo>/</mo> </mrow> <mn>365</mn> </mrow> </msup> </mtd> </mtr> <mtr> <mtd></mtd> <mtd> <mi></mi> <mo>=</mo> <msup> <mi>e</mi> <mrow class="MJX-TeXAtom-ORD"> <mo>&#x2212;<!-- − --></mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <mi>n</mi> <mo stretchy="false">(</mo> <mi>n</mi> <mo>&#x2212;<!-- − --></mo> <mn>1</mn> <mo stretchy="false">)</mo> <mrow class="MJX-TeXAtom-ORD"> <mo>/</mo> </mrow> <mn>2</mn> </mrow> <mn>365</mn> </mfrac> </mrow> </mrow> </msup> <mo>=</mo> <msup> <mi>e</mi> <mrow class="MJX-TeXAtom-ORD"> <mo>&#x2212;<!-- − --></mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <mi>n</mi> <mo stretchy="false">(</mo> <mi>n</mi> <mo>&#x2212;<!-- − --></mo> <mn>1</mn> <mo stretchy="false">)</mo> </mrow> <mn>730</mn> </mfrac> </mrow> </mrow> </msup> <mo>.</mo> </mtd> </mtr> </mtable> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle {\begin{aligned}{\bar {p}}(n)&amp;\approx 1\cdot e^{-1/365}\cdot e^{-2/365}\cdots e^{-(n-1)/365}\\[6pt]&amp;=e^{-{\big (}1+2+\,\cdots \,+(n-1){\big )}/365}\\[6pt]&amp;=e^{-{\frac {n(n-1)/2}{365}}}=e^{-{\frac {n(n-1)}{730}}}.\end{aligned}}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/aa500cfaaebf468593f2fda0474696de149c5ec6" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -7.005ex; width:40.088ex; height:15.176ex;" alt="{\displaystyle {\begin{aligned}{\bar {p}}(n)&amp;\approx 1\cdot e^{-1/365}\cdot e^{-2/365}\cdots e^{-(n-1)/365}\\[6pt]&amp;=e^{-{\big (}1+2+\,\cdots \,+(n-1){\big )}/365}\\[6pt]&amp;=e^{-{\frac {n(n-1)/2}{365}}}=e^{-{\frac {n(n-1)}{730}}}.\end{aligned}}}" /></span></dd></dl> <p>Therefore, </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle p(n)=1-{\bar {p}}(n)\approx 1-e^{-{\frac {n(n-1)}{730}}}.}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>p</mi> <mo stretchy="false">(</mo> <mi>n</mi> <mo stretchy="false">)</mo> <mo>=</mo> <mn>1</mn> <mo>&#x2212;<!-- − --></mo> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-ORD"> <mover> <mi>p</mi> <mo stretchy="false">&#xaf;<!-- ¯ --></mo> </mover> </mrow> </mrow> <mo stretchy="false">(</mo> <mi>n</mi> <mo stretchy="false">)</mo> <mo>&#x2248;<!-- ≈ --></mo> <mn>1</mn> <mo>&#x2212;<!-- − --></mo> <msup> <mi>e</mi> <mrow class="MJX-TeXAtom-ORD"> <mo>&#x2212;<!-- − --></mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <mi>n</mi> <mo stretchy="false">(</mo> <mi>n</mi> <mo>&#x2212;<!-- − --></mo> <mn>1</mn> <mo stretchy="false">)</mo> </mrow> <mn>730</mn> </mfrac> </mrow> </mrow> </msup> <mo>.</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle p(n)=1-{\bar {p}}(n)\approx 1-e^{-{\frac {n(n-1)}{730}}}.}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/3c2034c62a15b5242af1f417813646cc3bd5fcb7" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; margin-left: -0.089ex; width:31.652ex; height:4.509ex;" alt="{\displaystyle p(n)=1-{\bar {p}}(n)\approx 1-e^{-{\frac {n(n-1)}{730}}}.}" /></span></dd></dl> <p>An even coarser approximation is given by </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle p(n)\approx 1-e^{-{\frac {n^{2}}{730}}},}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>p</mi> <mo stretchy="false">(</mo> <mi>n</mi> <mo stretchy="false">)</mo> <mo>&#x2248;<!-- ≈ --></mo> <mn>1</mn> <mo>&#x2212;<!-- − --></mo> <msup> <mi>e</mi> <mrow class="MJX-TeXAtom-ORD"> <mo>&#x2212;<!-- − --></mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <msup> <mi>n</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msup> <mn>730</mn> </mfrac> </mrow> </mrow> </msup> <mo>,</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle p(n)\approx 1-e^{-{\frac {n^{2}}{730}}},}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/e55868abdecc541d6bb9befefa3b711cd9009d13" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; margin-left: -0.089ex; width:17.643ex; height:4.509ex;" alt="{\displaystyle p(n)\approx 1-e^{-{\frac {n^{2}}{730}}},}" /></span></dd></dl> <p>which, as the graph illustrates, is still fairly accurate. </p><p>According to the approximation, the same approach can be applied to any number of "people" and "days". If rather than 365 days there are <span class="texhtml mvar" style="font-style:italic;">d</span>, if there are <span class="texhtml mvar" style="font-style:italic;">n</span> persons, and if <span class="texhtml"><i>n</i> ≪ <i>d</i></span>, then using the same approach as above we achieve the result that if <span class="texhtml"><i>p</i>(<i>n</i>, <i>d</i>)</span> is the probability that at least two out of <span class="texhtml mvar" style="font-style:italic;">n</span> people share the same birthday from a set of <span class="texhtml mvar" style="font-style:italic;">d</span> available days, then: </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\begin{aligned}p(n,d)&amp;\approx 1-e^{-{\frac {n(n-1)}{2d}}}\\[6pt]&amp;\approx 1-e^{-{\frac {n^{2}}{2d}}}.\end{aligned}}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow class="MJX-TeXAtom-ORD"> <mtable columnalign="right left right left right left right left right left right left" rowspacing="0.9em 0.3em" columnspacing="0em 2em 0em 2em 0em 2em 0em 2em 0em 2em 0em" displaystyle="true"> <mtr> <mtd> <mi>p</mi> <mo stretchy="false">(</mo> <mi>n</mi> <mo>,</mo> <mi>d</mi> <mo stretchy="false">)</mo> </mtd> <mtd> <mi></mi> <mo>&#x2248;<!-- ≈ --></mo> <mn>1</mn> <mo>&#x2212;<!-- − --></mo> <msup> <mi>e</mi> <mrow class="MJX-TeXAtom-ORD"> <mo>&#x2212;<!-- − --></mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <mi>n</mi> <mo stretchy="false">(</mo> <mi>n</mi> <mo>&#x2212;<!-- − --></mo> <mn>1</mn> <mo stretchy="false">)</mo> </mrow> <mrow> <mn>2</mn> <mi>d</mi> </mrow> </mfrac> </mrow> </mrow> </msup> </mtd> </mtr> <mtr> <mtd></mtd> <mtd> <mi></mi> <mo>&#x2248;<!-- ≈ --></mo> <mn>1</mn> <mo>&#x2212;<!-- − --></mo> <msup> <mi>e</mi> <mrow class="MJX-TeXAtom-ORD"> <mo>&#x2212;<!-- − --></mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <msup> <mi>n</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msup> <mrow> <mn>2</mn> <mi>d</mi> </mrow> </mfrac> </mrow> </mrow> </msup> <mo>.</mo> </mtd> </mtr> </mtable> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle {\begin{aligned}p(n,d)&amp;\approx 1-e^{-{\frac {n(n-1)}{2d}}}\\[6pt]&amp;\approx 1-e^{-{\frac {n^{2}}{2d}}}.\end{aligned}}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/3ff46256637894d0250baba3169b2dffd07abf2b" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -4.671ex; width:22.252ex; height:10.509ex;" alt="{\displaystyle {\begin{aligned}p(n,d)&amp;\approx 1-e^{-{\frac {n(n-1)}{2d}}}\\[6pt]&amp;\approx 1-e^{-{\frac {n^{2}}{2d}}}.\end{aligned}}}" /></span></dd></dl> <div class="mw-heading mw-heading3"><h3 id="Simple_exponentiation">Simple exponentiation</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Birthday_problem&amp;action=edit&amp;section=3" title="Edit section: Simple exponentiation"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>The probability of any two people not having the same birthday is <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035" /><span class="sfrac">&#8288;<span class="tion"><span class="num">364</span><span class="sr-only">/</span><span class="den">365</span></span>&#8288;</span>. In a room containing <i>n</i> people, there are <span class="texhtml"><span style="font-size:150%;">(</span><span class="nowrap" style="padding-left:0.1em; padding-right:0.1em;"><span class="nowrap"><span style="display:inline-block;margin-bottom:-0.3em;vertical-align:-0.4em;line-height:1.2em;font-size:80%;text-align:center"><sup style="font-size:inherit;line-height:inherit;vertical-align:baseline"><i>n</i></sup><br /><sub style="font-size:inherit;line-height:inherit;vertical-align:baseline">2</sub></span></span></span><span style="font-size:150%;">)</span> = <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035" /><span class="sfrac">&#8288;<span class="tion"><span class="num"><i>n</i>(<i>n</i> − 1)</span><span class="sr-only">/</span><span class="den">2</span></span>&#8288;</span></span> pairs of people, i.e. <span class="texhtml"><span style="font-size:150%;">(</span><span class="nowrap" style="padding-left:0.1em; padding-right:0.1em;"><span class="nowrap"><span style="display:inline-block;margin-bottom:-0.3em;vertical-align:-0.4em;line-height:1.2em;font-size:80%;text-align:center"><sup style="font-size:inherit;line-height:inherit;vertical-align:baseline"><i>n</i></sup><br /><sub style="font-size:inherit;line-height:inherit;vertical-align:baseline">2</sub></span></span></span><span style="font-size:150%;">)</span></span> events. The probability of no two people sharing the same birthday can be approximated by assuming that these events are independent and hence by multiplying their probability together. Being independent would be equivalent to picking <a href="/wiki/Sampling_(statistics)#Replacement_of_selected_units" title="Sampling (statistics)">with replacement</a>, any pair of people in the world, not just in a room. In short <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035" /><span class="sfrac">&#8288;<span class="tion"><span class="num">364</span><span class="sr-only">/</span><span class="den">365</span></span>&#8288;</span> can be multiplied by itself <span class="texhtml"><span style="font-size:150%;">(</span><span class="nowrap" style="padding-left:0.1em; padding-right:0.1em;"><span class="nowrap"><span style="display:inline-block;margin-bottom:-0.3em;vertical-align:-0.4em;line-height:1.2em;font-size:80%;text-align:center"><sup style="font-size:inherit;line-height:inherit;vertical-align:baseline"><i>n</i></sup><br /><sub style="font-size:inherit;line-height:inherit;vertical-align:baseline">2</sub></span></span></span><span style="font-size:150%;">)</span></span> times, which gives us </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\bar {p}}(n)\approx \left({\frac {364}{365}}\right)^{\binom {n}{2}}.}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-ORD"> <mover> <mi>p</mi> <mo stretchy="false">&#xaf;<!-- ¯ --></mo> </mover> </mrow> </mrow> <mo stretchy="false">(</mo> <mi>n</mi> <mo stretchy="false">)</mo> <mo>&#x2248;<!-- ≈ --></mo> <msup> <mrow> <mo>(</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mn>364</mn> <mn>365</mn> </mfrac> </mrow> <mo>)</mo> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mrow> <mrow class="MJX-TeXAtom-OPEN"> <mo maxsize="1.2em" minsize="1.2em">(</mo> </mrow> <mfrac linethickness="0"> <mi>n</mi> <mn>2</mn> </mfrac> <mrow class="MJX-TeXAtom-CLOSE"> <mo maxsize="1.2em" minsize="1.2em">)</mo> </mrow> </mrow> </mrow> </msup> <mo>.</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle {\bar {p}}(n)\approx \left({\frac {364}{365}}\right)^{\binom {n}{2}}.}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/10c16ab9f10ff711c817eda177cdc0b73416ea39" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -2.505ex; margin-left: -0.089ex; width:19.138ex; height:7.343ex;" alt="{\displaystyle {\bar {p}}(n)\approx \left({\frac {364}{365}}\right)^{\binom {n}{2}}.}" /></span></dd></dl> <p>Since this is the probability of no one having the same birthday, then the probability of someone sharing a birthday is </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle p(n)\approx 1-\left({\frac {364}{365}}\right)^{\binom {n}{2}}.}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>p</mi> <mo stretchy="false">(</mo> <mi>n</mi> <mo stretchy="false">)</mo> <mo>&#x2248;<!-- ≈ --></mo> <mn>1</mn> <mo>&#x2212;<!-- − --></mo> <msup> <mrow> <mo>(</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mn>364</mn> <mn>365</mn> </mfrac> </mrow> <mo>)</mo> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mrow> <mrow class="MJX-TeXAtom-OPEN"> <mo maxsize="1.2em" minsize="1.2em">(</mo> </mrow> <mfrac linethickness="0"> <mi>n</mi> <mn>2</mn> </mfrac> <mrow class="MJX-TeXAtom-CLOSE"> <mo maxsize="1.2em" minsize="1.2em">)</mo> </mrow> </mrow> </mrow> </msup> <mo>.</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle p(n)\approx 1-\left({\frac {364}{365}}\right)^{\binom {n}{2}}.}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/694bdcfe09974a50f282fa91772fdb18e2d3601f" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -2.505ex; margin-left: -0.089ex; width:22.951ex; height:7.343ex;" alt="{\displaystyle p(n)\approx 1-\left({\frac {364}{365}}\right)^{\binom {n}{2}}.}" /></span></dd></dl> <p>And for the group of 23 people, the probability of sharing is </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle p(23)\approx 1-\left({\frac {364}{365}}\right)^{\binom {23}{2}}=1-\left({\frac {364}{365}}\right)^{253}\approx 0.500477.}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>p</mi> <mo stretchy="false">(</mo> <mn>23</mn> <mo stretchy="false">)</mo> <mo>&#x2248;<!-- ≈ --></mo> <mn>1</mn> <mo>&#x2212;<!-- − --></mo> <msup> <mrow> <mo>(</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mn>364</mn> <mn>365</mn> </mfrac> </mrow> <mo>)</mo> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mrow> <mrow class="MJX-TeXAtom-OPEN"> <mo maxsize="1.2em" minsize="1.2em">(</mo> </mrow> <mfrac linethickness="0"> <mn>23</mn> <mn>2</mn> </mfrac> <mrow class="MJX-TeXAtom-CLOSE"> <mo maxsize="1.2em" minsize="1.2em">)</mo> </mrow> </mrow> </mrow> </msup> <mo>=</mo> <mn>1</mn> <mo>&#x2212;<!-- − --></mo> <msup> <mrow> <mo>(</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mn>364</mn> <mn>365</mn> </mfrac> </mrow> <mo>)</mo> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>253</mn> </mrow> </msup> <mo>&#x2248;<!-- ≈ --></mo> <mn>0.500477.</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle p(23)\approx 1-\left({\frac {364}{365}}\right)^{\binom {23}{2}}=1-\left({\frac {364}{365}}\right)^{253}\approx 0.500477.}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/e1a247e3c8098349b29fc1cdc87e869219dd008b" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -2.505ex; margin-left: -0.089ex; width:53.842ex; height:7.343ex;" alt="{\displaystyle p(23)\approx 1-\left({\frac {364}{365}}\right)^{\binom {23}{2}}=1-\left({\frac {364}{365}}\right)^{253}\approx 0.500477.}" /></span></dd></dl> <div class="mw-heading mw-heading3"><h3 id="Poisson_approximation">Poisson approximation</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Birthday_problem&amp;action=edit&amp;section=4" title="Edit section: Poisson approximation"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Applying the <a href="/wiki/Poisson_distribution" title="Poisson distribution">Poisson</a> approximation for the binomial on the group of 23 people, </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \operatorname {Poi} \left({\frac {\binom {23}{2}}{365}}\right)=\operatorname {Poi} \left({\frac {253}{365}}\right)\approx \operatorname {Poi} (0.6932)}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>Poi</mi> <mo>&#x2061;<!-- ⁡ --></mo> <mrow> <mo>(</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <mrow class="MJX-TeXAtom-OPEN"> <mo maxsize="1.2em" minsize="1.2em">(</mo> </mrow> <mfrac linethickness="0"> <mn>23</mn> <mn>2</mn> </mfrac> <mrow class="MJX-TeXAtom-CLOSE"> <mo maxsize="1.2em" minsize="1.2em">)</mo> </mrow> </mrow> <mn>365</mn> </mfrac> </mrow> <mo>)</mo> </mrow> <mo>=</mo> <mi>Poi</mi> <mo>&#x2061;<!-- ⁡ --></mo> <mrow> <mo>(</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mn>253</mn> <mn>365</mn> </mfrac> </mrow> <mo>)</mo> </mrow> <mo>&#x2248;<!-- ≈ --></mo> <mi>Poi</mi> <mo>&#x2061;<!-- ⁡ --></mo> <mo stretchy="false">(</mo> <mn>0.6932</mn> <mo stretchy="false">)</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \operatorname {Poi} \left({\frac {\binom {23}{2}}{365}}\right)=\operatorname {Poi} \left({\frac {253}{365}}\right)\approx \operatorname {Poi} (0.6932)}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/727815b043aa343e2c8af1e1ae11627900738910" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -3.171ex; width:40.678ex; height:7.509ex;" alt="{\displaystyle \operatorname {Poi} \left({\frac {\binom {23}{2}}{365}}\right)=\operatorname {Poi} \left({\frac {253}{365}}\right)\approx \operatorname {Poi} (0.6932)}" /></span></dd></dl> <p>so </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \Pr(X&gt;0)=1-\Pr(X=0)\approx 1-e^{-0.6932}\approx 1-0.499998=0.500002.}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mo movablelimits="true" form="prefix">Pr</mo> <mo stretchy="false">(</mo> <mi>X</mi> <mo>&gt;</mo> <mn>0</mn> <mo stretchy="false">)</mo> <mo>=</mo> <mn>1</mn> <mo>&#x2212;<!-- − --></mo> <mo movablelimits="true" form="prefix">Pr</mo> <mo stretchy="false">(</mo> <mi>X</mi> <mo>=</mo> <mn>0</mn> <mo stretchy="false">)</mo> <mo>&#x2248;<!-- ≈ --></mo> <mn>1</mn> <mo>&#x2212;<!-- − --></mo> <msup> <mi>e</mi> <mrow class="MJX-TeXAtom-ORD"> <mo>&#x2212;<!-- − --></mo> <mn>0.6932</mn> </mrow> </msup> <mo>&#x2248;<!-- ≈ --></mo> <mn>1</mn> <mo>&#x2212;<!-- − --></mo> <mn>0.499998</mn> <mo>=</mo> <mn>0.500002.</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \Pr(X&gt;0)=1-\Pr(X=0)\approx 1-e^{-0.6932}\approx 1-0.499998=0.500002.}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/b88a049729c8a4efa29920a4287831452ff80f26" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:70.868ex; height:3.176ex;" alt="{\displaystyle \Pr(X&gt;0)=1-\Pr(X=0)\approx 1-e^{-0.6932}\approx 1-0.499998=0.500002.}" /></span></dd></dl> <p>The result is over 50% as previous descriptions. This approximation is the same as the one above based on the Taylor expansion that uses <span class="texhtml"><i>e<sup>x</sup></i> ≈ 1 + <i>x</i></span>. </p> <div class="mw-heading mw-heading3"><h3 id="Square_approximation">Square approximation</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Birthday_problem&amp;action=edit&amp;section=5" title="Edit section: Square approximation"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>A good <a href="/wiki/Rule_of_thumb" title="Rule of thumb">rule of thumb</a> which can be used for <a href="/wiki/Mental_calculation" title="Mental calculation">mental calculation</a> is the relation </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle p(n,d)\approx {\frac {n^{2}}{2d}}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>p</mi> <mo stretchy="false">(</mo> <mi>n</mi> <mo>,</mo> <mi>d</mi> <mo stretchy="false">)</mo> <mo>&#x2248;<!-- ≈ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <msup> <mi>n</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msup> <mrow> <mn>2</mn> <mi>d</mi> </mrow> </mfrac> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle p(n,d)\approx {\frac {n^{2}}{2d}}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/47df39613cddffa3d9aeed529ac95c1138fdb43a" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -2.005ex; margin-left: -0.089ex; width:13.096ex; height:5.843ex;" alt="{\displaystyle p(n,d)\approx {\frac {n^{2}}{2d}}}" /></span></dd></dl> <p>which can also be written as </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle n\approx {\sqrt {2d\times p(n)}}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>n</mi> <mo>&#x2248;<!-- ≈ --></mo> <mrow class="MJX-TeXAtom-ORD"> <msqrt> <mn>2</mn> <mi>d</mi> <mo>&#xd7;<!-- × --></mo> <mi>p</mi> <mo stretchy="false">(</mo> <mi>n</mi> <mo stretchy="false">)</mo> </msqrt> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle n\approx {\sqrt {2d\times p(n)}}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/18b254f490f0810f3d5305b4434a012686f116e0" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.838ex; width:16.409ex; height:4.843ex;" alt="{\displaystyle n\approx {\sqrt {2d\times p(n)}}}" /></span></dd></dl> <p>which works well for probabilities less than or equal to <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035" /><span class="sfrac">&#8288;<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">2</span></span>&#8288;</span>. In these equations, <span class="texhtml mvar" style="font-style:italic;">d</span> is the number of days in a year. </p><p>For instance, to estimate the number of people required for a <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035" /><span class="sfrac">&#8288;<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">2</span></span>&#8288;</span> chance of a shared birthday, we get </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle n\approx {\sqrt {2\times 365\times {\tfrac {1}{2}}}}={\sqrt {365}}\approx 19}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>n</mi> <mo>&#x2248;<!-- ≈ --></mo> <mrow class="MJX-TeXAtom-ORD"> <msqrt> <mn>2</mn> <mo>&#xd7;<!-- × --></mo> <mn>365</mn> <mo>&#xd7;<!-- × --></mo> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="false" scriptlevel="0"> <mfrac> <mn>1</mn> <mn>2</mn> </mfrac> </mstyle> </mrow> </msqrt> </mrow> <mo>=</mo> <mrow class="MJX-TeXAtom-ORD"> <msqrt> <mn>365</mn> </msqrt> </mrow> <mo>&#x2248;<!-- ≈ --></mo> <mn>19</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle n\approx {\sqrt {2\times 365\times {\tfrac {1}{2}}}}={\sqrt {365}}\approx 19}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/c1e9b97252f9b6fa50a6f40004bdf19ffd21d51b" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.838ex; width:32.751ex; height:4.843ex;" alt="{\displaystyle n\approx {\sqrt {2\times 365\times {\tfrac {1}{2}}}}={\sqrt {365}}\approx 19}" /></span></dd></dl> <p>Which is not too far from the correct answer of 23. </p> <div class="mw-heading mw-heading3"><h3 id="Approximation_of_number_of_people">Approximation of number of people</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Birthday_problem&amp;action=edit&amp;section=6" title="Edit section: Approximation of number of people"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>This can also be approximated using the following formula for the <i>number</i> of people necessary to have at least a <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035" /><span class="sfrac">&#8288;<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">2</span></span>&#8288;</span> chance of matching: </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle n\geq {\tfrac {1}{2}}+{\sqrt {{\tfrac {1}{4}}+2\times \ln(2)\times 365}}=22.999943.}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>n</mi> <mo>&#x2265;<!-- ≥ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="false" scriptlevel="0"> <mfrac> <mn>1</mn> <mn>2</mn> </mfrac> </mstyle> </mrow> <mo>+</mo> <mrow class="MJX-TeXAtom-ORD"> <msqrt> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="false" scriptlevel="0"> <mfrac> <mn>1</mn> <mn>4</mn> </mfrac> </mstyle> </mrow> <mo>+</mo> <mn>2</mn> <mo>&#xd7;<!-- × --></mo> <mi>ln</mi> <mo>&#x2061;<!-- ⁡ --></mo> <mo stretchy="false">(</mo> <mn>2</mn> <mo stretchy="false">)</mo> <mo>&#xd7;<!-- × --></mo> <mn>365</mn> </msqrt> </mrow> <mo>=</mo> <mn>22.999943.</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle n\geq {\tfrac {1}{2}}+{\sqrt {{\tfrac {1}{4}}+2\times \ln(2)\times 365}}=22.999943.}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/be3c27373d0f2fa3bc41a5805613c71c6ff28604" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.838ex; width:44.747ex; height:4.843ex;" alt="{\displaystyle n\geq {\tfrac {1}{2}}+{\sqrt {{\tfrac {1}{4}}+2\times \ln(2)\times 365}}=22.999943.}" /></span></dd></dl> <p>This is a result of the good approximation that an event with <span class="texhtml"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035" /><span class="sfrac">&#8288;<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den"><i>k</i></span></span>&#8288;</span></span> probability will have a <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035" /><span class="sfrac">&#8288;<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">2</span></span>&#8288;</span> chance of occurring at least once if it is repeated <span class="texhtml"><i>k</i> <a href="/wiki/Natural_logarithm_of_2" title="Natural logarithm of 2">ln 2</a></span> times.<sup id="cite_ref-8" class="reference"><a href="#cite_note-8"><span class="cite-bracket">&#91;</span>8<span class="cite-bracket">&#93;</span></a></sup> </p> <div class="mw-heading mw-heading3"><h3 id="Probability_table">Probability table</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Birthday_problem&amp;action=edit&amp;section=7" title="Edit section: Probability table"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1236090951" /><div role="note" class="hatnote navigation-not-searchable">Main article: <a href="/wiki/Birthday_attack" title="Birthday attack">Birthday attack</a></div> <dl><dd><table class="wikitable" style="white-space:nowrap;"> <tbody><tr> <th rowspan="2">length of <br />hex string </th> <th rowspan="2">no. of<br />bits<br />(<span class="texhtml mvar" style="font-style:italic;">b</span>) </th> <th rowspan="2">hash space<br />size<br />(<span class="texhtml">2<sup><i>b</i></sup></span>) </th> <th colspan="10">Number of hashed elements such that probability of at least one hash collision&#160;≥&#160;<span class="texhtml mvar" style="font-style:italic;">p</span> </th></tr> <tr> <th><span class="texhtml mvar" style="font-style:italic;">p</span> = <span class="nowrap"><span data-sort-value="6982100000000000000♠"></span>10<sup>−18</sup></span> </th> <th><span class="texhtml mvar" style="font-style:italic;">p</span> = <span class="nowrap"><span data-sort-value="6985100000000000000♠"></span>10<sup>−15</sup></span> </th> <th><span class="texhtml mvar" style="font-style:italic;">p</span> = <span class="nowrap"><span data-sort-value="6988100000000000000♠"></span>10<sup>−12</sup></span> </th> <th><span class="texhtml mvar" style="font-style:italic;">p</span> = <span class="nowrap"><span data-sort-value="6991100000000000000♠"></span>10<sup>−9</sup></span> </th> <th><span class="texhtml mvar" style="font-style:italic;">p</span> = <span class="nowrap"><span data-sort-value="6994100000000000000♠"></span>10<sup>−6</sup></span> </th> <th><span class="texhtml mvar" style="font-style:italic;">p</span> = 0.001 </th> <th><span class="texhtml mvar" style="font-style:italic;">p</span> = 0.01 </th> <th><span class="texhtml mvar" style="font-style:italic;">p</span> = 0.25 </th> <th><span class="texhtml mvar" style="font-style:italic;">p</span> = 0.50 </th> <th><span class="texhtml mvar" style="font-style:italic;">p</span> = 0.75 </th></tr> <tr align="center"> <td bgcolor="#F2F2F2">8 </td> <td bgcolor="#F2F2F2">32 </td> <td bgcolor="#F2F2F2"><span class="nowrap"><span data-sort-value="7009430000000000000♠"></span>4.3<span style="margin-left:0.25em;margin-right:0.15em;">×</span>10<sup>9</sup></span> </td> <td>2 </td> <td>2 </td> <td>2 </td> <td>2.9 </td> <td>93 </td> <td><span class="nowrap"><span data-sort-value="7003290000000000000♠"></span>2.9<span style="margin-left:0.25em;margin-right:0.15em;">×</span>10<sup>3</sup></span> </td> <td><span class="nowrap"><span data-sort-value="7003930000000000000♠"></span>9.3<span style="margin-left:0.25em;margin-right:0.15em;">×</span>10<sup>3</sup></span> </td> <td><span class="nowrap"><span data-sort-value="7004500000000000000♠"></span>5.0<span style="margin-left:0.25em;margin-right:0.15em;">×</span>10<sup>4</sup></span> </td> <td><span class="nowrap"><span data-sort-value="7004770000000000000♠"></span>7.7<span style="margin-left:0.25em;margin-right:0.15em;">×</span>10<sup>4</sup></span> </td> <td><span class="nowrap"><span data-sort-value="7005110000000000000♠"></span>1.1<span style="margin-left:0.25em;margin-right:0.15em;">×</span>10<sup>5</sup></span> </td></tr> <tr align="center"> <td bgcolor="#F2F2F2">(10) </td> <td bgcolor="#F2F2F2">(40) </td> <td bgcolor="#F2F2F2">(<span class="nowrap"><span data-sort-value="7012110000000000000♠"></span>1.1<span style="margin-left:0.25em;margin-right:0.15em;">×</span>10<sup>12</sup></span>) </td> <td>2 </td> <td>2 </td> <td>2 </td> <td>47 </td> <td><span class="nowrap"><span data-sort-value="7003150000000000000♠"></span>1.5<span style="margin-left:0.25em;margin-right:0.15em;">×</span>10<sup>3</sup></span> </td> <td><span class="nowrap"><span data-sort-value="7004470000000000000♠"></span>4.7<span style="margin-left:0.25em;margin-right:0.15em;">×</span>10<sup>4</sup></span> </td> <td><span class="nowrap"><span data-sort-value="7005150000000000000♠"></span>1.5<span style="margin-left:0.25em;margin-right:0.15em;">×</span>10<sup>5</sup></span> </td> <td><span class="nowrap"><span data-sort-value="7005800000000000000♠"></span>8.0<span style="margin-left:0.25em;margin-right:0.15em;">×</span>10<sup>5</sup></span> </td> <td><span class="nowrap"><span data-sort-value="7006120000000000000♠"></span>1.2<span style="margin-left:0.25em;margin-right:0.15em;">×</span>10<sup>6</sup></span> </td> <td><span class="nowrap"><span data-sort-value="7006170000000000000♠"></span>1.7<span style="margin-left:0.25em;margin-right:0.15em;">×</span>10<sup>6</sup></span> </td></tr> <tr align="center"> <td bgcolor="#F2F2F2">(12) </td> <td bgcolor="#F2F2F2">(48) </td> <td bgcolor="#F2F2F2">(<span class="nowrap"><span data-sort-value="7014279999999999999♠"></span>2.8<span style="margin-left:0.25em;margin-right:0.15em;">×</span>10<sup>14</sup></span>) </td> <td>2 </td> <td>2 </td> <td>24 </td> <td><span class="nowrap"><span data-sort-value="7002750000000000000♠"></span>7.5<span style="margin-left:0.25em;margin-right:0.15em;">×</span>10<sup>2</sup></span> </td> <td><span class="nowrap"><span data-sort-value="7004240000000000000♠"></span>2.4<span style="margin-left:0.25em;margin-right:0.15em;">×</span>10<sup>4</sup></span> </td> <td><span class="nowrap"><span data-sort-value="7005750000000000000♠"></span>7.5<span style="margin-left:0.25em;margin-right:0.15em;">×</span>10<sup>5</sup></span> </td> <td><span class="nowrap"><span data-sort-value="7006240000000000000♠"></span>2.4<span style="margin-left:0.25em;margin-right:0.15em;">×</span>10<sup>6</sup></span> </td> <td><span class="nowrap"><span data-sort-value="7007130000000000000♠"></span>1.3<span style="margin-left:0.25em;margin-right:0.15em;">×</span>10<sup>7</sup></span> </td> <td><span class="nowrap"><span data-sort-value="7007200000000000000♠"></span>2.0<span style="margin-left:0.25em;margin-right:0.15em;">×</span>10<sup>7</sup></span> </td> <td><span class="nowrap"><span data-sort-value="7007280000000000000♠"></span>2.8<span style="margin-left:0.25em;margin-right:0.15em;">×</span>10<sup>7</sup></span> </td></tr> <tr align="center"> <td bgcolor="#F2F2F2">16 </td> <td bgcolor="#F2F2F2">64 </td> <td bgcolor="#F2F2F2"><span class="nowrap"><span data-sort-value="7019180000000000000♠"></span>1.8<span style="margin-left:0.25em;margin-right:0.15em;">×</span>10<sup>19</sup></span> </td> <td>6.1 </td> <td><span class="nowrap"><span data-sort-value="7002190000000000000♠"></span>1.9<span style="margin-left:0.25em;margin-right:0.15em;">×</span>10<sup>2</sup></span> </td> <td><span class="nowrap"><span data-sort-value="7003610000000000000♠"></span>6.1<span style="margin-left:0.25em;margin-right:0.15em;">×</span>10<sup>3</sup></span> </td> <td><span class="nowrap"><span data-sort-value="7005190000000000000♠"></span>1.9<span style="margin-left:0.25em;margin-right:0.15em;">×</span>10<sup>5</sup></span> </td> <td><span class="nowrap"><span data-sort-value="7006610000000000000♠"></span>6.1<span style="margin-left:0.25em;margin-right:0.15em;">×</span>10<sup>6</sup></span> </td> <td><span class="nowrap"><span data-sort-value="7008190000000000000♠"></span>1.9<span style="margin-left:0.25em;margin-right:0.15em;">×</span>10<sup>8</sup></span> </td> <td><span class="nowrap"><span data-sort-value="7008610000000000000♠"></span>6.1<span style="margin-left:0.25em;margin-right:0.15em;">×</span>10<sup>8</sup></span> </td> <td><span class="nowrap"><span data-sort-value="7009330000000000000♠"></span>3.3<span style="margin-left:0.25em;margin-right:0.15em;">×</span>10<sup>9</sup></span> </td> <td><span class="nowrap"><span data-sort-value="7009510000000000000♠"></span>5.1<span style="margin-left:0.25em;margin-right:0.15em;">×</span>10<sup>9</sup></span> </td> <td><span class="nowrap"><span data-sort-value="7009720000000000000♠"></span>7.2<span style="margin-left:0.25em;margin-right:0.15em;">×</span>10<sup>9</sup></span> </td></tr> <tr align="center"> <td bgcolor="#F2F2F2">(24) </td> <td bgcolor="#F2F2F2">(96) </td> <td bgcolor="#F2F2F2">(<span class="nowrap"><span data-sort-value="7028790000000000000♠"></span>7.9<span style="margin-left:0.25em;margin-right:0.15em;">×</span>10<sup>28</sup></span>) </td> <td><span class="nowrap"><span data-sort-value="7005400000000000000♠"></span>4.0<span style="margin-left:0.25em;margin-right:0.15em;">×</span>10<sup>5</sup></span> </td> <td><span class="nowrap"><span data-sort-value="7007130000000000000♠"></span>1.3<span style="margin-left:0.25em;margin-right:0.15em;">×</span>10<sup>7</sup></span> </td> <td><span class="nowrap"><span data-sort-value="7008400000000000000♠"></span>4.0<span style="margin-left:0.25em;margin-right:0.15em;">×</span>10<sup>8</sup></span> </td> <td><span class="nowrap"><span data-sort-value="7010130000000000000♠"></span>1.3<span style="margin-left:0.25em;margin-right:0.15em;">×</span>10<sup>10</sup></span> </td> <td><span class="nowrap"><span data-sort-value="7011400000000000000♠"></span>4.0<span style="margin-left:0.25em;margin-right:0.15em;">×</span>10<sup>11</sup></span> </td> <td><span class="nowrap"><span data-sort-value="7013130000000000000♠"></span>1.3<span style="margin-left:0.25em;margin-right:0.15em;">×</span>10<sup>13</sup></span> </td> <td><span class="nowrap"><span data-sort-value="7013400000000000000♠"></span>4.0<span style="margin-left:0.25em;margin-right:0.15em;">×</span>10<sup>13</sup></span> </td> <td><span class="nowrap"><span data-sort-value="7014210000000000000♠"></span>2.1<span style="margin-left:0.25em;margin-right:0.15em;">×</span>10<sup>14</sup></span> </td> <td><span class="nowrap"><span data-sort-value="7014330000000000000♠"></span>3.3<span style="margin-left:0.25em;margin-right:0.15em;">×</span>10<sup>14</sup></span> </td> <td><span class="nowrap"><span data-sort-value="7014470000000000000♠"></span>4.7<span style="margin-left:0.25em;margin-right:0.15em;">×</span>10<sup>14</sup></span> </td></tr> <tr align="center"> <td bgcolor="#F2F2F2">32 </td> <td bgcolor="#F2F2F2">128 </td> <td bgcolor="#F2F2F2"><span class="nowrap"><span data-sort-value="7038340000000000000♠"></span>3.4<span style="margin-left:0.25em;margin-right:0.15em;">×</span>10<sup>38</sup></span> </td> <td><span class="nowrap"><span data-sort-value="7010260000000000000♠"></span>2.6<span style="margin-left:0.25em;margin-right:0.15em;">×</span>10<sup>10</sup></span> </td> <td><span class="nowrap"><span data-sort-value="7011819999999999999♠"></span>8.2<span style="margin-left:0.25em;margin-right:0.15em;">×</span>10<sup>11</sup></span> </td> <td><span class="nowrap"><span data-sort-value="7013260000000000000♠"></span>2.6<span style="margin-left:0.25em;margin-right:0.15em;">×</span>10<sup>13</sup></span> </td> <td><span class="nowrap"><span data-sort-value="7014819999999999999♠"></span>8.2<span style="margin-left:0.25em;margin-right:0.15em;">×</span>10<sup>14</sup></span> </td> <td><span class="nowrap"><span data-sort-value="7016260000000000000♠"></span>2.6<span style="margin-left:0.25em;margin-right:0.15em;">×</span>10<sup>16</sup></span> </td> <td><span class="nowrap"><span data-sort-value="7017830000000000000♠"></span>8.3<span style="margin-left:0.25em;margin-right:0.15em;">×</span>10<sup>17</sup></span> </td> <td><span class="nowrap"><span data-sort-value="7018260000000000000♠"></span>2.6<span style="margin-left:0.25em;margin-right:0.15em;">×</span>10<sup>18</sup></span> </td> <td><span class="nowrap"><span data-sort-value="7019140000000000000♠"></span>1.4<span style="margin-left:0.25em;margin-right:0.15em;">×</span>10<sup>19</sup></span> </td> <td><span class="nowrap"><span data-sort-value="7019220000000000000♠"></span>2.2<span style="margin-left:0.25em;margin-right:0.15em;">×</span>10<sup>19</sup></span> </td> <td><span class="nowrap"><span data-sort-value="7019310000000000000♠"></span>3.1<span style="margin-left:0.25em;margin-right:0.15em;">×</span>10<sup>19</sup></span> </td></tr> <tr align="center"> <td bgcolor="#F2F2F2">(48) </td> <td bgcolor="#F2F2F2">(192) </td> <td bgcolor="#F2F2F2">(<span class="nowrap"><span data-sort-value="7057630000000000000♠"></span>6.3<span style="margin-left:0.25em;margin-right:0.15em;">×</span>10<sup>57</sup></span>) </td> <td><span class="nowrap"><span data-sort-value="7020110000000000000♠"></span>1.1<span style="margin-left:0.25em;margin-right:0.15em;">×</span>10<sup>20</sup></span> </td> <td><span class="nowrap"><span data-sort-value="7021350000000000000♠"></span>3.5<span style="margin-left:0.25em;margin-right:0.15em;">×</span>10<sup>21</sup></span> </td> <td><span class="nowrap"><span data-sort-value="7023110000000000000♠"></span>1.1<span style="margin-left:0.25em;margin-right:0.15em;">×</span>10<sup>23</sup></span> </td> <td><span class="nowrap"><span data-sort-value="7024350000000000000♠"></span>3.5<span style="margin-left:0.25em;margin-right:0.15em;">×</span>10<sup>24</sup></span> </td> <td><span class="nowrap"><span data-sort-value="7026110000000000000♠"></span>1.1<span style="margin-left:0.25em;margin-right:0.15em;">×</span>10<sup>26</sup></span> </td> <td><span class="nowrap"><span data-sort-value="7027350000000000000♠"></span>3.5<span style="margin-left:0.25em;margin-right:0.15em;">×</span>10<sup>27</sup></span> </td> <td><span class="nowrap"><span data-sort-value="7028110000000000000♠"></span>1.1<span style="margin-left:0.25em;margin-right:0.15em;">×</span>10<sup>28</sup></span> </td> <td><span class="nowrap"><span data-sort-value="7028600000000000000♠"></span>6.0<span style="margin-left:0.25em;margin-right:0.15em;">×</span>10<sup>28</sup></span> </td> <td><span class="nowrap"><span data-sort-value="7028930000000000000♠"></span>9.3<span style="margin-left:0.25em;margin-right:0.15em;">×</span>10<sup>28</sup></span> </td> <td><span class="nowrap"><span data-sort-value="7029130000000000000♠"></span>1.3<span style="margin-left:0.25em;margin-right:0.15em;">×</span>10<sup>29</sup></span> </td></tr> <tr align="center"> <td bgcolor="#F2F2F2">64 </td> <td bgcolor="#F2F2F2">256 </td> <td bgcolor="#F2F2F2"><span class="nowrap"><span data-sort-value="7077120000000000000♠"></span>1.2<span style="margin-left:0.25em;margin-right:0.15em;">×</span>10<sup>77</sup></span> </td> <td><span class="nowrap"><span data-sort-value="7029480000000000000♠"></span>4.8<span style="margin-left:0.25em;margin-right:0.15em;">×</span>10<sup>29</sup></span> </td> <td><span class="nowrap"><span data-sort-value="7031150000000000000♠"></span>1.5<span style="margin-left:0.25em;margin-right:0.15em;">×</span>10<sup>31</sup></span> </td> <td><span class="nowrap"><span data-sort-value="7032480000000000000♠"></span>4.8<span style="margin-left:0.25em;margin-right:0.15em;">×</span>10<sup>32</sup></span> </td> <td><span class="nowrap"><span data-sort-value="7034149999999999999♠"></span>1.5<span style="margin-left:0.25em;margin-right:0.15em;">×</span>10<sup>34</sup></span> </td> <td><span class="nowrap"><span data-sort-value="7035479999999999999♠"></span>4.8<span style="margin-left:0.25em;margin-right:0.15em;">×</span>10<sup>35</sup></span> </td> <td><span class="nowrap"><span data-sort-value="7037149999999999999♠"></span>1.5<span style="margin-left:0.25em;margin-right:0.15em;">×</span>10<sup>37</sup></span> </td> <td><span class="nowrap"><span data-sort-value="7037480000000000000♠"></span>4.8<span style="margin-left:0.25em;margin-right:0.15em;">×</span>10<sup>37</sup></span> </td> <td><span class="nowrap"><span data-sort-value="7038259999999999999♠"></span>2.6<span style="margin-left:0.25em;margin-right:0.15em;">×</span>10<sup>38</sup></span> </td> <td><span class="nowrap"><span data-sort-value="7038399999999999999♠"></span>4.0<span style="margin-left:0.25em;margin-right:0.15em;">×</span>10<sup>38</sup></span> </td> <td><span class="nowrap"><span data-sort-value="7038569999999999999♠"></span>5.7<span style="margin-left:0.25em;margin-right:0.15em;">×</span>10<sup>38</sup></span> </td></tr> <tr align="center"> <td bgcolor="#F2F2F2">(96) </td> <td bgcolor="#F2F2F2">(384) </td> <td bgcolor="#F2F2F2">(<span class="nowrap"><span data-sort-value="7115390000000000000♠"></span>3.9<span style="margin-left:0.25em;margin-right:0.15em;">×</span>10<sup>115</sup></span>) </td> <td><span class="nowrap"><span data-sort-value="7048890000000000000♠"></span>8.9<span style="margin-left:0.25em;margin-right:0.15em;">×</span>10<sup>48</sup></span> </td> <td><span class="nowrap"><span data-sort-value="7050280000000000000♠"></span>2.8<span style="margin-left:0.25em;margin-right:0.15em;">×</span>10<sup>50</sup></span> </td> <td><span class="nowrap"><span data-sort-value="7051890000000000000♠"></span>8.9<span style="margin-left:0.25em;margin-right:0.15em;">×</span>10<sup>51</sup></span> </td> <td><span class="nowrap"><span data-sort-value="7053279999999999999♠"></span>2.8<span style="margin-left:0.25em;margin-right:0.15em;">×</span>10<sup>53</sup></span> </td> <td><span class="nowrap"><span data-sort-value="7054890000000000000♠"></span>8.9<span style="margin-left:0.25em;margin-right:0.15em;">×</span>10<sup>54</sup></span> </td> <td><span class="nowrap"><span data-sort-value="7056280000000000000♠"></span>2.8<span style="margin-left:0.25em;margin-right:0.15em;">×</span>10<sup>56</sup></span> </td> <td><span class="nowrap"><span data-sort-value="7056890000000000000♠"></span>8.9<span style="margin-left:0.25em;margin-right:0.15em;">×</span>10<sup>56</sup></span> </td> <td><span class="nowrap"><span data-sort-value="7057480000000000000♠"></span>4.8<span style="margin-left:0.25em;margin-right:0.15em;">×</span>10<sup>57</sup></span> </td> <td><span class="nowrap"><span data-sort-value="7057740000000000000♠"></span>7.4<span style="margin-left:0.25em;margin-right:0.15em;">×</span>10<sup>57</sup></span> </td> <td><span class="nowrap"><span data-sort-value="7058099999999999999♠"></span>1.0<span style="margin-left:0.25em;margin-right:0.15em;">×</span>10<sup>58</sup></span> </td></tr> <tr align="center"> <td bgcolor="#F2F2F2">128 </td> <td bgcolor="#F2F2F2">512 </td> <td bgcolor="#F2F2F2"><span class="nowrap"><span data-sort-value="7154130000000000000♠"></span>1.3<span style="margin-left:0.25em;margin-right:0.15em;">×</span>10<sup>154</sup></span> </td> <td><span class="nowrap"><span data-sort-value="7068160000000000000♠"></span>1.6<span style="margin-left:0.25em;margin-right:0.15em;">×</span>10<sup>68</sup></span> </td> <td><span class="nowrap"><span data-sort-value="7069520000000000000♠"></span>5.2<span style="margin-left:0.25em;margin-right:0.15em;">×</span>10<sup>69</sup></span> </td> <td><span class="nowrap"><span data-sort-value="7071160000000000000♠"></span>1.6<span style="margin-left:0.25em;margin-right:0.15em;">×</span>10<sup>71</sup></span> </td> <td><span class="nowrap"><span data-sort-value="7072520000000000000♠"></span>5.2<span style="margin-left:0.25em;margin-right:0.15em;">×</span>10<sup>72</sup></span> </td> <td><span class="nowrap"><span data-sort-value="7074160000000000000♠"></span>1.6<span style="margin-left:0.25em;margin-right:0.15em;">×</span>10<sup>74</sup></span> </td> <td><span class="nowrap"><span data-sort-value="7075520000000000000♠"></span>5.2<span style="margin-left:0.25em;margin-right:0.15em;">×</span>10<sup>75</sup></span> </td> <td><span class="nowrap"><span data-sort-value="7076160000000000000♠"></span>1.6<span style="margin-left:0.25em;margin-right:0.15em;">×</span>10<sup>76</sup></span> </td> <td><span class="nowrap"><span data-sort-value="7076880000000000000♠"></span>8.8<span style="margin-left:0.25em;margin-right:0.15em;">×</span>10<sup>76</sup></span> </td> <td><span class="nowrap"><span data-sort-value="7077140000000000000♠"></span>1.4<span style="margin-left:0.25em;margin-right:0.15em;">×</span>10<sup>77</sup></span> </td> <td><span class="nowrap"><span data-sort-value="7077190000000000000♠"></span>1.9<span style="margin-left:0.25em;margin-right:0.15em;">×</span>10<sup>77</sup></span> </td></tr></tbody></table></dd></dl> <figure class="mw-default-size" typeof="mw:File/Thumb"><a href="/wiki/File:Birthday_attack_vs_paradox.svg" class="mw-file-description"><img src="//upload.wikimedia.org/wikipedia/commons/thumb/4/47/Birthday_attack_vs_paradox.svg/220px-Birthday_attack_vs_paradox.svg.png" decoding="async" width="220" height="367" class="mw-file-element" srcset="//upload.wikimedia.org/wikipedia/commons/thumb/4/47/Birthday_attack_vs_paradox.svg/330px-Birthday_attack_vs_paradox.svg.png 1.5x, //upload.wikimedia.org/wikipedia/commons/thumb/4/47/Birthday_attack_vs_paradox.svg/440px-Birthday_attack_vs_paradox.svg.png 2x" data-file-width="512" data-file-height="853" /></a><figcaption>Comparison of the birthday problem (1) and birthday attack (2):<div class="paragraphbreak" style="margin-top:0.5em"></div> In (1), collisions are found within one set, in this case, 3 out of 276 pairings of the 24 lunar astronauts.<div class="paragraphbreak" style="margin-top:0.5em"></div> In (2), collisions are found between two sets, in this case, 1 out of 256 pairings of only the first bytes of SHA-256 hashes of 16 variants each of benign and harmful contracts.</figcaption></figure> <p>The lighter fields in this table show the number of hashes needed to achieve the given probability of collision (column) given a hash space of a certain size in bits (row). Using the birthday analogy: the "hash space size" resembles the "available days", the "probability of collision" resembles the "probability of shared birthday", and the "required number of hashed elements" resembles the "required number of people in a group". One could also use this chart to determine the minimum hash size required (given upper bounds on the hashes and probability of error), or the probability of collision (for fixed number of hashes and probability of error). </p><p>For comparison, <span class="nowrap"><span data-sort-value="6982100000000000000♠"></span>10<sup>−18</sup></span> to <span class="nowrap"><span data-sort-value="6985100000000000000♠"></span>10<sup>−15</sup></span> is the uncorrectable bit error rate of a typical hard disk.<sup id="cite_ref-9" class="reference"><a href="#cite_note-9"><span class="cite-bracket">&#91;</span>9<span class="cite-bracket">&#93;</span></a></sup> In theory, 128-bit hash functions, such as <a href="/wiki/MD5" title="MD5">MD5</a>, should stay within that range until about <span class="nowrap"><span data-sort-value="7011819999999999999♠"></span>8.2<span style="margin-left:0.25em;margin-right:0.15em;">×</span>10<sup>11</sup></span> documents, even if its possible outputs are many more. </p> <div class="mw-heading mw-heading2"><h2 id="An_upper_bound_on_the_probability_and_a_lower_bound_on_the_number_of_people">An upper bound on the probability and a lower bound on the number of people</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Birthday_problem&amp;action=edit&amp;section=8" title="Edit section: An upper bound on the probability and a lower bound on the number of people"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>The argument below is adapted from an argument of <a href="/wiki/Paul_Halmos" title="Paul Halmos">Paul Halmos</a>.<sup id="cite_ref-10" class="reference"><a href="#cite_note-10"><span class="cite-bracket">&#91;</span>nb 1<span class="cite-bracket">&#93;</span></a></sup> </p><p>As stated above, the probability that no two birthdays coincide is </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle 1-p(n)={\bar {p}}(n)=\prod _{k=1}^{n-1}\left(1-{\frac {k}{365}}\right).}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mn>1</mn> <mo>&#x2212;<!-- − --></mo> <mi>p</mi> <mo stretchy="false">(</mo> <mi>n</mi> <mo stretchy="false">)</mo> <mo>=</mo> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-ORD"> <mover> <mi>p</mi> <mo stretchy="false">&#xaf;<!-- ¯ --></mo> </mover> </mrow> </mrow> <mo stretchy="false">(</mo> <mi>n</mi> <mo stretchy="false">)</mo> <mo>=</mo> <munderover> <mo>&#x220f;<!-- ∏ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> <mo>=</mo> <mn>1</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> <mo>&#x2212;<!-- − --></mo> <mn>1</mn> </mrow> </munderover> <mrow> <mo>(</mo> <mrow> <mn>1</mn> <mo>&#x2212;<!-- − --></mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mi>k</mi> <mn>365</mn> </mfrac> </mrow> </mrow> <mo>)</mo> </mrow> <mo>.</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle 1-p(n)={\bar {p}}(n)=\prod _{k=1}^{n-1}\left(1-{\frac {k}{365}}\right).}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/dae6c92f2ac4124d88bf66b084960db63fb74b37" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -3.005ex; width:35.392ex; height:7.343ex;" alt="{\displaystyle 1-p(n)={\bar {p}}(n)=\prod _{k=1}^{n-1}\left(1-{\frac {k}{365}}\right).}" /></span></dd></dl> <p>As in earlier paragraphs, interest lies in the smallest <span class="texhtml mvar" style="font-style:italic;">n</span> such that <span class="texhtml"><i>p</i>(<i>n</i>) &gt; <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035" /><span class="sfrac">&#8288;<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">2</span></span>&#8288;</span></span>; or equivalently, the smallest <span class="texhtml mvar" style="font-style:italic;">n</span> such that <span class="texhtml"><i><span style="text-decoration:overline;">p</span></i>(<i>n</i>) &lt; <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035" /><span class="sfrac">&#8288;<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">2</span></span>&#8288;</span></span>. </p><p>Using the inequality <span class="texhtml">1 − <i>x</i> &lt; <i>e</i><sup>−<i>x</i></sup></span> in the above expression we replace <span class="texhtml">1 − <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035" /><span class="sfrac">&#8288;<span class="tion"><span class="num"><i>k</i></span><span class="sr-only">/</span><span class="den">365</span></span>&#8288;</span></span> with <span class="texhtml"><i>e</i><sup><style data-mw-deduplicate="TemplateStyles:r1154941027">.mw-parser-output .frac{white-space:nowrap}.mw-parser-output .frac .num,.mw-parser-output .frac .den{font-size:80%;line-height:0;vertical-align:super}.mw-parser-output .frac .den{vertical-align:sub}.mw-parser-output .sr-only{border:0;clip:rect(0,0,0,0);clip-path:polygon(0px 0px,0px 0px,0px 0px);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}</style><span class="frac"><span class="num">−<i>k</i></span>&#8260;<span class="den">365</span></span></sup></span>. This yields </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\bar {p}}(n)=\prod _{k=1}^{n-1}\left(1-{\frac {k}{365}}\right)&lt;\prod _{k=1}^{n-1}\left(e^{-{\frac {k}{365}}}\right)=e^{-{\frac {n(n-1)}{730}}}.}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-ORD"> <mover> <mi>p</mi> <mo stretchy="false">&#xaf;<!-- ¯ --></mo> </mover> </mrow> </mrow> <mo stretchy="false">(</mo> <mi>n</mi> <mo stretchy="false">)</mo> <mo>=</mo> <munderover> <mo>&#x220f;<!-- ∏ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> <mo>=</mo> <mn>1</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> <mo>&#x2212;<!-- − --></mo> <mn>1</mn> </mrow> </munderover> <mrow> <mo>(</mo> <mrow> <mn>1</mn> <mo>&#x2212;<!-- − --></mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mi>k</mi> <mn>365</mn> </mfrac> </mrow> </mrow> <mo>)</mo> </mrow> <mo>&lt;</mo> <munderover> <mo>&#x220f;<!-- ∏ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> <mo>=</mo> <mn>1</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> <mo>&#x2212;<!-- − --></mo> <mn>1</mn> </mrow> </munderover> <mrow> <mo>(</mo> <msup> <mi>e</mi> <mrow class="MJX-TeXAtom-ORD"> <mo>&#x2212;<!-- − --></mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mi>k</mi> <mn>365</mn> </mfrac> </mrow> </mrow> </msup> <mo>)</mo> </mrow> <mo>=</mo> <msup> <mi>e</mi> <mrow class="MJX-TeXAtom-ORD"> <mo>&#x2212;<!-- − --></mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <mi>n</mi> <mo stretchy="false">(</mo> <mi>n</mi> <mo>&#x2212;<!-- − --></mo> <mn>1</mn> <mo stretchy="false">)</mo> </mrow> <mn>730</mn> </mfrac> </mrow> </mrow> </msup> <mo>.</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle {\bar {p}}(n)=\prod _{k=1}^{n-1}\left(1-{\frac {k}{365}}\right)&lt;\prod _{k=1}^{n-1}\left(e^{-{\frac {k}{365}}}\right)=e^{-{\frac {n(n-1)}{730}}}.}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/34c4bb506ff584ced511c4c281ff742302c2946b" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -3.005ex; margin-left: -0.089ex; width:49.92ex; height:7.343ex;" alt="{\displaystyle {\bar {p}}(n)=\prod _{k=1}^{n-1}\left(1-{\frac {k}{365}}\right)&lt;\prod _{k=1}^{n-1}\left(e^{-{\frac {k}{365}}}\right)=e^{-{\frac {n(n-1)}{730}}}.}" /></span></dd></dl> <p>Therefore, the expression above is not only an approximation, but also an <a href="/wiki/Upper_bound" class="mw-redirect" title="Upper bound">upper bound</a> of <span class="texhtml"><i><span style="text-decoration:overline;">p</span></i>(<i>n</i>)</span>. The inequality </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle e^{-{\frac {n(n-1)}{730}}}&lt;{\frac {1}{2}}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msup> <mi>e</mi> <mrow class="MJX-TeXAtom-ORD"> <mo>&#x2212;<!-- − --></mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <mi>n</mi> <mo stretchy="false">(</mo> <mi>n</mi> <mo>&#x2212;<!-- − --></mo> <mn>1</mn> <mo stretchy="false">)</mo> </mrow> <mn>730</mn> </mfrac> </mrow> </mrow> </msup> <mo>&lt;</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mn>1</mn> <mn>2</mn> </mfrac> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle e^{-{\frac {n(n-1)}{730}}}&lt;{\frac {1}{2}}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/c497cc849d78859fb7ddcdd47a56708e83b4d8b6" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.838ex; width:12.873ex; height:5.509ex;" alt="{\displaystyle e^{-{\frac {n(n-1)}{730}}}&lt;{\frac {1}{2}}}" /></span></dd></dl> <p>implies <span class="texhtml"><i><span style="text-decoration:overline;">p</span></i>(<i>n</i>) &lt; <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035" /><span class="sfrac">&#8288;<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">2</span></span>&#8288;</span></span>. Solving for <span class="texhtml mvar" style="font-style:italic;">n</span> gives </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle n^{2}-n&gt;730\ln 2.}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msup> <mi>n</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msup> <mo>&#x2212;<!-- − --></mo> <mi>n</mi> <mo>&gt;</mo> <mn>730</mn> <mi>ln</mi> <mo>&#x2061;<!-- ⁡ --></mo> <mn>2.</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle n^{2}-n&gt;730\ln 2.}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/f993e1a7d3f9f66b55169f0b5f9d714f4ca05b99" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.505ex; width:17.793ex; height:2.843ex;" alt="{\displaystyle n^{2}-n&gt;730\ln 2.}" /></span></dd></dl> <p>Now, <span class="texhtml">730 ln 2</span> is approximately 505.997, which is barely below 506, the value of <span class="texhtml"><i>n</i><sup>2</sup> − <i>n</i></span> attained when <span class="texhtml"><i>n</i> = 23</span>. Therefore, 23 people suffice. Incidentally, solving <span class="texhtml"><i>n</i><sup>2</sup> − <i>n</i> = 730 ln 2</span> for <i>n</i> gives the approximate formula of Frank H. Mathis cited above. </p><p>This derivation only shows that <i>at most</i> 23 people are needed to ensure the chances of a birthday match are at least even; it leaves open the possibility that <span class="texhtml mvar" style="font-style:italic;">n</span> is 22 or less could also work. </p> <div class="mw-heading mw-heading2"><h2 id="Generalizations">Generalizations</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Birthday_problem&amp;action=edit&amp;section=9" title="Edit section: Generalizations"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <div class="mw-heading mw-heading3"><h3 id="Arbitrary_number_of_days">Arbitrary number of days</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Birthday_problem&amp;action=edit&amp;section=10" title="Edit section: Arbitrary number of days"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Given a year with <span class="texhtml mvar" style="font-style:italic;">d</span> days, the <b>generalized birthday problem</b> asks for the minimal number <span class="texhtml"><i>n</i>(<i>d</i>)</span> such that, in a set of <span class="texhtml mvar" style="font-style:italic;">n</span> randomly chosen people, the probability of a birthday coincidence is at least 50%. In other words, <span class="texhtml"><i>n</i>(<i>d</i>)</span> is the minimal integer <span class="texhtml mvar" style="font-style:italic;">n</span> such that </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle 1-\left(1-{\frac {1}{d}}\right)\left(1-{\frac {2}{d}}\right)\cdots \left(1-{\frac {n-1}{d}}\right)\geq {\frac {1}{2}}.}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mn>1</mn> <mo>&#x2212;<!-- − --></mo> <mrow> <mo>(</mo> <mrow> <mn>1</mn> <mo>&#x2212;<!-- − --></mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mn>1</mn> <mi>d</mi> </mfrac> </mrow> </mrow> <mo>)</mo> </mrow> <mrow> <mo>(</mo> <mrow> <mn>1</mn> <mo>&#x2212;<!-- − --></mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mn>2</mn> <mi>d</mi> </mfrac> </mrow> </mrow> <mo>)</mo> </mrow> <mo>&#x22ef;<!-- ⋯ --></mo> <mrow> <mo>(</mo> <mrow> <mn>1</mn> <mo>&#x2212;<!-- − --></mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <mi>n</mi> <mo>&#x2212;<!-- − --></mo> <mn>1</mn> </mrow> <mi>d</mi> </mfrac> </mrow> </mrow> <mo>)</mo> </mrow> <mo>&#x2265;<!-- ≥ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mn>1</mn> <mn>2</mn> </mfrac> </mrow> <mo>.</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle 1-\left(1-{\frac {1}{d}}\right)\left(1-{\frac {2}{d}}\right)\cdots \left(1-{\frac {n-1}{d}}\right)\geq {\frac {1}{2}}.}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/37a5f7575c11102f96165a8ad63168722be3c312" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -2.505ex; width:46.241ex; height:6.176ex;" alt="{\displaystyle 1-\left(1-{\frac {1}{d}}\right)\left(1-{\frac {2}{d}}\right)\cdots \left(1-{\frac {n-1}{d}}\right)\geq {\frac {1}{2}}.}" /></span></dd></dl> <p>The classical birthday problem thus corresponds to determining <span class="texhtml"><i>n</i>(365)</span>. The first 99 values of <span class="texhtml"><i>n</i>(<i>d</i>)</span> are given here (sequence <span class="nowrap external"><a href="//oeis.org/A033810" class="extiw" title="oeis:A033810">A033810</a></span> in the <a href="/wiki/On-Line_Encyclopedia_of_Integer_Sequences" title="On-Line Encyclopedia of Integer Sequences">OEIS</a>): </p> <dl><dd><table class="wikitable" style="text-align:center;"> <tbody><tr> <th scope="row"><span class="texhtml mvar" style="font-style:italic;">d</span> </th> <td>1–2</td> <td>3–5</td> <td>6–9</td> <td>10–16</td> <td>17–23</td> <td>24–32</td> <td>33–42</td> <td>43–54</td> <td>55–68</td> <td>69–82</td> <td>83–99 </td></tr> <tr> <th scope="row"><span class="texhtml"><i>n</i>(<i>d</i>)</span> </th> <td>2</td> <td>3</td> <td>4</td> <td>5</td> <td>6</td> <td>7</td> <td>8</td> <td>9</td> <td>10</td> <td>11</td> <td>12 </td></tr></tbody></table></dd></dl> <p>A similar calculation shows that <span class="texhtml"><i>n</i>(<i>d</i>)</span> = 23 when <span class="texhtml mvar" style="font-style:italic;">d</span> is in the range 341–372. </p><p>A number of bounds and formulas for <span class="texhtml"><i>n</i>(<i>d</i>)</span> have been published.<sup id="cite_ref-11" class="reference"><a href="#cite_note-11"><span class="cite-bracket">&#91;</span>10<span class="cite-bracket">&#93;</span></a></sup> For any <span class="texhtml"><i>d</i> ≥ 1</span>, the number <span class="texhtml"><i>n</i>(<i>d</i>)</span> satisfies<sup id="cite_ref-12" class="reference"><a href="#cite_note-12"><span class="cite-bracket">&#91;</span>11<span class="cite-bracket">&#93;</span></a></sup> </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\frac {3-2\ln 2}{6}}&lt;n(d)-{\sqrt {2d\ln 2}}\leq 9-{\sqrt {86\ln 2}}.}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <mn>3</mn> <mo>&#x2212;<!-- − --></mo> <mn>2</mn> <mi>ln</mi> <mo>&#x2061;<!-- ⁡ --></mo> <mn>2</mn> </mrow> <mn>6</mn> </mfrac> </mrow> <mo>&lt;</mo> <mi>n</mi> <mo stretchy="false">(</mo> <mi>d</mi> <mo stretchy="false">)</mo> <mo>&#x2212;<!-- − --></mo> <mrow class="MJX-TeXAtom-ORD"> <msqrt> <mn>2</mn> <mi>d</mi> <mi>ln</mi> <mo>&#x2061;<!-- ⁡ --></mo> <mn>2</mn> </msqrt> </mrow> <mo>&#x2264;<!-- ≤ --></mo> <mn>9</mn> <mo>&#x2212;<!-- − --></mo> <mrow class="MJX-TeXAtom-ORD"> <msqrt> <mn>86</mn> <mi>ln</mi> <mo>&#x2061;<!-- ⁡ --></mo> <mn>2</mn> </msqrt> </mrow> <mo>.</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle {\frac {3-2\ln 2}{6}}&lt;n(d)-{\sqrt {2d\ln 2}}\leq 9-{\sqrt {86\ln 2}}.}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/9a15aa098d02711e1653197be9c6a725f3b08228" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.838ex; width:44.311ex; height:5.343ex;" alt="{\displaystyle {\frac {3-2\ln 2}{6}}&lt;n(d)-{\sqrt {2d\ln 2}}\leq 9-{\sqrt {86\ln 2}}.}" /></span></dd></dl> <p>These bounds are optimal in the sense that the sequence <span class="texhtml"><i>n</i>(<i>d</i>) − <span class="nowrap">&#8730;<span style="border-top:1px solid; padding:0 0.1em;">2<i>d</i> ln 2</span></span></span> gets arbitrarily close to </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\frac {3-2\ln 2}{6}}\approx 0.27,}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <mn>3</mn> <mo>&#x2212;<!-- − --></mo> <mn>2</mn> <mi>ln</mi> <mo>&#x2061;<!-- ⁡ --></mo> <mn>2</mn> </mrow> <mn>6</mn> </mfrac> </mrow> <mo>&#x2248;<!-- ≈ --></mo> <mn>0.27</mn> <mo>,</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle {\frac {3-2\ln 2}{6}}\approx 0.27,}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/6c037ae19a768e6ef92f7326003e1d5cd7e2d473" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.838ex; width:17.757ex; height:5.343ex;" alt="{\displaystyle {\frac {3-2\ln 2}{6}}\approx 0.27,}" /></span></dd></dl> <p>while it has </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle 9-{\sqrt {86\ln 2}}\approx 1.28}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mn>9</mn> <mo>&#x2212;<!-- − --></mo> <mrow class="MJX-TeXAtom-ORD"> <msqrt> <mn>86</mn> <mi>ln</mi> <mo>&#x2061;<!-- ⁡ --></mo> <mn>2</mn> </msqrt> </mrow> <mo>&#x2248;<!-- ≈ --></mo> <mn>1.28</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle 9-{\sqrt {86\ln 2}}\approx 1.28}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/5ed64e26187df414396d62cfaf9509cf3a3c01b8" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:19.372ex; height:3.009ex;" alt="{\displaystyle 9-{\sqrt {86\ln 2}}\approx 1.28}" /></span></dd></dl> <p>as its maximum, taken for <span class="texhtml"><i>d</i> = 43</span>. </p><p>The bounds are sufficiently tight to give the exact value of <span class="texhtml"><i>n</i>(<i>d</i>)</span> in most of the cases. For example, for <span class="texhtml"><i>d</i> =</span> 365 these bounds imply that <span class="texhtml">22.7633 &lt; <i>n</i>(365) &lt; 23.7736</span> and 23 is the only integer in that range. In general, it follows from these bounds that <span class="texhtml"><i>n</i>(<i>d</i>)</span> always equals either </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \left\lceil {\sqrt {2d\ln 2}}\,\right\rceil \quad {\text{or}}\quad \left\lceil {\sqrt {2d\ln 2}}\,\right\rceil +1}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow> <mo>&#x2308;</mo> <mrow> <mrow class="MJX-TeXAtom-ORD"> <msqrt> <mn>2</mn> <mi>d</mi> <mi>ln</mi> <mo>&#x2061;<!-- ⁡ --></mo> <mn>2</mn> </msqrt> </mrow> <mspace width="thinmathspace"></mspace> </mrow> <mo>&#x2309;</mo> </mrow> <mspace width="1em"></mspace> <mrow class="MJX-TeXAtom-ORD"> <mtext>or</mtext> </mrow> <mspace width="1em"></mspace> <mrow> <mo>&#x2308;</mo> <mrow> <mrow class="MJX-TeXAtom-ORD"> <msqrt> <mn>2</mn> <mi>d</mi> <mi>ln</mi> <mo>&#x2061;<!-- ⁡ --></mo> <mn>2</mn> </msqrt> </mrow> <mspace width="thinmathspace"></mspace> </mrow> <mo>&#x2309;</mo> </mrow> <mo>+</mo> <mn>1</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \left\lceil {\sqrt {2d\ln 2}}\,\right\rceil \quad {\text{or}}\quad \left\lceil {\sqrt {2d\ln 2}}\,\right\rceil +1}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/2e678971307161ca29be6609e2da96d071f47b63" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.005ex; width:33.041ex; height:3.343ex;" alt="{\displaystyle \left\lceil {\sqrt {2d\ln 2}}\,\right\rceil \quad {\text{or}}\quad \left\lceil {\sqrt {2d\ln 2}}\,\right\rceil +1}" /></span></dd></dl> <p>where <span class="texhtml">⌈ · ⌉</span> denotes the <a href="/wiki/Floor_and_ceiling_functions" title="Floor and ceiling functions">ceiling function</a>. The formula </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle n(d)=\left\lceil {\sqrt {2d\ln 2}}\,\right\rceil }"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>n</mi> <mo stretchy="false">(</mo> <mi>d</mi> <mo stretchy="false">)</mo> <mo>=</mo> <mrow> <mo>&#x2308;</mo> <mrow> <mrow class="MJX-TeXAtom-ORD"> <msqrt> <mn>2</mn> <mi>d</mi> <mi>ln</mi> <mo>&#x2061;<!-- ⁡ --></mo> <mn>2</mn> </msqrt> </mrow> <mspace width="thinmathspace"></mspace> </mrow> <mo>&#x2309;</mo> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle n(d)=\left\lceil {\sqrt {2d\ln 2}}\,\right\rceil }</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/4a75a0890e5095d825eaf98d3acdbe2bef987e69" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.005ex; width:18.291ex; height:3.343ex;" alt="{\displaystyle n(d)=\left\lceil {\sqrt {2d\ln 2}}\,\right\rceil }" /></span></dd></dl> <p>holds for 73% of all integers <span class="texhtml mvar" style="font-style:italic;">d</span>.<sup id="cite_ref-Brink_13-0" class="reference"><a href="#cite_note-Brink-13"><span class="cite-bracket">&#91;</span>12<span class="cite-bracket">&#93;</span></a></sup> The formula </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle n(d)=\left\lceil {\sqrt {2d\ln 2}}+{\frac {3-2\ln 2}{6}}\right\rceil }"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>n</mi> <mo stretchy="false">(</mo> <mi>d</mi> <mo stretchy="false">)</mo> <mo>=</mo> <mrow> <mo>&#x2308;</mo> <mrow> <mrow class="MJX-TeXAtom-ORD"> <msqrt> <mn>2</mn> <mi>d</mi> <mi>ln</mi> <mo>&#x2061;<!-- ⁡ --></mo> <mn>2</mn> </msqrt> </mrow> <mo>+</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <mn>3</mn> <mo>&#x2212;<!-- − --></mo> <mn>2</mn> <mi>ln</mi> <mo>&#x2061;<!-- ⁡ --></mo> <mn>2</mn> </mrow> <mn>6</mn> </mfrac> </mrow> </mrow> <mo>&#x2309;</mo> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle n(d)=\left\lceil {\sqrt {2d\ln 2}}+{\frac {3-2\ln 2}{6}}\right\rceil }</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/bab0013af45547a93ffce40b1239e8bb17c93bdf" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -2.505ex; width:31.137ex; height:6.176ex;" alt="{\displaystyle n(d)=\left\lceil {\sqrt {2d\ln 2}}+{\frac {3-2\ln 2}{6}}\right\rceil }" /></span></dd></dl> <p>holds for <a href="/wiki/Almost_all" title="Almost all">almost all</a> <span class="texhtml mvar" style="font-style:italic;">d</span>, i.e., for a set of integers <span class="texhtml mvar" style="font-style:italic;">d</span> with <a href="/wiki/Asymptotic_density" class="mw-redirect" title="Asymptotic density">asymptotic density</a> 1.<sup id="cite_ref-Brink_13-1" class="reference"><a href="#cite_note-Brink-13"><span class="cite-bracket">&#91;</span>12<span class="cite-bracket">&#93;</span></a></sup> </p><p>The formula </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle n(d)=\left\lceil {\sqrt {2d\ln 2}}+{\frac {3-2\ln 2}{6}}+{\frac {9-4(\ln 2)^{2}}{72{\sqrt {2d\ln 2}}}}\right\rceil }"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>n</mi> <mo stretchy="false">(</mo> <mi>d</mi> <mo stretchy="false">)</mo> <mo>=</mo> <mrow> <mo>&#x2308;</mo> <mrow> <mrow class="MJX-TeXAtom-ORD"> <msqrt> <mn>2</mn> <mi>d</mi> <mi>ln</mi> <mo>&#x2061;<!-- ⁡ --></mo> <mn>2</mn> </msqrt> </mrow> <mo>+</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <mn>3</mn> <mo>&#x2212;<!-- − --></mo> <mn>2</mn> <mi>ln</mi> <mo>&#x2061;<!-- ⁡ --></mo> <mn>2</mn> </mrow> <mn>6</mn> </mfrac> </mrow> <mo>+</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <mn>9</mn> <mo>&#x2212;<!-- − --></mo> <mn>4</mn> <mo stretchy="false">(</mo> <mi>ln</mi> <mo>&#x2061;<!-- ⁡ --></mo> <mn>2</mn> <msup> <mo stretchy="false">)</mo> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msup> </mrow> <mrow> <mn>72</mn> <mrow class="MJX-TeXAtom-ORD"> <msqrt> <mn>2</mn> <mi>d</mi> <mi>ln</mi> <mo>&#x2061;<!-- ⁡ --></mo> <mn>2</mn> </msqrt> </mrow> </mrow> </mfrac> </mrow> </mrow> <mo>&#x2309;</mo> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle n(d)=\left\lceil {\sqrt {2d\ln 2}}+{\frac {3-2\ln 2}{6}}+{\frac {9-4(\ln 2)^{2}}{72{\sqrt {2d\ln 2}}}}\right\rceil }</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/418edd16de5a67451c10aa2574e9a1c959413d47" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -3.171ex; width:46.591ex; height:7.509ex;" alt="{\displaystyle n(d)=\left\lceil {\sqrt {2d\ln 2}}+{\frac {3-2\ln 2}{6}}+{\frac {9-4(\ln 2)^{2}}{72{\sqrt {2d\ln 2}}}}\right\rceil }" /></span></dd></dl> <p>holds for all <span class="texhtml"><i>d</i> ≤ <span class="nowrap"><span data-sort-value="7018100000000000000♠"></span>10<sup>18</sup></span></span>, but it is conjectured that there are infinitely many counterexamples to this formula.<sup id="cite_ref-ReferenceA_14-0" class="reference"><a href="#cite_note-ReferenceA-14"><span class="cite-bracket">&#91;</span>13<span class="cite-bracket">&#93;</span></a></sup> </p><p>The formula </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle n(d)=\left\lceil {\sqrt {2d\ln 2}}+{\frac {3-2\ln 2}{6}}+{\frac {9-4(\ln 2)^{2}}{72{\sqrt {2d\ln 2}}}}-{\frac {2(\ln 2)^{2}}{135d}}\right\rceil }"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>n</mi> <mo stretchy="false">(</mo> <mi>d</mi> <mo stretchy="false">)</mo> <mo>=</mo> <mrow> <mo>&#x2308;</mo> <mrow> <mrow class="MJX-TeXAtom-ORD"> <msqrt> <mn>2</mn> <mi>d</mi> <mi>ln</mi> <mo>&#x2061;<!-- ⁡ --></mo> <mn>2</mn> </msqrt> </mrow> <mo>+</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <mn>3</mn> <mo>&#x2212;<!-- − --></mo> <mn>2</mn> <mi>ln</mi> <mo>&#x2061;<!-- ⁡ --></mo> <mn>2</mn> </mrow> <mn>6</mn> </mfrac> </mrow> <mo>+</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <mn>9</mn> <mo>&#x2212;<!-- − --></mo> <mn>4</mn> <mo stretchy="false">(</mo> <mi>ln</mi> <mo>&#x2061;<!-- ⁡ --></mo> <mn>2</mn> <msup> <mo stretchy="false">)</mo> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msup> </mrow> <mrow> <mn>72</mn> <mrow class="MJX-TeXAtom-ORD"> <msqrt> <mn>2</mn> <mi>d</mi> <mi>ln</mi> <mo>&#x2061;<!-- ⁡ --></mo> <mn>2</mn> </msqrt> </mrow> </mrow> </mfrac> </mrow> <mo>&#x2212;<!-- − --></mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <mn>2</mn> <mo stretchy="false">(</mo> <mi>ln</mi> <mo>&#x2061;<!-- ⁡ --></mo> <mn>2</mn> <msup> <mo stretchy="false">)</mo> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msup> </mrow> <mrow> <mn>135</mn> <mi>d</mi> </mrow> </mfrac> </mrow> </mrow> <mo>&#x2309;</mo> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle n(d)=\left\lceil {\sqrt {2d\ln 2}}+{\frac {3-2\ln 2}{6}}+{\frac {9-4(\ln 2)^{2}}{72{\sqrt {2d\ln 2}}}}-{\frac {2(\ln 2)^{2}}{135d}}\right\rceil }</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/2f5e9f355d6e76e8a5fc62d85ddc3bb0d7866141" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -3.171ex; width:57.783ex; height:7.509ex;" alt="{\displaystyle n(d)=\left\lceil {\sqrt {2d\ln 2}}+{\frac {3-2\ln 2}{6}}+{\frac {9-4(\ln 2)^{2}}{72{\sqrt {2d\ln 2}}}}-{\frac {2(\ln 2)^{2}}{135d}}\right\rceil }" /></span></dd></dl> <p>holds for all <span class="texhtml"><i>d</i> ≤ <span class="nowrap"><span data-sort-value="7018100000000000000♠"></span>10<sup>18</sup></span></span>, and it is conjectured that this formula holds for all <span class="texhtml mvar" style="font-style:italic;">d</span>.<sup id="cite_ref-ReferenceA_14-1" class="reference"><a href="#cite_note-ReferenceA-14"><span class="cite-bracket">&#91;</span>13<span class="cite-bracket">&#93;</span></a></sup> </p> <div class="mw-heading mw-heading3"><h3 id="More_than_two_people_sharing_a_birthday">More than two people sharing a birthday</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Birthday_problem&amp;action=edit&amp;section=11" title="Edit section: More than two people sharing a birthday"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>It is possible to extend the problem to ask how many people in a group are necessary for there to be a greater than 50% probability that at least 3, 4, 5, etc. of the group share the same birthday. </p><p>The first few values are as follows: &gt;50% probability of 3 people sharing a birthday - 88 people; &gt;50% probability of 4 people sharing a birthday - 187 people (sequence <span class="nowrap external"><a href="//oeis.org/A014088" class="extiw" title="oeis:A014088">A014088</a></span> in the <a href="/wiki/On-Line_Encyclopedia_of_Integer_Sequences" title="On-Line Encyclopedia of Integer Sequences">OEIS</a>).<sup id="cite_ref-15" class="reference"><a href="#cite_note-15"><span class="cite-bracket">&#91;</span>14<span class="cite-bracket">&#93;</span></a></sup> </p> <div class="mw-heading mw-heading3"><h3 id="Everyone_shares_a_birthday">Everyone shares a birthday</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Birthday_problem&amp;action=edit&amp;section=12" title="Edit section: Everyone shares a birthday"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>The strong birthday problem asks for the number of people that need to be gathered together before there is a 50% chance that <i>everyone</i> in the gathering shares their birthday with at least one other person. For d=365 days the answer is 3,064 people.<sup id="cite_ref-16" class="reference"><a href="#cite_note-16"><span class="cite-bracket">&#91;</span>15<span class="cite-bracket">&#93;</span></a></sup><sup id="cite_ref-17" class="reference"><a href="#cite_note-17"><span class="cite-bracket">&#91;</span>16<span class="cite-bracket">&#93;</span></a></sup> </p><p>The number of people needed for arbitrary number of days is given by (sequence <span class="nowrap external"><a href="//oeis.org/A380129" class="extiw" title="oeis:A380129">A380129</a></span> in the <a href="/wiki/On-Line_Encyclopedia_of_Integer_Sequences" title="On-Line Encyclopedia of Integer Sequences">OEIS</a>) </p> <div class="mw-heading mw-heading3"><h3 id="Probability_of_a_shared_birthday_(collision)"><span id="Probability_of_a_shared_birthday_.28collision.29"></span>Probability of a shared birthday (collision)</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Birthday_problem&amp;action=edit&amp;section=13" title="Edit section: Probability of a shared birthday (collision)"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>The birthday problem can be generalized as follows: </p> <dl><dd>Given <span class="texhtml mvar" style="font-style:italic;">n</span> random integers drawn from a <a href="/wiki/Uniform_distribution_(discrete)" class="mw-redirect" title="Uniform distribution (discrete)">discrete uniform distribution</a> with range <span class="texhtml">[1,<i>d</i>]</span>, what is the probability <span class="texhtml"><i>p</i>(<i>n</i>; <i>d</i>)</span> that at least two numbers are the same? (<span class="texhtml"><i>d</i> = 365</span> gives the usual birthday problem.)<sup id="cite_ref-18" class="reference"><a href="#cite_note-18"><span class="cite-bracket">&#91;</span>17<span class="cite-bracket">&#93;</span></a></sup></dd></dl> <p>The generic results can be derived using the same arguments given above. </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\begin{aligned}p(n;d)&amp;={\begin{cases}1-\displaystyle \prod _{k=1}^{n-1}\left(1-{\frac {k}{d}}\right)&amp;n\leq d\\1&amp;n&gt;d\end{cases}}\\[8px]&amp;\approx 1-e^{-{\frac {n(n-1)}{2d}}}\\&amp;\approx 1-\left({\frac {d-1}{d}}\right)^{\frac {n(n-1)}{2}}\end{aligned}}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow class="MJX-TeXAtom-ORD"> <mtable columnalign="right left right left right left right left right left right left" rowspacing="1.1em 0.3em 0.3em" columnspacing="0em 2em 0em 2em 0em 2em 0em 2em 0em 2em 0em" displaystyle="true"> <mtr> <mtd> <mi>p</mi> <mo stretchy="false">(</mo> <mi>n</mi> <mo>;</mo> <mi>d</mi> <mo stretchy="false">)</mo> </mtd> <mtd> <mi></mi> <mo>=</mo> <mrow class="MJX-TeXAtom-ORD"> <mrow> <mo>{</mo> <mtable columnalign="left left" rowspacing=".2em" columnspacing="1em" displaystyle="false"> <mtr> <mtd> <mn>1</mn> <mo>&#x2212;<!-- − --></mo> <mstyle displaystyle="true" scriptlevel="0"> <munderover> <mo>&#x220f;<!-- ∏ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> <mo>=</mo> <mn>1</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> <mo>&#x2212;<!-- − --></mo> <mn>1</mn> </mrow> </munderover> <mrow> <mo>(</mo> <mrow> <mn>1</mn> <mo>&#x2212;<!-- − --></mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mi>k</mi> <mi>d</mi> </mfrac> </mrow> </mrow> <mo>)</mo> </mrow> </mstyle> </mtd> <mtd> <mi>n</mi> <mo>&#x2264;<!-- ≤ --></mo> <mi>d</mi> </mtd> </mtr> <mtr> <mtd> <mn>1</mn> </mtd> <mtd> <mi>n</mi> <mo>&gt;</mo> <mi>d</mi> </mtd> </mtr> </mtable> <mo fence="true" stretchy="true" symmetric="true"></mo> </mrow> </mrow> </mtd> </mtr> <mtr> <mtd></mtd> <mtd> <mi></mi> <mo>&#x2248;<!-- ≈ --></mo> <mn>1</mn> <mo>&#x2212;<!-- − --></mo> <msup> <mi>e</mi> <mrow class="MJX-TeXAtom-ORD"> <mo>&#x2212;<!-- − --></mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <mi>n</mi> <mo stretchy="false">(</mo> <mi>n</mi> <mo>&#x2212;<!-- − --></mo> <mn>1</mn> <mo stretchy="false">)</mo> </mrow> <mrow> <mn>2</mn> <mi>d</mi> </mrow> </mfrac> </mrow> </mrow> </msup> </mtd> </mtr> <mtr> <mtd></mtd> <mtd> <mi></mi> <mo>&#x2248;<!-- ≈ --></mo> <mn>1</mn> <mo>&#x2212;<!-- − --></mo> <msup> <mrow> <mo>(</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <mi>d</mi> <mo>&#x2212;<!-- − --></mo> <mn>1</mn> </mrow> <mi>d</mi> </mfrac> </mrow> <mo>)</mo> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <mi>n</mi> <mo stretchy="false">(</mo> <mi>n</mi> <mo>&#x2212;<!-- − --></mo> <mn>1</mn> <mo stretchy="false">)</mo> </mrow> <mn>2</mn> </mfrac> </mrow> </msup> </mtd> </mtr> </mtable> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle {\begin{aligned}p(n;d)&amp;={\begin{cases}1-\displaystyle \prod _{k=1}^{n-1}\left(1-{\frac {k}{d}}\right)&amp;n\leq d\\1&amp;n&gt;d\end{cases}}\\[8px]&amp;\approx 1-e^{-{\frac {n(n-1)}{2d}}}\\&amp;\approx 1-\left({\frac {d-1}{d}}\right)^{\frac {n(n-1)}{2}}\end{aligned}}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/85e10a5ef850209f4f2010865e273fc0ce51d35b" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -11.671ex; width:38.275ex; height:24.509ex;" alt="{\displaystyle {\begin{aligned}p(n;d)&amp;={\begin{cases}1-\displaystyle \prod _{k=1}^{n-1}\left(1-{\frac {k}{d}}\right)&amp;n\leq d\\1&amp;n&gt;d\end{cases}}\\[8px]&amp;\approx 1-e^{-{\frac {n(n-1)}{2d}}}\\&amp;\approx 1-\left({\frac {d-1}{d}}\right)^{\frac {n(n-1)}{2}}\end{aligned}}}" /></span></dd></dl> <p>Conversely, if <span class="texhtml"><i>n</i>(<i>p</i>; <i>d</i>)</span> denotes the number of random integers drawn from <span class="texhtml">[1,<i>d</i>]</span> to obtain a probability <span class="texhtml mvar" style="font-style:italic;">p</span> that at least two numbers are the same, then </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle n(p;d)\approx {\sqrt {2d\cdot \ln \left({\frac {1}{1-p}}\right)}}.}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>n</mi> <mo stretchy="false">(</mo> <mi>p</mi> <mo>;</mo> <mi>d</mi> <mo stretchy="false">)</mo> <mo>&#x2248;<!-- ≈ --></mo> <mrow class="MJX-TeXAtom-ORD"> <msqrt> <mn>2</mn> <mi>d</mi> <mo>&#x22c5;<!-- ⋅ --></mo> <mi>ln</mi> <mo>&#x2061;<!-- ⁡ --></mo> <mrow> <mo>(</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mn>1</mn> <mrow> <mn>1</mn> <mo>&#x2212;<!-- − --></mo> <mi>p</mi> </mrow> </mfrac> </mrow> <mo>)</mo> </mrow> </msqrt> </mrow> <mo>.</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle n(p;d)\approx {\sqrt {2d\cdot \ln \left({\frac {1}{1-p}}\right)}}.}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/829452a9865564f9c8918e5316099069dbc913dd" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -3.171ex; width:28.119ex; height:7.509ex;" alt="{\displaystyle n(p;d)\approx {\sqrt {2d\cdot \ln \left({\frac {1}{1-p}}\right)}}.}" /></span></dd></dl> <p>The birthday problem in this more generic sense applies to <a href="/wiki/Hash_function" title="Hash function">hash functions</a>: the expected number of <span class="texhtml"><i>N</i></span>-<a href="/wiki/Bit" title="Bit">bit</a> hashes that can be generated before getting a collision is not <span class="texhtml">2<sup><i>N</i></sup></span>, but rather only <span class="texhtml">2<sup><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1154941027" /><span class="frac"><span class="num"><i>N</i></span>&#8260;<span class="den">2</span></span></sup></span>. This is exploited by <a href="/wiki/Birthday_attack" title="Birthday attack">birthday attacks</a> on <a href="/wiki/Cryptographic_hash_function" title="Cryptographic hash function">cryptographic hash functions</a> and is the reason why a small number of collisions in a <a href="/wiki/Hash_table" title="Hash table">hash table</a> are, for all practical purposes, inevitable. </p><p>The theory behind the birthday problem was used by Zoe Schnabel<sup id="cite_ref-19" class="reference"><a href="#cite_note-19"><span class="cite-bracket">&#91;</span>18<span class="cite-bracket">&#93;</span></a></sup> under the name of <a href="/wiki/Mark_and_recapture" title="Mark and recapture">capture-recapture</a> statistics to estimate the size of fish population in lakes. The birthday problem and its generalizations are also useful tools for modelling coincidences.<sup id="cite_ref-Pollanen_20-0" class="reference"><a href="#cite_note-Pollanen-20"><span class="cite-bracket">&#91;</span>19<span class="cite-bracket">&#93;</span></a></sup> </p> <div class="mw-heading mw-heading4"><h4 id="Probability_of_a_unique_collision">Probability of a unique collision</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Birthday_problem&amp;action=edit&amp;section=14" title="Edit section: Probability of a unique collision"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>The classic birthday problem allows for more than two people to share a particular birthday or for there to be matches on multiple days. The probability that among <span class="texhtml mvar" style="font-style:italic;">n</span> people there is exactly one pair of individuals with a matching birthday given <span class="texhtml mvar" style="font-style:italic;">d</span> possible days is<sup id="cite_ref-Pollanen_20-1" class="reference"><a href="#cite_note-Pollanen-20"><span class="cite-bracket">&#91;</span>19<span class="cite-bracket">&#93;</span></a></sup> </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle p_{2}(n;d)={\frac {n \choose 2}{d-n+1}}(1-p(n;d))}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>p</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msub> <mo stretchy="false">(</mo> <mi>n</mi> <mo>;</mo> <mi>d</mi> <mo stretchy="false">)</mo> <mo>=</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <mrow class="MJX-TeXAtom-OPEN"> <mo maxsize="1.2em" minsize="1.2em">(</mo> </mrow> <mfrac linethickness="0"> <mi>n</mi> <mn>2</mn> </mfrac> <mrow class="MJX-TeXAtom-CLOSE"> <mo maxsize="1.2em" minsize="1.2em">)</mo> </mrow> </mrow> <mrow> <mi>d</mi> <mo>&#x2212;<!-- − --></mo> <mi>n</mi> <mo>+</mo> <mn>1</mn> </mrow> </mfrac> </mrow> <mo stretchy="false">(</mo> <mn>1</mn> <mo>&#x2212;<!-- − --></mo> <mi>p</mi> <mo stretchy="false">(</mo> <mi>n</mi> <mo>;</mo> <mi>d</mi> <mo stretchy="false">)</mo> <mo stretchy="false">)</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle p_{2}(n;d)={\frac {n \choose 2}{d-n+1}}(1-p(n;d))}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/3d2d7ac231d3467dbfd708946e0f8e63cec69d2e" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -2.171ex; margin-left: -0.089ex; width:33.591ex; height:6.343ex;" alt="{\displaystyle p_{2}(n;d)={\frac {n \choose 2}{d-n+1}}(1-p(n;d))}" /></span></dd></dl> <p>Unlike the standard birthday problem, as <span class="texhtml mvar" style="font-style:italic;">n</span> increases the probability reaches a maximum value before decreasing. For example, for <span class="texhtml"><i>d</i> = 365</span>, the probability of a unique match has a maximum value of 0.3864 occurring when <span class="texhtml"><i>n</i> = 28</span>. </p> <div class="mw-heading mw-heading4"><h4 id="Generalization_to_multiple_types_of_people">Generalization to multiple types of people</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Birthday_problem&amp;action=edit&amp;section=15" title="Edit section: Generalization to multiple types of people"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <figure class="mw-default-size" typeof="mw:File/Thumb"><a href="/wiki/File:2d_birthday.png" class="mw-file-description"><img src="//upload.wikimedia.org/wikipedia/commons/thumb/a/a1/2d_birthday.png/220px-2d_birthday.png" decoding="async" width="220" height="154" class="mw-file-element" srcset="//upload.wikimedia.org/wikipedia/commons/thumb/a/a1/2d_birthday.png/330px-2d_birthday.png 1.5x, //upload.wikimedia.org/wikipedia/commons/thumb/a/a1/2d_birthday.png/440px-2d_birthday.png 2x" data-file-width="915" data-file-height="642" /></a><figcaption>Plot of the probability of at least one shared birthday between at least one man and one woman</figcaption></figure> <p>The basic problem considers all trials to be of one "type". The birthday problem has been generalized to consider an arbitrary number of types.<sup id="cite_ref-21" class="reference"><a href="#cite_note-21"><span class="cite-bracket">&#91;</span>20<span class="cite-bracket">&#93;</span></a></sup> In the simplest extension there are two types of people, say <span class="texhtml mvar" style="font-style:italic;">m</span> men and <span class="texhtml mvar" style="font-style:italic;">n</span> women, and the problem becomes characterizing the probability of a shared birthday between at least one man and one woman. (Shared birthdays between two men or two women do not count.) The probability of no shared birthdays here is </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle p_{0}={\frac {1}{d^{m+n}}}\sum _{i=1}^{m}\sum _{j=1}^{n}S_{2}(m,i)S_{2}(n,j)\prod _{k=0}^{i+j-1}d-k}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>p</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>0</mn> </mrow> </msub> <mo>=</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mn>1</mn> <msup> <mi>d</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>m</mi> <mo>+</mo> <mi>n</mi> </mrow> </msup> </mfrac> </mrow> <munderover> <mo>&#x2211;<!-- ∑ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> <mo>=</mo> <mn>1</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>m</mi> </mrow> </munderover> <munderover> <mo>&#x2211;<!-- ∑ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mi>j</mi> <mo>=</mo> <mn>1</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> </mrow> </munderover> <msub> <mi>S</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msub> <mo stretchy="false">(</mo> <mi>m</mi> <mo>,</mo> <mi>i</mi> <mo stretchy="false">)</mo> <msub> <mi>S</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msub> <mo stretchy="false">(</mo> <mi>n</mi> <mo>,</mo> <mi>j</mi> <mo stretchy="false">)</mo> <munderover> <mo>&#x220f;<!-- ∏ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> <mo>=</mo> <mn>0</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> <mo>+</mo> <mi>j</mi> <mo>&#x2212;<!-- − --></mo> <mn>1</mn> </mrow> </munderover> <mi>d</mi> <mo>&#x2212;<!-- − --></mo> <mi>k</mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle p_{0}={\frac {1}{d^{m+n}}}\sum _{i=1}^{m}\sum _{j=1}^{n}S_{2}(m,i)S_{2}(n,j)\prod _{k=0}^{i+j-1}d-k}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/d8e89f3aef118c3ea0df824afb46eedda6869acc" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -3.338ex; margin-left: -0.089ex; width:45.783ex; height:7.676ex;" alt="{\displaystyle p_{0}={\frac {1}{d^{m+n}}}\sum _{i=1}^{m}\sum _{j=1}^{n}S_{2}(m,i)S_{2}(n,j)\prod _{k=0}^{i+j-1}d-k}" /></span></dd></dl> <p>where <span class="texhtml"><i>d</i> = 365</span> and <span class="texhtml"><i>S</i><sub>2</sub></span> are <a href="/wiki/Stirling_numbers_of_the_second_kind" title="Stirling numbers of the second kind">Stirling numbers of the second kind</a>. Consequently, the desired probability is <span class="texhtml">1 − <i>p</i><sub>0</sub></span>. </p><p>This variation of the birthday problem is interesting because there is not a unique solution for the total number of people <span class="texhtml"><i>m</i> + <i>n</i></span>. For example, the usual 50% probability value is realized for both a 32-member group of 16 men and 16 women and a 49-member group of 43 women and 6 men. </p> <div class="mw-heading mw-heading2"><h2 id="Other_birthday_problems">Other birthday problems</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Birthday_problem&amp;action=edit&amp;section=16" title="Edit section: Other birthday problems"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <div class="mw-heading mw-heading3"><h3 id="First_match">First match</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Birthday_problem&amp;action=edit&amp;section=17" title="Edit section: First match"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>A related question is, as people enter a room one at a time, which one is most likely to be the first to have the same birthday as someone already in the room? That is, for what <span class="texhtml mvar" style="font-style:italic;">n</span> is <span class="texhtml"><i>p</i>(<i>n</i>) − <i>p</i>(<i>n</i>&#160;−&#160;1)</span> maximum? The answer is 20—if there is a prize for first match, the best position in line is 20th.<sup class="noprint Inline-Template Template-Fact" style="white-space:nowrap;">&#91;<i><a href="/wiki/Wikipedia:Citation_needed" title="Wikipedia:Citation needed"><span title="This claim needs references to reliable sources. (September 2019)">citation needed</span></a></i>&#93;</sup> </p> <div class="mw-heading mw-heading3"><h3 id="Same_birthday_as_you">Same birthday as you</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Birthday_problem&amp;action=edit&amp;section=18" title="Edit section: Same birthday as you"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <figure class="mw-default-size mw-halign-right" typeof="mw:File/Thumb"><a href="/wiki/File:Birthday_paradox.svg" class="mw-file-description"><img src="//upload.wikimedia.org/wikipedia/commons/thumb/9/9f/Birthday_paradox.svg/310px-Birthday_paradox.svg.png" decoding="async" width="310" height="157" class="mw-file-element" srcset="//upload.wikimedia.org/wikipedia/commons/thumb/9/9f/Birthday_paradox.svg/465px-Birthday_paradox.svg.png 1.5x, //upload.wikimedia.org/wikipedia/commons/thumb/9/9f/Birthday_paradox.svg/620px-Birthday_paradox.svg.png 2x" data-file-width="575" data-file-height="291" /></a><figcaption>Comparing <span class="texhtml"><i>p</i>(<i>n</i>)</span> = probability of a birthday match with <span class="texhtml"><i>q</i>(<i>n</i>)</span> = probability of matching <i>your</i> birthday</figcaption></figure> <p>In the birthday problem, neither of the two people is chosen in advance. By contrast, the probability <span class="texhtml"><i>q</i>(<i>n</i>)</span> that <i>at least one other person</i> in a room of <span class="texhtml mvar" style="font-style:italic;">n</span> other people has the same birthday as a <i>particular</i> person (for example, you) is given by </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle q(n)=1-\left({\frac {365-1}{365}}\right)^{n}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>q</mi> <mo stretchy="false">(</mo> <mi>n</mi> <mo stretchy="false">)</mo> <mo>=</mo> <mn>1</mn> <mo>&#x2212;<!-- − --></mo> <msup> <mrow> <mo>(</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <mn>365</mn> <mo>&#x2212;<!-- − --></mo> <mn>1</mn> </mrow> <mn>365</mn> </mfrac> </mrow> <mo>)</mo> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> </mrow> </msup> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle q(n)=1-\left({\frac {365-1}{365}}\right)^{n}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/862a88ac6f761e58c4234ebd987d5496dad56104" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -2.505ex; width:24.341ex; height:6.176ex;" alt="{\displaystyle q(n)=1-\left({\frac {365-1}{365}}\right)^{n}}" /></span></dd></dl> <p>and for general <span class="texhtml mvar" style="font-style:italic;">d</span> by </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle q(n;d)=1-\left({\frac {d-1}{d}}\right)^{n}.}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>q</mi> <mo stretchy="false">(</mo> <mi>n</mi> <mo>;</mo> <mi>d</mi> <mo stretchy="false">)</mo> <mo>=</mo> <mn>1</mn> <mo>&#x2212;<!-- − --></mo> <msup> <mrow> <mo>(</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <mi>d</mi> <mo>&#x2212;<!-- − --></mo> <mn>1</mn> </mrow> <mi>d</mi> </mfrac> </mrow> <mo>)</mo> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> </mrow> </msup> <mo>.</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle q(n;d)=1-\left({\frac {d-1}{d}}\right)^{n}.}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/9caa862e83c614d6ede9746b71bd0411370c9eab" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -2.505ex; width:24.966ex; height:6.176ex;" alt="{\displaystyle q(n;d)=1-\left({\frac {d-1}{d}}\right)^{n}.}" /></span></dd></dl> <p>In the standard case of <span class="texhtml"><i>d</i> = 365</span>, substituting <span class="texhtml"><i>n</i> = 23</span> gives about 6.1%, which is less than 1 chance in 16. For a greater than 50% chance that <i>at least</i> one other person in a roomful of <span class="texhtml mvar" style="font-style:italic;">n</span> people has the same birthday as <i>you</i>, <span class="texhtml mvar" style="font-style:italic;">n</span> would need to be at least 253. This number is significantly higher than <span class="texhtml"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035" /><span class="sfrac">&#8288;<span class="tion"><span class="num">365</span><span class="sr-only">/</span><span class="den">2</span></span>&#8288;</span> = 182.5</span>: the reason is that it is likely that there are some birthday matches among the other people in the room. </p> <div class="mw-heading mw-heading3"><h3 id="Number_of_people_with_a_shared_birthday">Number of people with a shared birthday</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Birthday_problem&amp;action=edit&amp;section=19" title="Edit section: Number of people with a shared birthday"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>For any one person in a group of <i>n</i> people the probability that he or she shares his birthday with someone else is <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle q(n-1;d)}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>q</mi> <mo stretchy="false">(</mo> <mi>n</mi> <mo>&#x2212;<!-- − --></mo> <mn>1</mn> <mo>;</mo> <mi>d</mi> <mo stretchy="false">)</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle q(n-1;d)}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/e8e7eb5f9b1849ba7a61903ebc8ad5dfe3abb650" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:10.526ex; height:2.843ex;" alt="{\displaystyle q(n-1;d)}" /></span>, as explained above. The expected number of people with a shared (non-unique) birthday can now be calculated easily by multiplying that probability by the number of people (<i>n</i>), so it is: </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle n\left(1-\left({\frac {d-1}{d}}\right)^{n-1}\right)}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>n</mi> <mrow> <mo>(</mo> <mrow> <mn>1</mn> <mo>&#x2212;<!-- − --></mo> <msup> <mrow> <mo>(</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <mi>d</mi> <mo>&#x2212;<!-- − --></mo> <mn>1</mn> </mrow> <mi>d</mi> </mfrac> </mrow> <mo>)</mo> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> <mo>&#x2212;<!-- − --></mo> <mn>1</mn> </mrow> </msup> </mrow> <mo>)</mo> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle n\left(1-\left({\frac {d-1}{d}}\right)^{n-1}\right)}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/09fb6f1ce193a3c6ec5bdb0ec8c110a568873099" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -3.171ex; width:22.261ex; height:7.509ex;" alt="{\displaystyle n\left(1-\left({\frac {d-1}{d}}\right)^{n-1}\right)}" /></span></dd></dl> <p>(This multiplication can be done this way because of the linearity of the <a href="/wiki/Expected_value" title="Expected value">expected value</a> of indicator variables). This implies that the expected number of people with a non-shared (unique) birthday is: </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle n\left({\frac {d-1}{d}}\right)^{n-1}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>n</mi> <msup> <mrow> <mo>(</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <mi>d</mi> <mo>&#x2212;<!-- − --></mo> <mn>1</mn> </mrow> <mi>d</mi> </mfrac> </mrow> <mo>)</mo> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> <mo>&#x2212;<!-- − --></mo> <mn>1</mn> </mrow> </msup> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle n\left({\frac {d-1}{d}}\right)^{n-1}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/31d77ae808ca08645fd81e73a4ce21bef5a74a6e" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -2.505ex; width:14.19ex; height:6.509ex;" alt="{\displaystyle n\left({\frac {d-1}{d}}\right)^{n-1}}" /></span></dd></dl> <p>Similar formulas can be derived for the expected number of people who share with three, four, etc. other people. </p> <div class="mw-heading mw-heading3"><h3 id="Number_of_people_until_every_birthday_is_achieved">Number of people until every birthday is achieved</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Birthday_problem&amp;action=edit&amp;section=20" title="Edit section: Number of people until every birthday is achieved"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>The expected number of people needed until every birthday is achieved is called the <a href="/wiki/Coupon_collector%27s_problem" title="Coupon collector&#39;s problem">Coupon collector's problem</a>. It can be calculated by <span class="texhtml"><i>nH<sub>n</sub></i></span>, where <span class="texhtml"><i>H<sub>n</sub></i></span> is the <span class="texhtml mvar" style="font-style:italic;">n</span>th <a href="/wiki/Harmonic_number" title="Harmonic number">harmonic number</a>. For 365 possible dates (the birthday problem), the answer is 2365. </p> <div class="mw-heading mw-heading3"><h3 id="Near_matches">Near matches</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Birthday_problem&amp;action=edit&amp;section=21" title="Edit section: Near matches"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Another generalization is to ask for the probability of finding at least one pair in a group of <span class="texhtml mvar" style="font-style:italic;">n</span> people with birthdays within <span class="texhtml mvar" style="font-style:italic;">k</span> calendar days of each other, if there are <span class="texhtml mvar" style="font-style:italic;">d</span> equally likely birthdays.<sup id="cite_ref-abramson_22-0" class="reference"><a href="#cite_note-abramson-22"><span class="cite-bracket">&#91;</span>21<span class="cite-bracket">&#93;</span></a></sup> </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\begin{aligned}p(n,k,d)&amp;=1-{\frac {(d-nk-1)!}{d^{n-1}{\bigl (}d-n(k+1){\bigr )}!}}\end{aligned}}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow class="MJX-TeXAtom-ORD"> <mtable columnalign="right left right left right left right left right left right left" rowspacing="3pt" columnspacing="0em 2em 0em 2em 0em 2em 0em 2em 0em 2em 0em" displaystyle="true"> <mtr> <mtd> <mi>p</mi> <mo stretchy="false">(</mo> <mi>n</mi> <mo>,</mo> <mi>k</mi> <mo>,</mo> <mi>d</mi> <mo stretchy="false">)</mo> </mtd> <mtd> <mi></mi> <mo>=</mo> <mn>1</mn> <mo>&#x2212;<!-- − --></mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <mo stretchy="false">(</mo> <mi>d</mi> <mo>&#x2212;<!-- − --></mo> <mi>n</mi> <mi>k</mi> <mo>&#x2212;<!-- − --></mo> <mn>1</mn> <mo stretchy="false">)</mo> <mo>!</mo> </mrow> <mrow> <msup> <mi>d</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> <mo>&#x2212;<!-- − --></mo> <mn>1</mn> </mrow> </msup> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-OPEN"> <mo maxsize="1.2em" minsize="1.2em">(</mo> </mrow> </mrow> <mi>d</mi> <mo>&#x2212;<!-- − --></mo> <mi>n</mi> <mo stretchy="false">(</mo> <mi>k</mi> <mo>+</mo> <mn>1</mn> <mo stretchy="false">)</mo> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-CLOSE"> <mo maxsize="1.2em" minsize="1.2em">)</mo> </mrow> </mrow> <mo>!</mo> </mrow> </mfrac> </mrow> </mtd> </mtr> </mtable> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle {\begin{aligned}p(n,k,d)&amp;=1-{\frac {(d-nk-1)!}{d^{n-1}{\bigl (}d-n(k+1){\bigr )}!}}\end{aligned}}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/c2d5f640eec4e46c0b1ab2560a8e217b3a88a327" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -2.838ex; width:37.345ex; height:6.843ex;" alt="{\displaystyle {\begin{aligned}p(n,k,d)&amp;=1-{\frac {(d-nk-1)!}{d^{n-1}{\bigl (}d-n(k+1){\bigr )}!}}\end{aligned}}}" /></span></dd></dl> <p>The number of people required so that the probability that some pair will have a birthday separated by <span class="texhtml mvar" style="font-style:italic;">k</span> days or fewer will be higher than 50% is given in the following table: </p> <dl><dd><table class="wikitable" style="text-align: center"> <tbody><tr> <th><span class="texhtml mvar" style="font-style:italic;"><i>k</i></span></th> <th><span class="texhtml mvar" style="font-style:italic;">n</span><br />for <span class="texhtml"><i>d</i> = 365</span> </th></tr> <tr> <td>0</td> <td>23 </td></tr> <tr> <td>1</td> <td>14 </td></tr> <tr> <td>2</td> <td>11 </td></tr> <tr> <td>3</td> <td>9 </td></tr> <tr> <td>4</td> <td>8 </td></tr> <tr> <td>5</td> <td>8 </td></tr> <tr> <td>6</td> <td>7 </td></tr> <tr> <td>7</td> <td>7 </td></tr></tbody></table></dd></dl> <p>Thus in a group of just seven random people, it is more likely than not that two of them will have a birthday within a week of each other.<sup id="cite_ref-abramson_22-1" class="reference"><a href="#cite_note-abramson-22"><span class="cite-bracket">&#91;</span>21<span class="cite-bracket">&#93;</span></a></sup> </p> <div class="mw-heading mw-heading3"><h3 id="Number_of_days_with_a_certain_number_of_birthdays">Number of days with a certain number of birthdays</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Birthday_problem&amp;action=edit&amp;section=22" title="Edit section: Number of days with a certain number of birthdays"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <div class="mw-heading mw-heading4"><h4 id="Number_of_days_with_at_least_one_birthday">Number of days with at least one birthday</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Birthday_problem&amp;action=edit&amp;section=23" title="Edit section: Number of days with at least one birthday"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>The expected number of different birthdays, i.e. the number of days that are at least one person's birthday, is: </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle d-d\left({\frac {d-1}{d}}\right)^{n}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>d</mi> <mo>&#x2212;<!-- − --></mo> <mi>d</mi> <msup> <mrow> <mo>(</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <mi>d</mi> <mo>&#x2212;<!-- − --></mo> <mn>1</mn> </mrow> <mi>d</mi> </mfrac> </mrow> <mo>)</mo> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> </mrow> </msup> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle d-d\left({\frac {d-1}{d}}\right)^{n}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/dc6b7217a6040a657390a5bc95e7212e6637dcb2" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -2.505ex; width:15.967ex; height:6.176ex;" alt="{\displaystyle d-d\left({\frac {d-1}{d}}\right)^{n}}" /></span></dd></dl> <p>This follows from the expected number of days that are no one's birthday: </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle d\left({\frac {d-1}{d}}\right)^{n}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>d</mi> <msup> <mrow> <mo>(</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <mi>d</mi> <mo>&#x2212;<!-- − --></mo> <mn>1</mn> </mrow> <mi>d</mi> </mfrac> </mrow> <mo>)</mo> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> </mrow> </msup> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle d\left({\frac {d-1}{d}}\right)^{n}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/43e5d69466ab4c228c9375fa6b925870fcc1b338" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -2.505ex; width:11.91ex; height:6.176ex;" alt="{\displaystyle d\left({\frac {d-1}{d}}\right)^{n}}" /></span></dd></dl> <p>which follows from the probability that a particular day is no one's birthday, <span class="texhtml"><span style="font-size:150%;">(</span><span class="nowrap" style="padding-left:0.1em; padding-right:0.1em;"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035" /><span class="sfrac">&#8288;<span class="tion"><span class="num"><i>d</i> − 1</span><span class="sr-only">/</span><span class="den"><i>d</i></span></span>&#8288;</span></span><span style="font-size:150%;">)</span><span class="nowrap"><span style="display:inline-block;margin-bottom:-0.3em;vertical-align:-0.4em;line-height:1.2em;font-size:80%;text-align:left"><sup style="font-size:inherit;line-height:inherit;vertical-align:baseline"><i>n</i></sup><br /><sub style="font-size:inherit;line-height:inherit;vertical-align:baseline">&#160;</sub></span></span></span>, easily summed because of the linearity of the expected value. </p><p>For instance, with <span class="texhtml"><var style="padding-right: 1px;">d</var> = 365</span>, you should expect about 21 different birthdays when there are 22 people, or 46 different birthdays when there are 50 people. When there are 1000 people, there will be around 341 different birthdays (24 unclaimed birthdays). </p> <div class="mw-heading mw-heading4"><h4 id="Number_of_days_with_at_least_two_birthdays">Number of days with at least two birthdays</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Birthday_problem&amp;action=edit&amp;section=24" title="Edit section: Number of days with at least two birthdays"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>The above can be generalized from the distribution of the number of people with their birthday on any particular day, which is a <a href="/wiki/Binomial_distribution" title="Binomial distribution">Binomial distribution</a> with probability <span class="texhtml"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035" /><span class="sfrac">&#8288;<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den"><i>d</i></span></span>&#8288;</span></span>. Multiplying the relevant probability by <span class="texhtml mvar" style="font-style:italic;">d</span> will then give the expected number of days. For example, the expected number of days which are shared; i.e. which are at least two (i.e. not zero and not one) people's birthday is: </p><p><span class="mwe-math-element"><span class="mwe-math-mathml-display mwe-math-mathml-a11y" style="display: none;"><math display="block" xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle d-d\left({\frac {d-1}{d}}\right)^{n}-d\cdot {\binom {n}{1}}\left({\frac {1}{d}}\right)^{1}\left({\frac {d-1}{d}}\right)^{n-1}=d-d\left({\frac {d-1}{d}}\right)^{n}-n\left({\frac {d-1}{d}}\right)^{n-1}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>d</mi> <mo>&#x2212;<!-- − --></mo> <mi>d</mi> <msup> <mrow> <mo>(</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <mi>d</mi> <mo>&#x2212;<!-- − --></mo> <mn>1</mn> </mrow> <mi>d</mi> </mfrac> </mrow> <mo>)</mo> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> </mrow> </msup> <mo>&#x2212;<!-- − --></mo> <mi>d</mi> <mo>&#x22c5;<!-- ⋅ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mrow> <mrow class="MJX-TeXAtom-OPEN"> <mo maxsize="2.047em" minsize="2.047em">(</mo> </mrow> <mfrac linethickness="0"> <mi>n</mi> <mn>1</mn> </mfrac> <mrow class="MJX-TeXAtom-CLOSE"> <mo maxsize="2.047em" minsize="2.047em">)</mo> </mrow> </mrow> </mrow> <msup> <mrow> <mo>(</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mn>1</mn> <mi>d</mi> </mfrac> </mrow> <mo>)</mo> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msup> <msup> <mrow> <mo>(</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <mi>d</mi> <mo>&#x2212;<!-- − --></mo> <mn>1</mn> </mrow> <mi>d</mi> </mfrac> </mrow> <mo>)</mo> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> <mo>&#x2212;<!-- − --></mo> <mn>1</mn> </mrow> </msup> <mo>=</mo> <mi>d</mi> <mo>&#x2212;<!-- − --></mo> <mi>d</mi> <msup> <mrow> <mo>(</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <mi>d</mi> <mo>&#x2212;<!-- − --></mo> <mn>1</mn> </mrow> <mi>d</mi> </mfrac> </mrow> <mo>)</mo> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> </mrow> </msup> <mo>&#x2212;<!-- − --></mo> <mi>n</mi> <msup> <mrow> <mo>(</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <mi>d</mi> <mo>&#x2212;<!-- − --></mo> <mn>1</mn> </mrow> <mi>d</mi> </mfrac> </mrow> <mo>)</mo> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> <mo>&#x2212;<!-- − --></mo> <mn>1</mn> </mrow> </msup> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle d-d\left({\frac {d-1}{d}}\right)^{n}-d\cdot {\binom {n}{1}}\left({\frac {1}{d}}\right)^{1}\left({\frac {d-1}{d}}\right)^{n-1}=d-d\left({\frac {d-1}{d}}\right)^{n}-n\left({\frac {d-1}{d}}\right)^{n-1}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/faf970814a849410522f8922740208e70c07be9b" class="mwe-math-fallback-image-display mw-invert skin-invert" aria-hidden="true" style="vertical-align: -2.505ex; width:81.936ex; height:6.509ex;" alt="{\displaystyle d-d\left({\frac {d-1}{d}}\right)^{n}-d\cdot {\binom {n}{1}}\left({\frac {1}{d}}\right)^{1}\left({\frac {d-1}{d}}\right)^{n-1}=d-d\left({\frac {d-1}{d}}\right)^{n}-n\left({\frac {d-1}{d}}\right)^{n-1}}" /></span> </p> <div class="mw-heading mw-heading3"><h3 id="Number_of_people_who_repeat_a_birthday">Number of people who repeat a birthday</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Birthday_problem&amp;action=edit&amp;section=25" title="Edit section: Number of people who repeat a birthday"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>The probability that the <span class="texhtml mvar" style="font-style:italic;">k</span>th integer randomly chosen from <span class="texhtml">[1,<i>d</i>]</span> will repeat at least one previous choice equals <span class="texhtml"><i>q</i>(<i>k</i> − 1; <i>d</i>)</span> above. The expected total number of times a selection will repeat a previous selection as <span class="texhtml mvar" style="font-style:italic;">n</span> such integers are chosen equals<sup id="cite_ref-23" class="reference"><a href="#cite_note-23"><span class="cite-bracket">&#91;</span>22<span class="cite-bracket">&#93;</span></a></sup> </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \sum _{k=1}^{n}q(k-1;d)=n-d+d\left({\frac {d-1}{d}}\right)^{n}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <munderover> <mo>&#x2211;<!-- ∑ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> <mo>=</mo> <mn>1</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> </mrow> </munderover> <mi>q</mi> <mo stretchy="false">(</mo> <mi>k</mi> <mo>&#x2212;<!-- − --></mo> <mn>1</mn> <mo>;</mo> <mi>d</mi> <mo stretchy="false">)</mo> <mo>=</mo> <mi>n</mi> <mo>&#x2212;<!-- − --></mo> <mi>d</mi> <mo>+</mo> <mi>d</mi> <msup> <mrow> <mo>(</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <mi>d</mi> <mo>&#x2212;<!-- − --></mo> <mn>1</mn> </mrow> <mi>d</mi> </mfrac> </mrow> <mo>)</mo> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> </mrow> </msup> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \sum _{k=1}^{n}q(k-1;d)=n-d+d\left({\frac {d-1}{d}}\right)^{n}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/e47bd925574af31a885fb12068ac3f66f953d76f" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -3.005ex; width:37.385ex; height:6.843ex;" alt="{\displaystyle \sum _{k=1}^{n}q(k-1;d)=n-d+d\left({\frac {d-1}{d}}\right)^{n}}" /></span></dd></dl> <p>This can be seen to equal the number of people minus the expected number of different birthdays. </p> <div class="mw-heading mw-heading3"><h3 id="Average_number_of_people_to_get_at_least_one_shared_birthday">Average number of people to get at least one shared birthday</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Birthday_problem&amp;action=edit&amp;section=26" title="Edit section: Average number of people to get at least one shared birthday"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>In an alternative formulation of the birthday problem, one asks the <i>average</i> number of people required to find a pair with the same birthday. If we consider the probability function Pr[<span class="texhtml mvar" style="font-style:italic;">n</span> people have at least one shared birthday], this <i>average</i> is determining the <a href="/wiki/Mean" title="Mean">mean</a> of the distribution, as opposed to the customary formulation, which asks for the <a href="/wiki/Median" title="Median">median</a>. The problem is relevant to several <a href="/wiki/Hash_function" title="Hash function">hashing algorithms</a> analyzed by <a href="/wiki/Donald_Knuth" title="Donald Knuth">Donald Knuth</a> in his book <i><a href="/wiki/The_Art_of_Computer_Programming" title="The Art of Computer Programming">The Art of Computer Programming</a></i>. It may be shown<sup id="cite_ref-knuth73_24-0" class="reference"><a href="#cite_note-knuth73-24"><span class="cite-bracket">&#91;</span>23<span class="cite-bracket">&#93;</span></a></sup><sup id="cite_ref-flajolet95_25-0" class="reference"><a href="#cite_note-flajolet95-25"><span class="cite-bracket">&#91;</span>24<span class="cite-bracket">&#93;</span></a></sup> that if one samples uniformly, with replacement, from a population of size <span class="texhtml"><i>M</i></span>, the number of trials required for the first repeated sampling of <i>some</i> individual has <a href="/wiki/Expected_value" title="Expected value">expected value</a> <span class="texhtml"><span style="text-decoration:overline;"><i>n</i></span> = 1 + <i>Q</i>(<i>M</i>)</span>, where </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle Q(M)=\sum _{k=1}^{M}{\frac {M!}{(M-k)!M^{k}}}.}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>Q</mi> <mo stretchy="false">(</mo> <mi>M</mi> <mo stretchy="false">)</mo> <mo>=</mo> <munderover> <mo>&#x2211;<!-- ∑ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> <mo>=</mo> <mn>1</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>M</mi> </mrow> </munderover> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <mi>M</mi> <mo>!</mo> </mrow> <mrow> <mo stretchy="false">(</mo> <mi>M</mi> <mo>&#x2212;<!-- − --></mo> <mi>k</mi> <mo stretchy="false">)</mo> <mo>!</mo> <msup> <mi>M</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> </mrow> </msup> </mrow> </mfrac> </mrow> <mo>.</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle Q(M)=\sum _{k=1}^{M}{\frac {M!}{(M-k)!M^{k}}}.}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/0dda887b3009cd3f825db80878f23827258bb725" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -3.005ex; width:26.951ex; height:7.343ex;" alt="{\displaystyle Q(M)=\sum _{k=1}^{M}{\frac {M!}{(M-k)!M^{k}}}.}" /></span></dd></dl> <p>The function </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle Q(M)=1+{\frac {M-1}{M}}+{\frac {(M-1)(M-2)}{M^{2}}}+\cdots +{\frac {(M-1)(M-2)\cdots 1}{M^{M-1}}}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>Q</mi> <mo stretchy="false">(</mo> <mi>M</mi> <mo stretchy="false">)</mo> <mo>=</mo> <mn>1</mn> <mo>+</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <mi>M</mi> <mo>&#x2212;<!-- − --></mo> <mn>1</mn> </mrow> <mi>M</mi> </mfrac> </mrow> <mo>+</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <mo stretchy="false">(</mo> <mi>M</mi> <mo>&#x2212;<!-- − --></mo> <mn>1</mn> <mo stretchy="false">)</mo> <mo stretchy="false">(</mo> <mi>M</mi> <mo>&#x2212;<!-- − --></mo> <mn>2</mn> <mo stretchy="false">)</mo> </mrow> <msup> <mi>M</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msup> </mfrac> </mrow> <mo>+</mo> <mo>&#x22ef;<!-- ⋯ --></mo> <mo>+</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <mo stretchy="false">(</mo> <mi>M</mi> <mo>&#x2212;<!-- − --></mo> <mn>1</mn> <mo stretchy="false">)</mo> <mo stretchy="false">(</mo> <mi>M</mi> <mo>&#x2212;<!-- − --></mo> <mn>2</mn> <mo stretchy="false">)</mo> <mo>&#x22ef;<!-- ⋯ --></mo> <mn>1</mn> </mrow> <msup> <mi>M</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>M</mi> <mo>&#x2212;<!-- − --></mo> <mn>1</mn> </mrow> </msup> </mfrac> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle Q(M)=1+{\frac {M-1}{M}}+{\frac {(M-1)(M-2)}{M^{2}}}+\cdots +{\frac {(M-1)(M-2)\cdots 1}{M^{M-1}}}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/d2ea302bcbe68051335e63771b23947ba0b0eb18" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -2.171ex; width:71.066ex; height:6.009ex;" alt="{\displaystyle Q(M)=1+{\frac {M-1}{M}}+{\frac {(M-1)(M-2)}{M^{2}}}+\cdots +{\frac {(M-1)(M-2)\cdots 1}{M^{M-1}}}}" /></span></dd></dl> <p>has been studied by <a href="/wiki/Srinivasa_Ramanujan" title="Srinivasa Ramanujan">Srinivasa Ramanujan</a> and has <a href="/wiki/Asymptotic_expansion" title="Asymptotic expansion">asymptotic expansion</a>: </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle Q(M)\sim {\sqrt {\frac {\pi M}{2}}}-{\frac {1}{3}}+{\frac {1}{12}}{\sqrt {\frac {\pi }{2M}}}-{\frac {4}{135M}}+\cdots .}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>Q</mi> <mo stretchy="false">(</mo> <mi>M</mi> <mo stretchy="false">)</mo> <mo>&#x223c;<!-- ∼ --></mo> <mrow class="MJX-TeXAtom-ORD"> <msqrt> <mfrac> <mrow> <mi>&#x3c0;<!-- π --></mi> <mi>M</mi> </mrow> <mn>2</mn> </mfrac> </msqrt> </mrow> <mo>&#x2212;<!-- − --></mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mn>1</mn> <mn>3</mn> </mfrac> </mrow> <mo>+</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mn>1</mn> <mn>12</mn> </mfrac> </mrow> <mrow class="MJX-TeXAtom-ORD"> <msqrt> <mfrac> <mi>&#x3c0;<!-- π --></mi> <mrow> <mn>2</mn> <mi>M</mi> </mrow> </mfrac> </msqrt> </mrow> <mo>&#x2212;<!-- − --></mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mn>4</mn> <mrow> <mn>135</mn> <mi>M</mi> </mrow> </mfrac> </mrow> <mo>+</mo> <mo>&#x22ef;<!-- ⋯ --></mo> <mo>.</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle Q(M)\sim {\sqrt {\frac {\pi M}{2}}}-{\frac {1}{3}}+{\frac {1}{12}}{\sqrt {\frac {\pi }{2M}}}-{\frac {4}{135M}}+\cdots .}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/6e7fdb17c8c1d5c328a63fee87762e0494378e46" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -2.671ex; width:49.931ex; height:6.509ex;" alt="{\displaystyle Q(M)\sim {\sqrt {\frac {\pi M}{2}}}-{\frac {1}{3}}+{\frac {1}{12}}{\sqrt {\frac {\pi }{2M}}}-{\frac {4}{135M}}+\cdots .}" /></span></dd></dl> <p>With <span class="texhtml"><i>M</i> = 365</span> days in a year, the average number of people required to find a pair with the same birthday is <span class="texhtml"><span style="text-decoration:overline;"><i>n</i></span> = 1 + <i>Q</i>(<i>M</i>) ≈ 24.61659</span>, somewhat more than 23, the number required for a 50% chance. In the best case, two people will suffice; at worst, the maximum possible number of <span class="texhtml"><i>M</i> + 1 = 366</span> people is needed; but on average, only 25 people are required </p><p>An analysis using indicator random variables can provide a simpler but approximate analysis of this problem.<sup id="cite_ref-26" class="reference"><a href="#cite_note-26"><span class="cite-bracket">&#91;</span>25<span class="cite-bracket">&#93;</span></a></sup> For each pair (<i>i</i>, <i>j</i>) for k people in a room, we define the indicator random variable <i>X<sub>ij</sub></i>, for <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle 1\leq i\leq j\leq k}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mn>1</mn> <mo>&#x2264;<!-- ≤ --></mo> <mi>i</mi> <mo>&#x2264;<!-- ≤ --></mo> <mi>j</mi> <mo>&#x2264;<!-- ≤ --></mo> <mi>k</mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle 1\leq i\leq j\leq k}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/d842416cc2839dea2baa82259fe2c80086e5c650" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:13.43ex; height:2.509ex;" alt="{\displaystyle 1\leq i\leq j\leq k}" /></span>, by </p><p><span class="mwe-math-element"><span class="mwe-math-mathml-display mwe-math-mathml-a11y" style="display: none;"><math display="block" xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\begin{alignedat}{2}X_{ij}&amp;=I\{{\text{person }}i{\text{ and person }}j{\text{ have the same birthday}}\}\\[10pt]&amp;={\begin{cases}1,&amp;{\text{if person }}i{\text{ and person }}j{\text{ have the same birthday;}}\\0,&amp;{\text{otherwise.}}\end{cases}}\end{alignedat}}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow class="MJX-TeXAtom-ORD"> <mtable columnalign="right left right left" rowspacing="1.3em 0.3em" columnspacing="0em 0em 0em 0em" displaystyle="true"> <mtr> <mtd> <msub> <mi>X</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> <mi>j</mi> </mrow> </msub> </mtd> <mtd> <mi></mi> <mo>=</mo> <mi>I</mi> <mo fence="false" stretchy="false">{</mo> <mrow class="MJX-TeXAtom-ORD"> <mtext>person&#xa0;</mtext> </mrow> <mi>i</mi> <mrow class="MJX-TeXAtom-ORD"> <mtext>&#xa0;and person&#xa0;</mtext> </mrow> <mi>j</mi> <mrow class="MJX-TeXAtom-ORD"> <mtext>&#xa0;have the same birthday</mtext> </mrow> <mo fence="false" stretchy="false">}</mo> </mtd> </mtr> <mtr> <mtd></mtd> <mtd> <mi></mi> <mo>=</mo> <mrow class="MJX-TeXAtom-ORD"> <mrow> <mo>{</mo> <mtable columnalign="left left" rowspacing=".2em" columnspacing="1em" displaystyle="false"> <mtr> <mtd> <mn>1</mn> <mo>,</mo> </mtd> <mtd> <mrow class="MJX-TeXAtom-ORD"> <mtext>if person&#xa0;</mtext> </mrow> <mi>i</mi> <mrow class="MJX-TeXAtom-ORD"> <mtext>&#xa0;and person&#xa0;</mtext> </mrow> <mi>j</mi> <mrow class="MJX-TeXAtom-ORD"> <mtext>&#xa0;have the same birthday;</mtext> </mrow> </mtd> </mtr> <mtr> <mtd> <mn>0</mn> <mo>,</mo> </mtd> <mtd> <mrow class="MJX-TeXAtom-ORD"> <mtext>otherwise.</mtext> </mrow> </mtd> </mtr> </mtable> <mo fence="true" stretchy="true" symmetric="true"></mo> </mrow> </mrow> </mtd> </mtr> </mtable> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle {\begin{alignedat}{2}X_{ij}&amp;=I\{{\text{person }}i{\text{ and person }}j{\text{ have the same birthday}}\}\\[10pt]&amp;={\begin{cases}1,&amp;{\text{if person }}i{\text{ and person }}j{\text{ have the same birthday;}}\\0,&amp;{\text{otherwise.}}\end{cases}}\end{alignedat}}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/a46ca36a316dcaa896eb27ea485e183cfe67819e" class="mwe-math-fallback-image-display mw-invert skin-invert" aria-hidden="true" style="vertical-align: -5.171ex; width:61.555ex; height:11.509ex;" alt="{\displaystyle {\begin{alignedat}{2}X_{ij}&amp;=I\{{\text{person }}i{\text{ and person }}j{\text{ have the same birthday}}\}\\[10pt]&amp;={\begin{cases}1,&amp;{\text{if person }}i{\text{ and person }}j{\text{ have the same birthday;}}\\0,&amp;{\text{otherwise.}}\end{cases}}\end{alignedat}}}" /></span> </p><p><span class="mwe-math-element"><span class="mwe-math-mathml-display mwe-math-mathml-a11y" style="display: none;"><math display="block" xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\begin{alignedat}{2}E[X_{ij}]&amp;=\Pr\{{\text{person }}i{\text{ and person }}j{\text{ have the same birthday}}\}={\frac {1}{n}}.\end{alignedat}}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow class="MJX-TeXAtom-ORD"> <mtable columnalign="right left right left" rowspacing="3pt" columnspacing="0em 0em 0em 0em" displaystyle="true"> <mtr> <mtd> <mi>E</mi> <mo stretchy="false">[</mo> <msub> <mi>X</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> <mi>j</mi> </mrow> </msub> <mo stretchy="false">]</mo> </mtd> <mtd> <mi></mi> <mo>=</mo> <mo movablelimits="true" form="prefix">Pr</mo> <mo fence="false" stretchy="false">{</mo> <mrow class="MJX-TeXAtom-ORD"> <mtext>person&#xa0;</mtext> </mrow> <mi>i</mi> <mrow class="MJX-TeXAtom-ORD"> <mtext>&#xa0;and person&#xa0;</mtext> </mrow> <mi>j</mi> <mrow class="MJX-TeXAtom-ORD"> <mtext>&#xa0;have the same birthday</mtext> </mrow> <mo fence="false" stretchy="false">}</mo> <mo>=</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mn>1</mn> <mi>n</mi> </mfrac> </mrow> <mo>.</mo> </mtd> </mtr> </mtable> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle {\begin{alignedat}{2}E[X_{ij}]&amp;=\Pr\{{\text{person }}i{\text{ and person }}j{\text{ have the same birthday}}\}={\frac {1}{n}}.\end{alignedat}}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/500efcea4d3c02589368f6bc6028b676f9a624d8" class="mwe-math-fallback-image-display mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.79ex; margin-bottom: -0.215ex; width:66.207ex; height:5.176ex;" alt="{\displaystyle {\begin{alignedat}{2}E[X_{ij}]&amp;=\Pr\{{\text{person }}i{\text{ and person }}j{\text{ have the same birthday}}\}={\frac {1}{n}}.\end{alignedat}}}" /></span> </p><p>Let <i>X</i> be a random variable counting the pairs of individuals with the same birthday. </p><p><span class="mwe-math-element"><span class="mwe-math-mathml-display mwe-math-mathml-a11y" style="display: none;"><math display="block" xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle X=\sum _{i=1}^{k}\sum _{j=i+1}^{k}X_{ij}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>X</mi> <mo>=</mo> <munderover> <mo>&#x2211;<!-- ∑ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> <mo>=</mo> <mn>1</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> </mrow> </munderover> <munderover> <mo>&#x2211;<!-- ∑ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mi>j</mi> <mo>=</mo> <mi>i</mi> <mo>+</mo> <mn>1</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> </mrow> </munderover> <msub> <mi>X</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> <mi>j</mi> </mrow> </msub> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle X=\sum _{i=1}^{k}\sum _{j=i+1}^{k}X_{ij}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/e0d30c9f0d77a2f45a7bc0eabf237f01cb3f8643" class="mwe-math-fallback-image-display mw-invert skin-invert" aria-hidden="true" style="vertical-align: -3.338ex; width:17.233ex; height:7.676ex;" alt="{\displaystyle X=\sum _{i=1}^{k}\sum _{j=i+1}^{k}X_{ij}}" /></span> </p><p><span class="mwe-math-element"><span class="mwe-math-mathml-display mwe-math-mathml-a11y" style="display: none;"><math display="block" xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\begin{alignedat}{3}E[X]&amp;=\sum _{i=1}^{k}\sum _{j=i+1}^{k}E[X_{ij}]\\[8pt]&amp;={\binom {k}{2}}{\frac {1}{n}}\\[8pt]&amp;={\frac {k(k-1)}{2n}}\end{alignedat}}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow class="MJX-TeXAtom-ORD"> <mtable columnalign="right left right left right left" rowspacing="1.1em 1.1em 0.3em" columnspacing="0em 0em 0em 0em 0em 0em" displaystyle="true"> <mtr> <mtd> <mi>E</mi> <mo stretchy="false">[</mo> <mi>X</mi> <mo stretchy="false">]</mo> </mtd> <mtd> <mi></mi> <mo>=</mo> <munderover> <mo>&#x2211;<!-- ∑ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> <mo>=</mo> <mn>1</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> </mrow> </munderover> <munderover> <mo>&#x2211;<!-- ∑ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mi>j</mi> <mo>=</mo> <mi>i</mi> <mo>+</mo> <mn>1</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> </mrow> </munderover> <mi>E</mi> <mo stretchy="false">[</mo> <msub> <mi>X</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> <mi>j</mi> </mrow> </msub> <mo stretchy="false">]</mo> </mtd> </mtr> <mtr> <mtd></mtd> <mtd> <mi></mi> <mo>=</mo> <mrow class="MJX-TeXAtom-ORD"> <mrow> <mrow class="MJX-TeXAtom-OPEN"> <mo maxsize="2.047em" minsize="2.047em">(</mo> </mrow> <mfrac linethickness="0"> <mi>k</mi> <mn>2</mn> </mfrac> <mrow class="MJX-TeXAtom-CLOSE"> <mo maxsize="2.047em" minsize="2.047em">)</mo> </mrow> </mrow> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mn>1</mn> <mi>n</mi> </mfrac> </mrow> </mtd> </mtr> <mtr> <mtd></mtd> <mtd> <mi></mi> <mo>=</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <mi>k</mi> <mo stretchy="false">(</mo> <mi>k</mi> <mo>&#x2212;<!-- − --></mo> <mn>1</mn> <mo stretchy="false">)</mo> </mrow> <mrow> <mn>2</mn> <mi>n</mi> </mrow> </mfrac> </mrow> </mtd> </mtr> </mtable> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle {\begin{alignedat}{3}E[X]&amp;=\sum _{i=1}^{k}\sum _{j=i+1}^{k}E[X_{ij}]\\[8pt]&amp;={\binom {k}{2}}{\frac {1}{n}}\\[8pt]&amp;={\frac {k(k-1)}{2n}}\end{alignedat}}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/55dd1b77df250394f00925d42e5bd67896842481" class="mwe-math-fallback-image-display mw-invert skin-invert" aria-hidden="true" style="vertical-align: -10.913ex; margin-bottom: -0.258ex; width:24.123ex; height:23.509ex;" alt="{\displaystyle {\begin{alignedat}{3}E[X]&amp;=\sum _{i=1}^{k}\sum _{j=i+1}^{k}E[X_{ij}]\\[8pt]&amp;={\binom {k}{2}}{\frac {1}{n}}\\[8pt]&amp;={\frac {k(k-1)}{2n}}\end{alignedat}}}" /></span> </p><p>For <span class="texhtml"><i>n</i> = 365</span>, if <span class="texhtml"><i>k</i> = 28</span>, the expected number of pairs of individuals with the same birthday is <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035" /><span class="sfrac">&#8288;<span class="tion"><span class="num">28 × 27</span><span class="sr-only">/</span><span class="den">2 × 365</span></span>&#8288;</span>&#160;≈&#160;1.0356. Therefore, we can expect at least one matching pair with at least 28 people. </p><p>In the <a href="/wiki/2014_FIFA_World_Cup" title="2014 FIFA World Cup">2014 FIFA World Cup</a>, each of the 32 squads had 23 players. An analysis of the official squad lists suggested that 16 squads had pairs of players sharing birthdays, and of these 5 squads had two pairs: Argentina, France, Iran, South Korea and Switzerland each had two pairs, and Australia, Bosnia and Herzegovina, Brazil, Cameroon, Colombia, Honduras, Netherlands, Nigeria, Russia, Spain and USA each with one pair.<sup id="cite_ref-27" class="reference"><a href="#cite_note-27"><span class="cite-bracket">&#91;</span>26<span class="cite-bracket">&#93;</span></a></sup> </p><p>Voracek, Tran and <a href="/wiki/Anton_Formann" title="Anton Formann">Formann</a> showed that the majority of people markedly overestimate the number of people that is necessary to achieve a given probability of people having the same birthday, and markedly underestimate the probability of people having the same birthday when a specific sample size is given.<sup id="cite_ref-28" class="reference"><a href="#cite_note-28"><span class="cite-bracket">&#91;</span>27<span class="cite-bracket">&#93;</span></a></sup> Further results showed that psychology students and women did better on the task than casino visitors/personnel or men, but were less confident about their estimates. </p> <div class="mw-heading mw-heading3"><h3 id="Reverse_problem">Reverse problem</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Birthday_problem&amp;action=edit&amp;section=27" title="Edit section: Reverse problem"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>The reverse problem is to find, for a fixed probability <span class="texhtml mvar" style="font-style:italic;">p</span>, the greatest <span class="texhtml mvar" style="font-style:italic;">n</span> for which the probability <span class="texhtml"><i>p</i>(<i>n</i>)</span> is smaller than the given <span class="texhtml mvar" style="font-style:italic;">p</span>, or the smallest <span class="texhtml mvar" style="font-style:italic;">n</span> for which the probability <span class="texhtml"><i>p</i>(<i>n</i>)</span> is greater than the given <span class="texhtml mvar" style="font-style:italic;">p</span>.<sup class="noprint Inline-Template Template-Fact" style="white-space:nowrap;">&#91;<i><a href="/wiki/Wikipedia:Citation_needed" title="Wikipedia:Citation needed"><span title="This claim needs references to reliable sources. (September 2019)">citation needed</span></a></i>&#93;</sup> </p><p>Taking the above formula for <span class="texhtml"><i>d</i>&#160;=&#160;365</span>, one has </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle n(p;365)\approx {\sqrt {730\ln \left({\frac {1}{1-p}}\right)}}.}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>n</mi> <mo stretchy="false">(</mo> <mi>p</mi> <mo>;</mo> <mn>365</mn> <mo stretchy="false">)</mo> <mo>&#x2248;<!-- ≈ --></mo> <mrow class="MJX-TeXAtom-ORD"> <msqrt> <mn>730</mn> <mi>ln</mi> <mo>&#x2061;<!-- ⁡ --></mo> <mrow> <mo>(</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mn>1</mn> <mrow> <mn>1</mn> <mo>&#x2212;<!-- − --></mo> <mi>p</mi> </mrow> </mfrac> </mrow> <mo>)</mo> </mrow> </msqrt> </mrow> <mo>.</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle n(p;365)\approx {\sqrt {730\ln \left({\frac {1}{1-p}}\right)}}.}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/c8198dd431a622bd448ef0a9f44fc8d23e43cc95" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -3.171ex; width:30.207ex; height:7.509ex;" alt="{\displaystyle n(p;365)\approx {\sqrt {730\ln \left({\frac {1}{1-p}}\right)}}.}" /></span></dd></dl> <p>The following table gives some sample calculations. </p> <dl><dd><table class="wikitable"> <tbody><tr> <th><span class="texhtml mvar" style="font-style:italic;">p</span></th> <th><span class="texhtml mvar" style="font-style:italic;">n</span> </th> <th><span class="texhtml"><i>n</i>↓</span></th> <th><span class="texhtml"><i>p</i>(<i>n</i>↓)</span></th> <th><span class="texhtml"><i>n</i>↑</span></th> <th><span class="texhtml"><i>p</i>(<i>n</i>↑)</span> </th></tr> <tr> <td><span style="color:maroon">0.01</span> </td> <td>0.14178<span class="nowrap">&#8730;<span style="border-top:1px solid; padding:0 0.1em;">365</span></span> = <span style="color:maroon">2.70864</span> </td> <td align="right">2</td> <td>0.00274</td> <td align="right">3 </td> <td><span style="color:maroon">0.00820</span> </td></tr> <tr> <td>0.05</td> <td>0.32029<span class="nowrap">&#8730;<span style="border-top:1px solid; padding:0 0.1em;">365</span></span> = 6.11916 </td> <td align="right">6</td> <td>0.04046</td> <td align="right">7</td> <td>0.05624 </td></tr> <tr> <td><span style="color:maroon">0.1</span> </td> <td>0.45904<span class="nowrap">&#8730;<span style="border-top:1px solid; padding:0 0.1em;">365</span></span> = <span style="color:maroon"> 8.77002</span> </td> <td align="right">8</td> <td>0.07434</td> <td align="right">9 </td> <td><span style="color:maroon">0.09462</span> </td></tr> <tr> <td><span style="color:maroon">0.2</span> </td> <td>0.66805<span class="nowrap">&#8730;<span style="border-top:1px solid; padding:0 0.1em;">365</span></span> = <span style="color:maroon">12.76302</span> </td> <td align="right">12</td> <td>0.16702</td> <td align="right">13 </td> <td><span style="color:maroon">0.19441</span> </td></tr> <tr> <td>0.3</td> <td>0.84460<span class="nowrap">&#8730;<span style="border-top:1px solid; padding:0 0.1em;">365</span></span> = 16.13607 </td> <td align="right">16</td> <td>0.28360</td> <td align="right">17</td> <td>0.31501 </td></tr> <tr> <td>0.5</td> <td>1.17741<span class="nowrap">&#8730;<span style="border-top:1px solid; padding:0 0.1em;">365</span></span> = 22.49439 </td> <td align="right">22</td> <td>0.47570</td> <td align="right">23</td> <td>0.50730 </td></tr> <tr> <td>0.7</td> <td>1.55176<span class="nowrap">&#8730;<span style="border-top:1px solid; padding:0 0.1em;">365</span></span> = 29.64625 </td> <td align="right">29</td> <td>0.68097</td> <td align="right">30</td> <td>0.70632 </td></tr> <tr> <td>0.8</td> <td>1.79412<span class="nowrap">&#8730;<span style="border-top:1px solid; padding:0 0.1em;">365</span></span> = 34.27666 </td> <td align="right">34</td> <td>0.79532</td> <td align="right">35</td> <td>0.81438 </td></tr> <tr> <td>0.9</td> <td>2.14597<span class="nowrap">&#8730;<span style="border-top:1px solid; padding:0 0.1em;">365</span></span> = 40.99862 </td> <td align="right">40</td> <td>0.89123</td> <td align="right">41</td> <td>0.90315 </td></tr> <tr> <td>0.95</td> <td>2.44775<span class="nowrap">&#8730;<span style="border-top:1px solid; padding:0 0.1em;">365</span></span> = 46.76414 </td> <td align="right">46</td> <td>0.94825</td> <td align="right">47</td> <td>0.95477 </td></tr> <tr> <td><span style="color:maroon">0.99</span> </td> <td>3.03485<span class="nowrap">&#8730;<span style="border-top:1px solid; padding:0 0.1em;">365</span></span> = <span style="color:maroon">57.98081</span> </td> <td align="right">57 </td> <td><span style="color:maroon">0.99012</span> </td> <td align="right">58</td> <td>0.99166 </td></tr></tbody></table></dd></dl> <p>Some values falling outside the bounds have been <span style="color:maroon">colored</span> to show that the approximation is not always exact. </p> <div class="mw-heading mw-heading2"><h2 id="Partition_problem">Partition problem</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Birthday_problem&amp;action=edit&amp;section=28" title="Edit section: Partition problem"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>A related problem is the <a href="/wiki/Partition_problem" title="Partition problem">partition problem</a>, a variant of the <a href="/wiki/Knapsack_problem" title="Knapsack problem">knapsack problem</a> from <a href="/wiki/Operations_research" title="Operations research">operations research</a>. Some weights are put on a <a href="/wiki/Weighing_scale" title="Weighing scale">balance scale</a>; each weight is an integer number of grams randomly chosen between one gram and one million grams (one <a href="/wiki/Tonne" title="Tonne">tonne</a>). The question is whether one can usually (that is, with probability close to 1) transfer the weights between the left and right arms to balance the scale. (In case the sum of all the weights is an odd number of grams, a discrepancy of one gram is allowed.) If there are only two or three weights, the answer is very clearly no; although there are some combinations which work, the majority of randomly selected combinations of three weights do not. If there are very many weights, the answer is clearly yes. The question is, how many are just sufficient? That is, what is the number of weights such that it is equally likely for it to be possible to balance them as it is to be impossible? </p><p>Often, people's intuition is that the answer is above <span class="nowrap"><span data-sort-value="7005100000000000000♠"></span>100<span style="margin-left:.25em;">000</span></span>. Most people's intuition is that it is in the thousands or tens of thousands, while others feel it should at least be in the hundreds. The correct answer is 23.<sup class="noprint Inline-Template Template-Fact" style="white-space:nowrap;">&#91;<i><a href="/wiki/Wikipedia:Citation_needed" title="Wikipedia:Citation needed"><span title="This claim needs references to reliable sources. (December 2016)">citation needed</span></a></i>&#93;</sup> </p><p>The reason is that the correct comparison is to the number of partitions of the weights into left and right. There are <span class="texhtml">2<sup><i>N</i> − 1</sup></span> different partitions for <span class="texhtml"><i>N</i></span> weights, and the left sum minus the right sum can be thought of as a new random quantity for each partition. The distribution of the sum of weights is approximately <a href="/wiki/Normal_distribution" title="Normal distribution">Gaussian</a>, with a peak at <span class="texhtml"><span class="nowrap"><span data-sort-value="7005500000000000000♠"></span>500<span style="margin-left:.25em;">000</span></span><i>N</i></span> and width <span class="texhtml"><span class="nowrap"><span data-sort-value="7006100000000000000♠"></span>1<span style="margin-left:.25em;">000</span><span style="margin-left:.25em;">000</span></span><span class="nowrap">&#8730;<span style="border-top:1px solid; padding:0 0.1em;"><i>N</i></span></span></span>, so that when <span class="texhtml">2<sup><i>N</i> − 1</sup></span> is approximately equal to <span class="texhtml"><span class="nowrap"><span data-sort-value="7006100000000000000♠"></span>1<span style="margin-left:.25em;">000</span><span style="margin-left:.25em;">000</span></span><span class="nowrap">&#8730;<span style="border-top:1px solid; padding:0 0.1em;"><i>N</i></span></span></span> the transition occurs. 2<sup>23 − 1</sup> is about 4 million, while the width of the distribution is only 5 million.<sup id="cite_ref-29" class="reference"><a href="#cite_note-29"><span class="cite-bracket">&#91;</span>28<span class="cite-bracket">&#93;</span></a></sup> </p> <div class="mw-heading mw-heading2"><h2 id="In_fiction">In fiction</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Birthday_problem&amp;action=edit&amp;section=29" title="Edit section: In fiction"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p><a href="/wiki/Arthur_C._Clarke" title="Arthur C. Clarke">Arthur C. Clarke</a>'s 1961 novel <i><a href="/wiki/A_Fall_of_Moondust" title="A Fall of Moondust">A Fall of Moondust</a></i> contains a section where the main characters, trapped underground for an indefinite amount of time, are celebrating a birthday and find themselves discussing the validity of the birthday problem. As stated by a physicist passenger: "If you have a group of more than twenty-four people, the odds are better than even that two of them have the same birthday." Eventually, out of 22 present, it is revealed that two characters share the same birthday, May 23. </p> <div class="mw-heading mw-heading2"><h2 id="Notes">Notes</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Birthday_problem&amp;action=edit&amp;section=30" title="Edit section: Notes"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <style data-mw-deduplicate="TemplateStyles:r1239543626">.mw-parser-output .reflist{margin-bottom:0.5em;list-style-type:decimal}@media screen{.mw-parser-output .reflist{font-size:90%}}.mw-parser-output .reflist .references{font-size:100%;margin-bottom:0;list-style-type:inherit}.mw-parser-output .reflist-columns-2{column-width:30em}.mw-parser-output .reflist-columns-3{column-width:25em}.mw-parser-output .reflist-columns{margin-top:0.3em}.mw-parser-output .reflist-columns ol{margin-top:0}.mw-parser-output .reflist-columns li{page-break-inside:avoid;break-inside:avoid-column}.mw-parser-output .reflist-upper-alpha{list-style-type:upper-alpha}.mw-parser-output .reflist-upper-roman{list-style-type:upper-roman}.mw-parser-output .reflist-lower-alpha{list-style-type:lower-alpha}.mw-parser-output .reflist-lower-greek{list-style-type:lower-greek}.mw-parser-output .reflist-lower-roman{list-style-type:lower-roman}</style><div class="reflist"> <div class="mw-references-wrap"><ol class="references"> <li id="cite_note-10"><span class="mw-cite-backlink"><b><a href="#cite_ref-10">^</a></b></span> <span class="reference-text">In his autobiography, Halmos criticized the form in which the birthday paradox is often presented, in terms of numerical computation. He believed that it should be used as an example in the use of more abstract mathematical concepts. He wrote: <blockquote><p>The reasoning is based on important tools that all students of mathematics should have ready access to. The birthday problem used to be a splendid illustration of the advantages of pure thought over mechanical manipulation; the inequalities can be obtained in a minute or two, whereas the multiplications would take much longer, and be much more subject to error, whether the instrument is a pencil or an old-fashioned desk computer. What <a href="/wiki/Calculator" title="Calculator">calculators</a> do not yield is understanding, or mathematical facility, or a solid basis for more advanced, generalized theories.</p></blockquote></span> </li> </ol></div></div> <div class="mw-heading mw-heading2"><h2 id="References">References</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Birthday_problem&amp;action=edit&amp;section=31" title="Edit section: References"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1239543626" /><div class="reflist reflist-columns references-column-width" style="column-width: 45em;"> <ol class="references"> <li id="cite_note-1"><span class="mw-cite-backlink"><b><a href="#cite_ref-1">^</a></b></span> <span class="reference-text"><a href="/wiki/David_Singmaster" title="David Singmaster">David Singmaster</a>, <i>Sources in Recreational Mathematics: An Annotated Bibliography</i>, Eighth Preliminary Edition, 2004, <a rel="nofollow" class="external text" href="https://www.puzzlemuseum.com/singma/singma6/SOURCES/singma-sources-edn8-2004-03-19.htm#_Toc69534221">section 8.B</a></span> </li> <li id="cite_note-2"><span class="mw-cite-backlink"><b><a href="#cite_ref-2">^</a></b></span> <span class="reference-text"><a href="/wiki/H.S.M._Coxeter" class="mw-redirect" title="H.S.M. Coxeter">H.S.M. Coxeter</a>, "Mathematical Recreations and Essays, 11th edition", 1940, p 45, as reported in <a href="/wiki/I._J._Good" title="I. J. Good">I. J. Good</a>, <i>Probability and the weighing of evidence</i>, 1950, <a rel="nofollow" class="external text" href="https://archive.org/details/probabilityweigh0000good/page/38/mode/2up?q=same%20birthday">p. 38</a></span> </li> <li id="cite_note-3"><span class="mw-cite-backlink"><b><a href="#cite_ref-3">^</a></b></span> <span class="reference-text">Richard Von Mises, "Über Aufteilungs- und Besetzungswahrscheinlichkeiten", <i>Revue de la faculté des sciences de l'Université d'Istanbul</i> <b>4</b>:145-163, 1939, reprinted in <style data-mw-deduplicate="TemplateStyles:r1238218222">.mw-parser-output cite.citation{font-style:inherit;word-wrap:break-word}.mw-parser-output .citation q{quotes:"\"""\"""'""'"}.mw-parser-output .citation:target{background-color:rgba(0,127,255,0.133)}.mw-parser-output .id-lock-free.id-lock-free a{background:url("//upload.wikimedia.org/wikipedia/commons/6/65/Lock-green.svg")right 0.1em center/9px no-repeat}.mw-parser-output .id-lock-limited.id-lock-limited a,.mw-parser-output .id-lock-registration.id-lock-registration a{background:url("//upload.wikimedia.org/wikipedia/commons/d/d6/Lock-gray-alt-2.svg")right 0.1em center/9px no-repeat}.mw-parser-output .id-lock-subscription.id-lock-subscription a{background:url("//upload.wikimedia.org/wikipedia/commons/a/aa/Lock-red-alt-2.svg")right 0.1em center/9px no-repeat}.mw-parser-output .cs1-ws-icon a{background:url("//upload.wikimedia.org/wikipedia/commons/4/4c/Wikisource-logo.svg")right 0.1em center/12px no-repeat}body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-free a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-limited a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-registration a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-subscription a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .cs1-ws-icon a{background-size:contain;padding:0 1em 0 0}.mw-parser-output .cs1-code{color:inherit;background:inherit;border:none;padding:inherit}.mw-parser-output .cs1-hidden-error{display:none;color:var(--color-error,#d33)}.mw-parser-output .cs1-visible-error{color:var(--color-error,#d33)}.mw-parser-output .cs1-maint{display:none;color:#085;margin-left:0.3em}.mw-parser-output .cs1-kern-left{padding-left:0.2em}.mw-parser-output .cs1-kern-right{padding-right:0.2em}.mw-parser-output .citation .mw-selflink{font-weight:inherit}@media screen{.mw-parser-output .cs1-format{font-size:95%}html.skin-theme-clientpref-night .mw-parser-output .cs1-maint{color:#18911f}}@media screen and (prefers-color-scheme:dark){html.skin-theme-clientpref-os .mw-parser-output .cs1-maint{color:#18911f}}</style><cite id="CITEREFFrankGoldsteinKacPrager1964" class="citation book cs1">Frank, P.; Goldstein, S.; Kac, M.; Prager, W.; Szegö, G.; Birkhoff, G., eds. (1964). <i>Selected Papers of Richard von Mises</i>. Vol.&#160;2. Providence, Rhode Island: Amer. Math. Soc. pp.&#160;<span class="nowrap">313–</span>334.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=book&amp;rft.btitle=Selected+Papers+of+Richard+von+Mises&amp;rft.place=Providence%2C+Rhode+Island&amp;rft.pages=%3Cspan+class%3D%22nowrap%22%3E313-%3C%2Fspan%3E334&amp;rft.pub=Amer.+Math.+Soc.&amp;rft.date=1964&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3ABirthday+problem" class="Z3988"></span></span> </li> <li id="cite_note-4"><span class="mw-cite-backlink"><b><a href="#cite_ref-4">^</a></b></span> <span class="reference-text">see <a href="/wiki/Birthday#Distribution_through_the_year" title="Birthday">Birthday#Distribution through the year</a></span> </li> <li id="cite_note-5"><span class="mw-cite-backlink"><b><a href="#cite_ref-5">^</a></b></span> <span class="reference-text">(<a href="#CITEREFBloom1973">Bloom 1973</a>)</span> </li> <li id="cite_note-6"><span class="mw-cite-backlink"><b><a href="#cite_ref-6">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222" /><cite id="CITEREFSteele2004" class="citation book cs1">Steele, J. Michael (2004). <span class="id-lock-limited" title="Free access subject to limited trial, subscription normally required"><a rel="nofollow" class="external text" href="https://archive.org/details/cauchyschwarzmas00stee_431"><i>The Cauchy‑Schwarz Master Class</i></a></span>. Cambridge: Cambridge University Press. pp.&#160;<a rel="nofollow" class="external text" href="https://archive.org/details/cauchyschwarzmas00stee_431/page/n217">206</a>, 277. <a href="/wiki/ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&#160;<a href="/wiki/Special:BookSources/9780521546775" title="Special:BookSources/9780521546775"><bdi>9780521546775</bdi></a>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=book&amp;rft.btitle=The+Cauchy%E2%80%91Schwarz+Master+Class&amp;rft.place=Cambridge&amp;rft.pages=206%2C+277&amp;rft.pub=Cambridge+University+Press&amp;rft.date=2004&amp;rft.isbn=9780521546775&amp;rft.aulast=Steele&amp;rft.aufirst=J.+Michael&amp;rft_id=https%3A%2F%2Farchive.org%2Fdetails%2Fcauchyschwarzmas00stee_431&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3ABirthday+problem" class="Z3988"></span></span> </li> <li id="cite_note-Borja-7"><span class="mw-cite-backlink"><b><a href="#cite_ref-Borja_7-0">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222" /><cite id="CITEREFMario_Cortina_BorjaJohn_Haigh2007" class="citation journal cs1">Mario Cortina Borja; John Haigh (September 2007). <a rel="nofollow" class="external text" href="https://doi.org/10.1111%2Fj.1740-9713.2007.00246.x">"The Birthday Problem"</a>. <i>Significance</i>. <b>4</b> (3). Royal Statistical Society: <span class="nowrap">124–</span>127. <a href="/wiki/Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<span class="id-lock-free" title="Freely accessible"><a rel="nofollow" class="external text" href="https://doi.org/10.1111%2Fj.1740-9713.2007.00246.x">10.1111/j.1740-9713.2007.00246.x</a></span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&amp;rft.genre=article&amp;rft.jtitle=Significance&amp;rft.atitle=The+Birthday+Problem&amp;rft.volume=4&amp;rft.issue=3&amp;rft.pages=%3Cspan+class%3D%22nowrap%22%3E124-%3C%2Fspan%3E127&amp;rft.date=2007-09&amp;rft_id=info%3Adoi%2F10.1111%2Fj.1740-9713.2007.00246.x&amp;rft.au=Mario+Cortina+Borja&amp;rft.au=John+Haigh&amp;rft_id=https%3A%2F%2Fdoi.org%2F10.1111%252Fj.1740-9713.2007.00246.x&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3ABirthday+problem" class="Z3988"></span></span> </li> <li id="cite_note-8"><span class="mw-cite-backlink"><b><a href="#cite_ref-8">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222" /><cite id="CITEREFMathis1991" class="citation journal cs1">Mathis, Frank H. (June 1991). <a rel="nofollow" class="external text" href="http://http.cs.berkeley.edu/~daw/papers/genbday-crypto02.ps">"A Generalized Birthday Problem"</a>. <i>SIAM Review</i>. <b>33</b> (2): <span class="nowrap">265–</span>270. <a href="/wiki/Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<a rel="nofollow" class="external text" href="https://doi.org/10.1137%2F1033051">10.1137/1033051</a>. <a href="/wiki/ISSN_(identifier)" class="mw-redirect" title="ISSN (identifier)">ISSN</a>&#160;<a rel="nofollow" class="external text" href="https://search.worldcat.org/issn/0036-1445">0036-1445</a>. <a href="/wiki/JSTOR_(identifier)" class="mw-redirect" title="JSTOR (identifier)">JSTOR</a>&#160;<a rel="nofollow" class="external text" href="https://www.jstor.org/stable/2031144">2031144</a>. <a href="/wiki/OCLC_(identifier)" class="mw-redirect" title="OCLC (identifier)">OCLC</a>&#160;<a rel="nofollow" class="external text" href="https://search.worldcat.org/oclc/37699182">37699182</a>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&amp;rft.genre=article&amp;rft.jtitle=SIAM+Review&amp;rft.atitle=A+Generalized+Birthday+Problem&amp;rft.volume=33&amp;rft.issue=2&amp;rft.pages=%3Cspan+class%3D%22nowrap%22%3E265-%3C%2Fspan%3E270&amp;rft.date=1991-06&amp;rft_id=info%3Aoclcnum%2F37699182&amp;rft.issn=0036-1445&amp;rft_id=https%3A%2F%2Fwww.jstor.org%2Fstable%2F2031144%23id-name%3DJSTOR&amp;rft_id=info%3Adoi%2F10.1137%2F1033051&amp;rft.aulast=Mathis&amp;rft.aufirst=Frank+H.&amp;rft_id=http%3A%2F%2Fhttp.cs.berkeley.edu%2F~daw%2Fpapers%2Fgenbday-crypto02.ps&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3ABirthday+problem" class="Z3988"></span></span> </li> <li id="cite_note-9"><span class="mw-cite-backlink"><b><a href="#cite_ref-9">^</a></b></span> <span class="reference-text">Jim Gray, Catharine van Ingen. <a rel="nofollow" class="external text" href="https://arxiv.org/abs/cs/0701166">Empirical Measurements of Disk Failure Rates and Error Rates</a></span> </li> <li id="cite_note-11"><span class="mw-cite-backlink"><b><a href="#cite_ref-11">^</a></b></span> <span class="reference-text"><style data-mw-deduplicate="TemplateStyles:r1041539562">.mw-parser-output .citation{word-wrap:break-word}.mw-parser-output .citation:target{background-color:rgba(0,127,255,0.133)}</style><cite class="citation wikicite" id="CITEREFBrink2012">D. Brink, A (probably) exact solution to the Birthday Problem, Ramanujan Journal, 2012, <a rel="nofollow" class="external autonumber" href="https://link.springer.com/article/10.1007/s11139-011-9343-9">[1]</a>.</cite></span> </li> <li id="cite_note-12"><span class="mw-cite-backlink"><b><a href="#cite_ref-12">^</a></b></span> <span class="reference-text">Brink&#160;<a href="#CITEREFBrink2012">2012</a>,&#8194;Theorem 2</span> </li> <li id="cite_note-Brink-13"><span class="mw-cite-backlink">^ <a href="#cite_ref-Brink_13-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-Brink_13-1"><sup><i><b>b</b></i></sup></a></span> <span class="reference-text">Brink&#160;<a href="#CITEREFBrink2012">2012</a>,&#8194;Theorem 3</span> </li> <li id="cite_note-ReferenceA-14"><span class="mw-cite-backlink">^ <a href="#cite_ref-ReferenceA_14-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-ReferenceA_14-1"><sup><i><b>b</b></i></sup></a></span> <span class="reference-text">Brink&#160;<a href="#CITEREFBrink2012">2012</a>,&#8194;Table 3, Conjecture 1</span> </li> <li id="cite_note-15"><span class="mw-cite-backlink"><b><a href="#cite_ref-15">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222" /><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://oeis.org/A014088">"Minimal number of people to give a 50% probability of having at least n coincident birthdays in one year"</a>. <i>The On-line Encyclopedia of Integer Sequences</i>. OEIS<span class="reference-accessdate">. Retrieved <span class="nowrap">17 February</span> 2020</span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&amp;rft.genre=unknown&amp;rft.jtitle=The+On-line+Encyclopedia+of+Integer+Sequences&amp;rft.atitle=Minimal+number+of+people+to+give+a+50%25+probability+of+having+at+least+n+coincident+birthdays+in+one+year.&amp;rft_id=https%3A%2F%2Foeis.org%2FA014088&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3ABirthday+problem" class="Z3988"></span></span> </li> <li id="cite_note-16"><span class="mw-cite-backlink"><b><a href="#cite_ref-16">^</a></b></span> <span class="reference-text">DasGupta, Anirban. "The matching, birthday and the strong birthday problem: a contemporary review." Journal of Statistical Planning and Inference 130.1-2 (2005): 377-389.</span> </li> <li id="cite_note-17"><span class="mw-cite-backlink"><b><a href="#cite_ref-17">^</a></b></span> <span class="reference-text">Mario Cortina Borja, The Strong Birthday Problem, Significance, Volume 10, Issue 6, December 2013, Pages 18–20, <a rel="nofollow" class="external free" href="https://doi.org/10.1111/j.1740-9713.2013.00705.x">https://doi.org/10.1111/j.1740-9713.2013.00705.x</a></span> </li> <li id="cite_note-18"><span class="mw-cite-backlink"><b><a href="#cite_ref-18">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222" /><cite id="CITEREFSuzukiTonien2006" class="citation conference cs1">Suzuki, K.; Tonien, D.; et&#160;al. (2006). "Birthday Paradox for Multi-collisions". In Rhee M.S., Lee B. (ed.). <i>Lecture Notes in Computer Science, vol 4296</i>. Berlin: Springer. <a href="/wiki/Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<a rel="nofollow" class="external text" href="https://doi.org/10.1007%2F11927587_5">10.1007/11927587_5</a>. Information Security and Cryptology – ICISC 2006.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=conference&amp;rft.atitle=Birthday+Paradox+for+Multi-collisions&amp;rft.btitle=Lecture+Notes+in+Computer+Science%2C+vol+4296&amp;rft.place=Berlin&amp;rft.pub=Springer&amp;rft.date=2006&amp;rft_id=info%3Adoi%2F10.1007%2F11927587_5&amp;rft.aulast=Suzuki&amp;rft.aufirst=K.&amp;rft.au=Tonien%2C+D.&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3ABirthday+problem" class="Z3988"></span></span> </li> <li id="cite_note-19"><span class="mw-cite-backlink"><b><a href="#cite_ref-19">^</a></b></span> <span class="reference-text">Z. E. Schnabel (1938) <i>The Estimation of the Total Fish Population of a Lake</i>, <a href="/wiki/American_Mathematical_Monthly" class="mw-redirect" title="American Mathematical Monthly">American Mathematical Monthly</a> <b>45</b>, 348–352.</span> </li> <li id="cite_note-Pollanen-20"><span class="mw-cite-backlink">^ <a href="#cite_ref-Pollanen_20-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-Pollanen_20-1"><sup><i><b>b</b></i></sup></a></span> <span class="reference-text">M. Pollanen (2024) <i>A Double Birthday Paradox in the Study of Coincidences</i>, <a href="/wiki/Mathematics" title="Mathematics">Mathematics</a> <b>23</b>(24), 3882. <a rel="nofollow" class="external free" href="https://doi.org/10.3390/math12243882">https://doi.org/10.3390/math12243882</a></span> </li> <li id="cite_note-21"><span class="mw-cite-backlink"><b><a href="#cite_ref-21">^</a></b></span> <span class="reference-text"><a href="/wiki/Michael_Christopher_Wendl" title="Michael Christopher Wendl">M. C. Wendl</a> (2003) <i><a rel="nofollow" class="external text" href="https://dx.doi.org/10.1016/S0167-7152(03)00168-8">Collision Probability Between Sets of Random Variables</a></i>, Statistics and Probability Letters <b>64</b>(3), 249–254.</span> </li> <li id="cite_note-abramson-22"><span class="mw-cite-backlink">^ <a href="#cite_ref-abramson_22-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-abramson_22-1"><sup><i><b>b</b></i></sup></a></span> <span class="reference-text">M. Abramson and W. O. J. Moser (1970) <i>More Birthday Surprises</i>, <a href="/wiki/American_Mathematical_Monthly" class="mw-redirect" title="American Mathematical Monthly">American Mathematical Monthly</a> <b>77</b>, 856–858</span> </li> <li id="cite_note-23"><span class="mw-cite-backlink"><b><a href="#cite_ref-23">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222" /><cite id="CITEREFMight" class="citation web cs1">Might, Matt. <a rel="nofollow" class="external text" href="http://matt.might.net/articles/counting-hash-collisions/">"Collision hash collisions with the birthday paradox"</a>. <i>Matt Might's blog</i><span class="reference-accessdate">. Retrieved <span class="nowrap">17 July</span> 2015</span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&amp;rft.genre=unknown&amp;rft.jtitle=Matt+Might%27s+blog&amp;rft.atitle=Collision+hash+collisions+with+the+birthday+paradox&amp;rft.aulast=Might&amp;rft.aufirst=Matt&amp;rft_id=http%3A%2F%2Fmatt.might.net%2Farticles%2Fcounting-hash-collisions%2F&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3ABirthday+problem" class="Z3988"></span></span> </li> <li id="cite_note-knuth73-24"><span class="mw-cite-backlink"><b><a href="#cite_ref-knuth73_24-0">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222" /><cite id="CITEREFKnuth1973" class="citation book cs1 cs1-prop-long-vol">Knuth, D. E. (1973). <i>The Art of Computer Programming</i>. Vol.&#160;3, Sorting and Searching. Reading, Massachusetts: Addison-Wesley. <a href="/wiki/ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&#160;<a href="/wiki/Special:BookSources/978-0-201-03803-3" title="Special:BookSources/978-0-201-03803-3"><bdi>978-0-201-03803-3</bdi></a>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=book&amp;rft.btitle=The+Art+of+Computer+Programming&amp;rft.place=Reading%2C+Massachusetts&amp;rft.pub=Addison-Wesley&amp;rft.date=1973&amp;rft.isbn=978-0-201-03803-3&amp;rft.aulast=Knuth&amp;rft.aufirst=D.+E.&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3ABirthday+problem" class="Z3988"></span></span> </li> <li id="cite_note-flajolet95-25"><span class="mw-cite-backlink"><b><a href="#cite_ref-flajolet95_25-0">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222" /><cite id="CITEREFFlajoletGrabnerKirschenhoferProdinger1995" class="citation journal cs1">Flajolet, P.; Grabner, P. J.; Kirschenhofer, P.; Prodinger, H. (1995). <a rel="nofollow" class="external text" href="https://doi.org/10.1016%2F0377-0427%2893%29E0258-N">"On Ramanujan's Q-Function"</a>. <i>Journal of Computational and Applied Mathematics</i>. <b>58</b>: <span class="nowrap">103–</span>116. <a href="/wiki/Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<span class="id-lock-free" title="Freely accessible"><a rel="nofollow" class="external text" href="https://doi.org/10.1016%2F0377-0427%2893%29E0258-N">10.1016/0377-0427(93)E0258-N</a></span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&amp;rft.genre=article&amp;rft.jtitle=Journal+of+Computational+and+Applied+Mathematics&amp;rft.atitle=On+Ramanujan%27s+Q-Function&amp;rft.volume=58&amp;rft.pages=%3Cspan+class%3D%22nowrap%22%3E103-%3C%2Fspan%3E116&amp;rft.date=1995&amp;rft_id=info%3Adoi%2F10.1016%2F0377-0427%2893%29E0258-N&amp;rft.aulast=Flajolet&amp;rft.aufirst=P.&amp;rft.au=Grabner%2C+P.+J.&amp;rft.au=Kirschenhofer%2C+P.&amp;rft.au=Prodinger%2C+H.&amp;rft_id=https%3A%2F%2Fdoi.org%2F10.1016%252F0377-0427%252893%2529E0258-N&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3ABirthday+problem" class="Z3988"></span></span> </li> <li id="cite_note-26"><span class="mw-cite-backlink"><b><a href="#cite_ref-26">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222" /><cite id="CITEREFCormen" class="citation book cs1">Cormen; et&#160;al. <i>Introduction to Algorithms</i>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=book&amp;rft.btitle=Introduction+to+Algorithms&amp;rft.au=Cormen&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3ABirthday+problem" class="Z3988"></span></span> </li> <li id="cite_note-27"><span class="mw-cite-backlink"><b><a href="#cite_ref-27">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222" /><cite id="CITEREFFletcher2014" class="citation web cs1">Fletcher, James (16 June 2014). <a rel="nofollow" class="external text" href="https://www.bbc.co.uk/news/magazine-27835311">"The birthday paradox at the World Cup"</a>. <i>bbc.com</i>. BBC<span class="reference-accessdate">. Retrieved <span class="nowrap">27 August</span> 2015</span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&amp;rft.genre=unknown&amp;rft.jtitle=bbc.com&amp;rft.atitle=The+birthday+paradox+at+the+World+Cup&amp;rft.date=2014-06-16&amp;rft.aulast=Fletcher&amp;rft.aufirst=James&amp;rft_id=https%3A%2F%2Fwww.bbc.co.uk%2Fnews%2Fmagazine-27835311&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3ABirthday+problem" class="Z3988"></span></span> </li> <li id="cite_note-28"><span class="mw-cite-backlink"><b><a href="#cite_ref-28">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222" /><cite id="CITEREFVoracekTranFormann2008" class="citation journal cs1">Voracek, M.; Tran, U. S.; Formann, A. K. (2008). "Birthday and birthmate problems: Misconceptions of probability among psychology undergraduates and casino visitors and personnel". <i>Perceptual and Motor Skills</i>. <b>106</b> (1): <span class="nowrap">91–</span>103. <a href="/wiki/Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<a rel="nofollow" class="external text" href="https://doi.org/10.2466%2Fpms.106.1.91-103">10.2466/pms.106.1.91-103</a>. <a href="/wiki/PMID_(identifier)" class="mw-redirect" title="PMID (identifier)">PMID</a>&#160;<a rel="nofollow" class="external text" href="https://pubmed.ncbi.nlm.nih.gov/18459359">18459359</a>. <a href="/wiki/S2CID_(identifier)" class="mw-redirect" title="S2CID (identifier)">S2CID</a>&#160;<a rel="nofollow" class="external text" href="https://api.semanticscholar.org/CorpusID:22046399">22046399</a>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&amp;rft.genre=article&amp;rft.jtitle=Perceptual+and+Motor+Skills&amp;rft.atitle=Birthday+and+birthmate+problems%3A+Misconceptions+of+probability+among+psychology+undergraduates+and+casino+visitors+and+personnel&amp;rft.volume=106&amp;rft.issue=1&amp;rft.pages=%3Cspan+class%3D%22nowrap%22%3E91-%3C%2Fspan%3E103&amp;rft.date=2008&amp;rft_id=https%3A%2F%2Fapi.semanticscholar.org%2FCorpusID%3A22046399%23id-name%3DS2CID&amp;rft_id=info%3Apmid%2F18459359&amp;rft_id=info%3Adoi%2F10.2466%2Fpms.106.1.91-103&amp;rft.aulast=Voracek&amp;rft.aufirst=M.&amp;rft.au=Tran%2C+U.+S.&amp;rft.au=Formann%2C+A.+K.&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3ABirthday+problem" class="Z3988"></span></span> </li> <li id="cite_note-29"><span class="mw-cite-backlink"><b><a href="#cite_ref-29">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222" /><cite id="CITEREFBorgsChayesPittel2001" class="citation journal cs1">Borgs, C.; Chayes, J.; Pittel, B. (2001). "Phase Transition and Finite Size Scaling in the Integer Partition Problem". <i>Random Structures and Algorithms</i>. <b>19</b> (<span class="nowrap">3–</span>4): <span class="nowrap">247–</span>288. <a href="/wiki/Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<a rel="nofollow" class="external text" href="https://doi.org/10.1002%2Frsa.10004">10.1002/rsa.10004</a>. <a href="/wiki/S2CID_(identifier)" class="mw-redirect" title="S2CID (identifier)">S2CID</a>&#160;<a rel="nofollow" class="external text" href="https://api.semanticscholar.org/CorpusID:6819493">6819493</a>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&amp;rft.genre=article&amp;rft.jtitle=Random+Structures+and+Algorithms&amp;rft.atitle=Phase+Transition+and+Finite+Size+Scaling+in+the+Integer+Partition+Problem&amp;rft.volume=19&amp;rft.issue=%3Cspan+class%3D%22nowrap%22%3E3%E2%80%93%3C%2Fspan%3E4&amp;rft.pages=%3Cspan+class%3D%22nowrap%22%3E247-%3C%2Fspan%3E288&amp;rft.date=2001&amp;rft_id=info%3Adoi%2F10.1002%2Frsa.10004&amp;rft_id=https%3A%2F%2Fapi.semanticscholar.org%2FCorpusID%3A6819493%23id-name%3DS2CID&amp;rft.aulast=Borgs&amp;rft.aufirst=C.&amp;rft.au=Chayes%2C+J.&amp;rft.au=Pittel%2C+B.&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3ABirthday+problem" class="Z3988"></span></span> </li> </ol></div> <div class="mw-heading mw-heading2"><h2 id="Bibliography">Bibliography</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Birthday_problem&amp;action=edit&amp;section=32" title="Edit section: Bibliography"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <ul><li><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222" /><cite class="citation journal cs1">Abramson, M.; Moser, W. O. J. (1970). "More Birthday Surprises". <i><a href="/wiki/American_Mathematical_Monthly" class="mw-redirect" title="American Mathematical Monthly">American Mathematical Monthly</a></i>. <b>77</b> (8): <span class="nowrap">856–</span>858. <a href="/wiki/Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<a rel="nofollow" class="external text" href="https://doi.org/10.2307%2F2317022">10.2307/2317022</a>. <a href="/wiki/JSTOR_(identifier)" class="mw-redirect" title="JSTOR (identifier)">JSTOR</a>&#160;<a rel="nofollow" class="external text" href="https://www.jstor.org/stable/2317022">2317022</a>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&amp;rft.genre=article&amp;rft.jtitle=American+Mathematical+Monthly&amp;rft.atitle=More+Birthday+Surprises&amp;rft.volume=77&amp;rft.issue=8&amp;rft.pages=%3Cspan+class%3D%22nowrap%22%3E856-%3C%2Fspan%3E858&amp;rft.date=1970&amp;rft_id=info%3Adoi%2F10.2307%2F2317022&amp;rft_id=https%3A%2F%2Fwww.jstor.org%2Fstable%2F2317022%23id-name%3DJSTOR&amp;rft.aulast=Abramson&amp;rft.aufirst=M.&amp;rft.au=Moser%2C+W.+O.+J.&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3ABirthday+problem" class="Z3988"></span></li> <li><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222" /><cite id="CITEREFBloom1973" class="citation journal cs1">Bloom, D. (1973). "A Birthday Problem". <i><a href="/wiki/American_Mathematical_Monthly" class="mw-redirect" title="American Mathematical Monthly">American Mathematical Monthly</a></i>. <b>80</b> (10): <span class="nowrap">1141–</span>1142. <a href="/wiki/Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<a rel="nofollow" class="external text" href="https://doi.org/10.2307%2F2318556">10.2307/2318556</a>. <a href="/wiki/JSTOR_(identifier)" class="mw-redirect" title="JSTOR (identifier)">JSTOR</a>&#160;<a rel="nofollow" class="external text" href="https://www.jstor.org/stable/2318556">2318556</a>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&amp;rft.genre=article&amp;rft.jtitle=American+Mathematical+Monthly&amp;rft.atitle=A+Birthday+Problem&amp;rft.volume=80&amp;rft.issue=10&amp;rft.pages=%3Cspan+class%3D%22nowrap%22%3E1141-%3C%2Fspan%3E1142&amp;rft.date=1973&amp;rft_id=info%3Adoi%2F10.2307%2F2318556&amp;rft_id=https%3A%2F%2Fwww.jstor.org%2Fstable%2F2318556%23id-name%3DJSTOR&amp;rft.aulast=Bloom&amp;rft.aufirst=D.&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3ABirthday+problem" class="Z3988"></span></li> <li><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222" /><cite class="citation book cs1">Kemeny, John G.; Snell, J. Laurie; Thompson, Gerald (1957). <i>Introduction to Finite Mathematics</i> (First&#160;ed.).</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=book&amp;rft.btitle=Introduction+to+Finite+Mathematics&amp;rft.edition=First&amp;rft.date=1957&amp;rft.aulast=Kemeny&amp;rft.aufirst=John+G.&amp;rft.au=Snell%2C+J.+Laurie&amp;rft.au=Thompson%2C+Gerald&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3ABirthday+problem" class="Z3988"></span></li> <li><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222" /><cite class="citation journal cs1">McKinney, E. H. (1966). "Generalized Birthday Problem". <i><a href="/wiki/American_Mathematical_Monthly" class="mw-redirect" title="American Mathematical Monthly">American Mathematical Monthly</a></i>. <b>73</b> (5): <span class="nowrap">385–</span>387. <a href="/wiki/Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<a rel="nofollow" class="external text" href="https://doi.org/10.2307%2F2315408">10.2307/2315408</a>. <a href="/wiki/JSTOR_(identifier)" class="mw-redirect" title="JSTOR (identifier)">JSTOR</a>&#160;<a rel="nofollow" class="external text" href="https://www.jstor.org/stable/2315408">2315408</a>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&amp;rft.genre=article&amp;rft.jtitle=American+Mathematical+Monthly&amp;rft.atitle=Generalized+Birthday+Problem&amp;rft.volume=73&amp;rft.issue=5&amp;rft.pages=%3Cspan+class%3D%22nowrap%22%3E385-%3C%2Fspan%3E387&amp;rft.date=1966&amp;rft_id=info%3Adoi%2F10.2307%2F2315408&amp;rft_id=https%3A%2F%2Fwww.jstor.org%2Fstable%2F2315408%23id-name%3DJSTOR&amp;rft.aulast=McKinney&amp;rft.aufirst=E.+H.&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3ABirthday+problem" class="Z3988"></span></li> <li><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222" /><cite id="CITEREFMosteller1962" class="citation journal cs1">Mosteller, F. (1962). "Understanding the Birthday Problem". <i><a href="/wiki/The_Mathematics_Teacher" class="mw-redirect" title="The Mathematics Teacher">The Mathematics Teacher</a></i>. <b>55</b> (5): <span class="nowrap">322–</span>325. <a href="/wiki/Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<a rel="nofollow" class="external text" href="https://doi.org/10.5951%2FMT.55.5.0322">10.5951/MT.55.5.0322</a>. <a href="/wiki/JSTOR_(identifier)" class="mw-redirect" title="JSTOR (identifier)">JSTOR</a>&#160;<a rel="nofollow" class="external text" href="https://www.jstor.org/stable/27956609">27956609</a>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&amp;rft.genre=article&amp;rft.jtitle=The+Mathematics+Teacher&amp;rft.atitle=Understanding+the+Birthday+Problem&amp;rft.volume=55&amp;rft.issue=5&amp;rft.pages=%3Cspan+class%3D%22nowrap%22%3E322-%3C%2Fspan%3E325&amp;rft.date=1962&amp;rft_id=info%3Adoi%2F10.5951%2FMT.55.5.0322&amp;rft_id=https%3A%2F%2Fwww.jstor.org%2Fstable%2F27956609%23id-name%3DJSTOR&amp;rft.aulast=Mosteller&amp;rft.aufirst=F.&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3ABirthday+problem" class="Z3988"></span> Reprinted in <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222" /><cite id="CITEREFMosteller2006" class="citation book cs1">Mosteller, Frederick (2006). "Understanding the Birthday Problem". <i>Selected Papers of Frederick Mosteller</i>. Springer Series in Statistics. pp.&#160;<span class="nowrap">349–</span>353. <a href="/wiki/Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<a rel="nofollow" class="external text" href="https://doi.org/10.1007%2F978-0-387-44956-2_21">10.1007/978-0-387-44956-2_21</a>. <a href="/wiki/ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&#160;<a href="/wiki/Special:BookSources/978-0-387-20271-6" title="Special:BookSources/978-0-387-20271-6"><bdi>978-0-387-20271-6</bdi></a>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=bookitem&amp;rft.atitle=Understanding+the+Birthday+Problem&amp;rft.btitle=Selected+Papers+of+Frederick+Mosteller&amp;rft.series=Springer+Series+in+Statistics&amp;rft.pages=%3Cspan+class%3D%22nowrap%22%3E349-%3C%2Fspan%3E353&amp;rft.date=2006&amp;rft_id=info%3Adoi%2F10.1007%2F978-0-387-44956-2_21&amp;rft.isbn=978-0-387-20271-6&amp;rft.aulast=Mosteller&amp;rft.aufirst=Frederick&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3ABirthday+problem" class="Z3988"></span></li> <li><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222" /><cite class="citation book cs1"><a href="/wiki/Leila_Schneps" title="Leila Schneps">Schneps, Leila</a>; <a href="/wiki/Coralie_Colmez" title="Coralie Colmez">Colmez, Coralie</a> (2013). "Math error number 5. The case of Diana Sylvester: cold hit analysis". <a href="/wiki/Math_on_Trial" title="Math on Trial"><i>Math on Trial. How Numbers Get Used and Abused in the Courtroom</i></a>. Basic Books. <a href="/wiki/ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&#160;<a href="/wiki/Special:BookSources/978-0-465-03292-1" title="Special:BookSources/978-0-465-03292-1"><bdi>978-0-465-03292-1</bdi></a>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=bookitem&amp;rft.atitle=Math+error+number+5.+The+case+of+Diana+Sylvester%3A+cold+hit+analysis&amp;rft.btitle=Math+on+Trial.+How+Numbers+Get+Used+and+Abused+in+the+Courtroom&amp;rft.pub=Basic+Books&amp;rft.date=2013&amp;rft.isbn=978-0-465-03292-1&amp;rft.aulast=Schneps&amp;rft.aufirst=Leila&amp;rft.au=Colmez%2C+Coralie&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3ABirthday+problem" class="Z3988"></span></li> <li><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222" /><cite class="citation book cs1">Sy M. Blinder (2013). <a rel="nofollow" class="external text" href="https://books.google.com/books?id=M7TCNAEACAAJ"><i>Guide to Essential Math: A Review for Physics, Chemistry and Engineering Students</i></a>. Elsevier. pp.&#160;<span class="nowrap">5–</span>6. <a href="/wiki/ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&#160;<a href="/wiki/Special:BookSources/978-0-12-407163-6" title="Special:BookSources/978-0-12-407163-6"><bdi>978-0-12-407163-6</bdi></a>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=book&amp;rft.btitle=Guide+to+Essential+Math%3A+A+Review+for+Physics%2C+Chemistry+and+Engineering+Students&amp;rft.pages=%3Cspan+class%3D%22nowrap%22%3E5-%3C%2Fspan%3E6&amp;rft.pub=Elsevier&amp;rft.date=2013&amp;rft.isbn=978-0-12-407163-6&amp;rft.au=Sy+M.+Blinder&amp;rft_id=https%3A%2F%2Fbooks.google.com%2Fbooks%3Fid%3DM7TCNAEACAAJ&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3ABirthday+problem" class="Z3988"></span></li></ul> <div class="mw-heading mw-heading2"><h2 id="External_links">External links</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Birthday_problem&amp;action=edit&amp;section=33" title="Edit section: External links"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <ul><li><a rel="nofollow" class="external text" href="http://www.efgh.com/math/birthday.htm">The Birthday Paradox accounting for leap year birthdays</a></li> <li><span class="citation mathworld" id="Reference-Mathworld-Birthday_Problem"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222" /><cite class="citation web cs1"><a href="/wiki/Eric_W._Weisstein" title="Eric W. Weisstein">Weisstein, Eric W.</a> <a rel="nofollow" class="external text" href="https://mathworld.wolfram.com/BirthdayProblem.html">"Birthday Problem"</a>. <i><a href="/wiki/MathWorld" title="MathWorld">MathWorld</a></i>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&amp;rft.genre=unknown&amp;rft.jtitle=MathWorld&amp;rft.atitle=Birthday+Problem&amp;rft.au=Weisstein%2C+Eric+W.&amp;rft_id=https%3A%2F%2Fmathworld.wolfram.com%2FBirthdayProblem.html&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3ABirthday+problem" class="Z3988"></span></span></li> <li><a rel="nofollow" class="external text" href="http://www.damninteresting.com/?p=402">A humorous article explaining the paradox</a></li> <li><a rel="nofollow" class="external text" href="http://wiki.stat.ucla.edu/socr/index.php/SOCR_EduMaterials_Activities_BirthdayExperiment">SOCR EduMaterials activities birthday experiment</a></li> <li><a rel="nofollow" class="external text" href="http://betterexplained.com/articles/understanding-the-birthday-paradox/">Understanding the Birthday Problem (Better Explained)</a></li> <li><a rel="nofollow" class="external text" href="http://www.matifutbol.com/en/eurobirthdays.html">Eurobirthdays 2012. A birthday problem.</a> A practical football example of the birthday paradox.</li> <li><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222" /><cite class="citation web cs1">Grime, James. <a rel="nofollow" class="external text" href="https://web.archive.org/web/20170225140726/http://www.numberphile.com/videos/23birthday.html">"23: Birthday Probability"</a>. <i>Numberphile</i>. <a href="/wiki/Brady_Haran" title="Brady Haran">Brady Haran</a>. Archived from <a rel="nofollow" class="external text" href="http://www.numberphile.com/videos/23birthday.html">the original</a> on 2017-02-25<span class="reference-accessdate">. Retrieved <span class="nowrap">2013-04-02</span></span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&amp;rft.genre=unknown&amp;rft.jtitle=Numberphile&amp;rft.atitle=23%3A+Birthday+Probability&amp;rft.aulast=Grime&amp;rft.aufirst=James&amp;rft_id=http%3A%2F%2Fwww.numberphile.com%2Fvideos%2F23birthday.html&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3ABirthday+problem" class="Z3988"></span></li> <li><a rel="nofollow" class="external text" href="https://www.wolframalpha.com/input/?i=birthday+paradox%2C+4+people%2C+100+possible+birthdays">Computing the probabilities of the Birthday Problem at WolframAlpha</a></li></ul> <style data-mw-deduplicate="TemplateStyles:r1130092004">.mw-parser-output .portal-bar{font-size:88%;font-weight:bold;display:flex;justify-content:center;align-items:baseline}.mw-parser-output .portal-bar-bordered{padding:0 2em;background-color:#fdfdfd;border:1px solid #a2a9b1;clear:both;margin:1em auto 0}.mw-parser-output .portal-bar-related{font-size:100%;justify-content:flex-start}.mw-parser-output .portal-bar-unbordered{padding:0 1.7em;margin-left:0}.mw-parser-output .portal-bar-header{margin:0 1em 0 0.5em;flex:0 0 auto;min-height:24px}.mw-parser-output .portal-bar-content{display:flex;flex-flow:row wrap;flex:0 1 auto;padding:0.15em 0;column-gap:1em;align-items:baseline;margin:0;list-style:none}.mw-parser-output .portal-bar-content-related{margin:0;list-style:none}.mw-parser-output .portal-bar-item{display:inline-block;margin:0.15em 0.2em;min-height:24px;line-height:24px}@media screen and (max-width:768px){.mw-parser-output .portal-bar{font-size:88%;font-weight:bold;display:flex;flex-flow:column wrap;align-items:baseline}.mw-parser-output .portal-bar-header{text-align:center;flex:0;padding-left:0.5em;margin:0 auto}.mw-parser-output .portal-bar-related{font-size:100%;align-items:flex-start}.mw-parser-output .portal-bar-content{display:flex;flex-flow:row wrap;align-items:center;flex:0;column-gap:1em;border-top:1px solid #a2a9b1;margin:0 auto;list-style:none}.mw-parser-output .portal-bar-content-related{border-top:none;margin:0;list-style:none}}.mw-parser-output .navbox+link+.portal-bar,.mw-parser-output .navbox+style+.portal-bar,.mw-parser-output .navbox+link+.portal-bar-bordered,.mw-parser-output .navbox+style+.portal-bar-bordered,.mw-parser-output .sister-bar+link+.portal-bar,.mw-parser-output .sister-bar+style+.portal-bar,.mw-parser-output .portal-bar+.navbox-styles+.navbox,.mw-parser-output .portal-bar+.navbox-styles+.sister-bar{margin-top:-1px}</style><div class="portal-bar noprint metadata noviewer portal-bar-bordered" role="navigation" aria-label="Portals"><span class="portal-bar-header"><a href="/wiki/Wikipedia:Contents/Portals" title="Wikipedia:Contents/Portals">Portal</a>:</span><ul class="portal-bar-content"><li class="portal-bar-item"><span class="nowrap"><span typeof="mw:File"><a href="/wiki/File:Nuvola_apps_edu_mathematics_blue-p.svg" class="mw-file-description"><img alt="icon" src="//upload.wikimedia.org/wikipedia/commons/thumb/3/3e/Nuvola_apps_edu_mathematics_blue-p.svg/19px-Nuvola_apps_edu_mathematics_blue-p.svg.png" decoding="async" width="19" height="19" class="mw-file-element" srcset="//upload.wikimedia.org/wikipedia/commons/thumb/3/3e/Nuvola_apps_edu_mathematics_blue-p.svg/29px-Nuvola_apps_edu_mathematics_blue-p.svg.png 1.5x, //upload.wikimedia.org/wikipedia/commons/thumb/3/3e/Nuvola_apps_edu_mathematics_blue-p.svg/38px-Nuvola_apps_edu_mathematics_blue-p.svg.png 2x" data-file-width="128" data-file-height="128" /></a></span> </span><a href="/wiki/Portal:Mathematics" title="Portal:Mathematics">Mathematics</a></li></ul></div> <!-- NewPP limit report Parsed by mw‐web.eqiad.main‐8669bc5c8‐96p8v Cached time: 20250318154940 Cache expiry: 2592000 Reduced expiry: false Complications: [vary‐revision‐sha1, show‐toc] CPU time usage: 1.335 seconds Real time usage: 1.706 seconds Preprocessor visited node count: 12575/1000000 Post‐expand include size: 151263/2097152 bytes Template argument size: 25137/2097152 bytes Highest expansion depth: 12/100 Expensive parser function count: 7/500 Unstrip recursion depth: 1/20 Unstrip post‐expand size: 107316/5000000 bytes Lua time usage: 0.609/10.000 seconds Lua memory usage: 10257664/52428800 bytes Number of Wikibase entities loaded: 0/400 --> <!-- Transclusion expansion time report (%,ms,calls,template) 100.00% 1219.066 1 -total 27.10% 330.400 2 Template:Reflist 19.02% 231.859 121 Template:Math 13.00% 158.496 8 Template:Cite_book 12.41% 151.312 117 Template:Val 9.57% 116.683 1 Template:Short_description 6.52% 79.425 2 Template:Pagetype 5.47% 66.651 9 Template:Cite_journal 5.11% 62.243 3 Template:Citation_needed 4.62% 56.281 2 Template:NumBlk --> <!-- Saved in parser cache with key enwiki:pcache:73242:|#|:idhash:canonical and timestamp 20250318154940 and revision id 1279006540. Rendering was triggered because: page-view --> </div><!--esi <esi:include src="/esitest-fa8a495983347898/content" /> --><noscript><img src="https://login.wikimedia.org/wiki/Special:CentralAutoLogin/start?useformat=desktop&amp;type=1x1&amp;usesul3=0" alt="" width="1" height="1" style="border: none; position: absolute;"></noscript> <div class="printfooter" data-nosnippet="">Retrieved from "<a dir="ltr" href="https://en.wikipedia.org/w/index.php?title=Birthday_problem&amp;oldid=1279006540">https://en.wikipedia.org/w/index.php?title=Birthday_problem&amp;oldid=1279006540</a>"</div></div> <div id="catlinks" class="catlinks" data-mw="interface"><div id="mw-normal-catlinks" class="mw-normal-catlinks"><a href="/wiki/Help:Category" title="Help:Category">Categories</a>: <ul><li><a href="/wiki/Category:Probability_theory_paradoxes" title="Category:Probability theory paradoxes">Probability theory paradoxes</a></li><li><a href="/wiki/Category:Probability_problems" title="Category:Probability problems">Probability problems</a></li><li><a href="/wiki/Category:Applied_probability" title="Category:Applied probability">Applied probability</a></li><li><a href="/wiki/Category:Birthdays" title="Category:Birthdays">Birthdays</a></li><li><a href="/wiki/Category:Mathematical_problems" title="Category:Mathematical problems">Mathematical problems</a></li><li><a href="/wiki/Category:Coincidence" title="Category:Coincidence">Coincidence</a></li></ul></div><div id="mw-hidden-catlinks" class="mw-hidden-catlinks mw-hidden-cats-hidden">Hidden categories: <ul><li><a href="/wiki/Category:CS1:_long_volume_value" title="Category:CS1: long volume value">CS1: long volume value</a></li><li><a href="/wiki/Category:Articles_with_short_description" title="Category:Articles with short description">Articles with short description</a></li><li><a href="/wiki/Category:Short_description_is_different_from_Wikidata" title="Category:Short description is different from Wikidata">Short description is different from Wikidata</a></li><li><a href="/wiki/Category:All_articles_with_unsourced_statements" title="Category:All articles with unsourced statements">All articles with unsourced statements</a></li><li><a href="/wiki/Category:Articles_with_unsourced_statements_from_September_2019" title="Category:Articles with unsourced statements from September 2019">Articles with unsourced statements from September 2019</a></li><li><a href="/wiki/Category:Articles_with_unsourced_statements_from_December_2016" title="Category:Articles with unsourced statements from December 2016">Articles with unsourced statements from December 2016</a></li></ul></div></div> </div> </main> </div> <div class="mw-footer-container"> <footer id="footer" class="mw-footer" > <ul id="footer-info"> <li id="footer-info-lastmod"> This page was last edited on 5 March 2025, at 23:19<span class="anonymous-show">&#160;(UTC)</span>.</li> <li id="footer-info-copyright">Text is available under the <a href="/wiki/Wikipedia:Text_of_the_Creative_Commons_Attribution-ShareAlike_4.0_International_License" title="Wikipedia:Text of the Creative Commons Attribution-ShareAlike 4.0 International License">Creative Commons Attribution-ShareAlike 4.0 License</a>; additional terms may apply. By using this site, you agree to the <a href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Terms_of_Use" class="extiw" title="foundation:Special:MyLanguage/Policy:Terms of Use">Terms of Use</a> and <a href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Privacy_policy" class="extiw" title="foundation:Special:MyLanguage/Policy:Privacy policy">Privacy Policy</a>. Wikipedia® is a registered trademark of the <a rel="nofollow" class="external text" href="https://wikimediafoundation.org/">Wikimedia Foundation, Inc.</a>, a non-profit organization.</li> </ul> <ul id="footer-places"> <li id="footer-places-privacy"><a href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Privacy_policy">Privacy policy</a></li> <li id="footer-places-about"><a href="/wiki/Wikipedia:About">About Wikipedia</a></li> <li id="footer-places-disclaimers"><a href="/wiki/Wikipedia:General_disclaimer">Disclaimers</a></li> <li id="footer-places-contact"><a href="//en.wikipedia.org/wiki/Wikipedia:Contact_us">Contact Wikipedia</a></li> <li id="footer-places-wm-codeofconduct"><a href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Universal_Code_of_Conduct">Code of Conduct</a></li> <li id="footer-places-developers"><a href="https://developer.wikimedia.org">Developers</a></li> <li id="footer-places-statslink"><a href="https://stats.wikimedia.org/#/en.wikipedia.org">Statistics</a></li> <li id="footer-places-cookiestatement"><a href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Cookie_statement">Cookie statement</a></li> <li id="footer-places-mobileview"><a href="//en.m.wikipedia.org/w/index.php?title=Birthday_problem&amp;mobileaction=toggle_view_mobile" class="noprint stopMobileRedirectToggle">Mobile view</a></li> </ul> <ul id="footer-icons" class="noprint"> <li id="footer-copyrightico"><a href="https://www.wikimedia.org/" class="cdx-button cdx-button--fake-button cdx-button--size-large cdx-button--fake-button--enabled"><picture><source media="(min-width: 500px)" srcset="/static/images/footer/wikimedia-button.svg" width="84" height="29"><img src="/static/images/footer/wikimedia.svg" width="25" height="25" alt="Wikimedia Foundation" lang="en" loading="lazy"></picture></a></li> <li id="footer-poweredbyico"><a href="https://www.mediawiki.org/" class="cdx-button cdx-button--fake-button cdx-button--size-large cdx-button--fake-button--enabled"><picture><source media="(min-width: 500px)" srcset="/w/resources/assets/poweredby_mediawiki.svg" width="88" height="31"><img src="/w/resources/assets/mediawiki_compact.svg" alt="Powered by MediaWiki" lang="en" width="25" height="25" loading="lazy"></picture></a></li> </ul> </footer> </div> </div> </div> <div class="vector-header-container vector-sticky-header-container"> <div id="vector-sticky-header" class="vector-sticky-header"> <div class="vector-sticky-header-start"> <div class="vector-sticky-header-icon-start vector-button-flush-left vector-button-flush-right" aria-hidden="true"> <button class="cdx-button cdx-button--weight-quiet cdx-button--icon-only vector-sticky-header-search-toggle" tabindex="-1" data-event-name="ui.vector-sticky-search-form.icon"><span class="vector-icon mw-ui-icon-search mw-ui-icon-wikimedia-search"></span> <span>Search</span> </button> </div> <div role="search" class="vector-search-box-vue vector-search-box-show-thumbnail vector-search-box"> <div class="vector-typeahead-search-container"> <div class="cdx-typeahead-search cdx-typeahead-search--show-thumbnail"> <form action="/w/index.php" id="vector-sticky-search-form" class="cdx-search-input cdx-search-input--has-end-button"> <div class="cdx-search-input__input-wrapper" data-search-loc="header-moved"> <div class="cdx-text-input cdx-text-input--has-start-icon"> <input class="cdx-text-input__input" type="search" name="search" placeholder="Search Wikipedia"> <span class="cdx-text-input__icon cdx-text-input__start-icon"></span> </div> <input type="hidden" name="title" value="Special:Search"> </div> <button class="cdx-button cdx-search-input__end-button">Search</button> </form> </div> </div> </div> <div class="vector-sticky-header-context-bar"> <nav aria-label="Contents" class="vector-toc-landmark"> <div id="vector-sticky-header-toc" class="vector-dropdown mw-portlet mw-portlet-sticky-header-toc vector-sticky-header-toc vector-button-flush-left" > <input type="checkbox" id="vector-sticky-header-toc-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-sticky-header-toc" class="vector-dropdown-checkbox " aria-label="Toggle the table of contents" > <label id="vector-sticky-header-toc-label" for="vector-sticky-header-toc-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only " aria-hidden="true" ><span class="vector-icon mw-ui-icon-listBullet mw-ui-icon-wikimedia-listBullet"></span> <span class="vector-dropdown-label-text">Toggle the table of contents</span> </label> <div class="vector-dropdown-content"> <div id="vector-sticky-header-toc-unpinned-container" class="vector-unpinned-container"> </div> </div> </div> </nav> <div class="vector-sticky-header-context-bar-primary" aria-hidden="true" ><span class="mw-page-title-main">Birthday problem</span></div> </div> </div> <div class="vector-sticky-header-end" aria-hidden="true"> <div class="vector-sticky-header-icons"> <a href="#" class="cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only" id="ca-talk-sticky-header" tabindex="-1" data-event-name="talk-sticky-header"><span class="vector-icon mw-ui-icon-speechBubbles mw-ui-icon-wikimedia-speechBubbles"></span> <span></span> </a> <a href="#" class="cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only" id="ca-subject-sticky-header" tabindex="-1" data-event-name="subject-sticky-header"><span class="vector-icon mw-ui-icon-article mw-ui-icon-wikimedia-article"></span> <span></span> </a> <a href="#" class="cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only" id="ca-history-sticky-header" tabindex="-1" data-event-name="history-sticky-header"><span class="vector-icon mw-ui-icon-wikimedia-history mw-ui-icon-wikimedia-wikimedia-history"></span> <span></span> </a> <a href="#" class="cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only mw-watchlink" id="ca-watchstar-sticky-header" tabindex="-1" data-event-name="watch-sticky-header"><span class="vector-icon mw-ui-icon-wikimedia-star mw-ui-icon-wikimedia-wikimedia-star"></span> <span></span> </a> <a href="#" class="cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only" id="ca-edit-sticky-header" tabindex="-1" data-event-name="wikitext-edit-sticky-header"><span class="vector-icon mw-ui-icon-wikimedia-wikiText mw-ui-icon-wikimedia-wikimedia-wikiText"></span> <span></span> </a> <a href="#" class="cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only" id="ca-ve-edit-sticky-header" tabindex="-1" data-event-name="ve-edit-sticky-header"><span class="vector-icon mw-ui-icon-wikimedia-edit mw-ui-icon-wikimedia-wikimedia-edit"></span> <span></span> </a> <a href="#" class="cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only" id="ca-viewsource-sticky-header" tabindex="-1" data-event-name="ve-edit-protected-sticky-header"><span class="vector-icon mw-ui-icon-wikimedia-editLock mw-ui-icon-wikimedia-wikimedia-editLock"></span> <span></span> </a> </div> <div class="vector-sticky-header-buttons"> <button class="cdx-button cdx-button--weight-quiet mw-interlanguage-selector" id="p-lang-btn-sticky-header" tabindex="-1" data-event-name="ui.dropdown-p-lang-btn-sticky-header"><span class="vector-icon mw-ui-icon-wikimedia-language mw-ui-icon-wikimedia-wikimedia-language"></span> <span>39 languages</span> </button> <a href="#" class="cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--action-progressive" id="ca-addsection-sticky-header" tabindex="-1" data-event-name="addsection-sticky-header"><span class="vector-icon mw-ui-icon-speechBubbleAdd-progressive mw-ui-icon-wikimedia-speechBubbleAdd-progressive"></span> <span>Add topic</span> </a> </div> <div class="vector-sticky-header-icon-end"> <div class="vector-user-links"> </div> </div> </div> </div> </div> <div class="mw-portlet mw-portlet-dock-bottom emptyPortlet" id="p-dock-bottom"> <ul> </ul> </div> <script>(RLQ=window.RLQ||[]).push(function(){mw.config.set({"wgHostname":"mw-web.eqiad.main-8559bb54cb-fkj97","wgBackendResponseTime":280,"wgPageParseReport":{"limitreport":{"cputime":"1.335","walltime":"1.706","ppvisitednodes":{"value":12575,"limit":1000000},"postexpandincludesize":{"value":151263,"limit":2097152},"templateargumentsize":{"value":25137,"limit":2097152},"expansiondepth":{"value":12,"limit":100},"expensivefunctioncount":{"value":7,"limit":500},"unstrip-depth":{"value":1,"limit":20},"unstrip-size":{"value":107316,"limit":5000000},"entityaccesscount":{"value":0,"limit":400},"timingprofile":["100.00% 1219.066 1 -total"," 27.10% 330.400 2 Template:Reflist"," 19.02% 231.859 121 Template:Math"," 13.00% 158.496 8 Template:Cite_book"," 12.41% 151.312 117 Template:Val"," 9.57% 116.683 1 Template:Short_description"," 6.52% 79.425 2 Template:Pagetype"," 5.47% 66.651 9 Template:Cite_journal"," 5.11% 62.243 3 Template:Citation_needed"," 4.62% 56.281 2 Template:NumBlk"]},"scribunto":{"limitreport-timeusage":{"value":"0.609","limit":"10.000"},"limitreport-memusage":{"value":10257664,"limit":52428800},"limitreport-logs":"anchor_id_list = table#1 {\n [\"CITEREFBloom1973\"] = 1,\n [\"CITEREFBorgsChayesPittel2001\"] = 1,\n [\"CITEREFBrink2012\"] = 1,\n [\"CITEREFCormen\"] = 1,\n [\"CITEREFFlajoletGrabnerKirschenhoferProdinger1995\"] = 1,\n [\"CITEREFFletcher2014\"] = 1,\n [\"CITEREFFrankGoldsteinKacPrager1964\"] = 1,\n [\"CITEREFKnuth1973\"] = 1,\n [\"CITEREFMario_Cortina_BorjaJohn_Haigh2007\"] = 1,\n [\"CITEREFMathis1991\"] = 1,\n [\"CITEREFMight\"] = 1,\n [\"CITEREFMosteller1962\"] = 1,\n [\"CITEREFMosteller2006\"] = 1,\n [\"CITEREFSteele2004\"] = 1,\n [\"CITEREFSuzukiTonien2006\"] = 1,\n [\"CITEREFVoracekTranFormann2008\"] = 1,\n}\ntemplate_list = table#1 {\n [\"0\"] = 2,\n [\"=\"] = 21,\n [\"Citation needed\"] = 3,\n [\"Cite book\"] = 8,\n [\"Cite conference\"] = 1,\n [\"Cite journal\"] = 9,\n [\"Cite web\"] = 4,\n [\"Color\"] = 3,\n [\"DEFAULTSORT:Birthday Problem\"] = 1,\n [\"EquationNote\"] = 2,\n [\"EquationRef\"] = 2,\n [\"For-multi\"] = 1,\n [\"Frac\"] = 2,\n [\"Harv\"] = 1,\n [\"Harvard citations\"] = 3,\n [\"Harvid\"] = 1,\n [\"Main\"] = 1,\n [\"Math\"] = 121,\n [\"MathWorld\"] = 1,\n [\"Mvar\"] = 72,\n [\"N \\\\choose 2\"] = 1,\n [\"NumBlk\"] = 2,\n [\"OEIS\"] = 3,\n [\"Overline\"] = 10,\n [\"Parabreak\"] = 2,\n [\"Pars\"] = 7,\n [\"Portal bar\"] = 1,\n [\"Reflist\"] = 2,\n [\"Refn\"] = 2,\n [\"Sfrac\"] = 23,\n [\"Short description\"] = 1,\n [\"Sqrt\"] = 14,\n [\"Su\"] = 5,\n [\"Val\"] = 117,\n [\"Var\"] = 1,\n [\"Wikicite\"] = 1,\n}\narticle_whitelist = table#1 {\n}\nciteref_patterns = table#1 {\n}\n"},"cachereport":{"origin":"mw-web.eqiad.main-8669bc5c8-96p8v","timestamp":"20250318154940","ttl":2592000,"transientcontent":false}}});});</script> <script type="application/ld+json">{"@context":"https:\/\/schema.org","@type":"Article","name":"Birthday problem","url":"https:\/\/en.wikipedia.org\/wiki\/Birthday_problem","sameAs":"http:\/\/www.wikidata.org\/entity\/Q339000","mainEntity":"http:\/\/www.wikidata.org\/entity\/Q339000","author":{"@type":"Organization","name":"Contributors to Wikimedia projects"},"publisher":{"@type":"Organization","name":"Wikimedia Foundation, Inc.","logo":{"@type":"ImageObject","url":"https:\/\/www.wikimedia.org\/static\/images\/wmf-hor-googpub.png"}},"datePublished":"2002-08-19T07:14:46Z","dateModified":"2025-03-05T23:19:28Z","image":"https:\/\/upload.wikimedia.org\/wikipedia\/commons\/e\/e7\/Birthday_Paradox.svg","headline":"mathematical problem"}</script> </body> </html>

Pages: 1 2 3 4 5 6 7 8 9 10