Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Birthday problem
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Calculating the probability== From a [[permutation]]s perspective, let the event {{math|''A''}} be the probability of finding a group of 23 people without any repeated birthdays. And let the event {{math|''B''}} be the probability of finding a group of 23 people with at least two people sharing same birthday, {{math|''P''(''B'') {{=}} 1 β ''P''(''A'')}}. This is such that {{math|''P''(''A'')}} is the ratio of the total number of birthdays, <math>V_{nr}</math>, without repetitions and order matters (e.g. for a group of 2 people, mm/dd birthday format, one possible outcome is <math>\left \{ \left \{01/02,05/20\right \},\left \{05/20,01/02\right \},\left \{10/02,08/04\right\},...\right \}</math>) divided by the total number of birthdays with repetition and order matters, <math>V_{t}</math>, as it is the total space of outcomes from the experiment (e.g. 2 people, one possible outcome is <math>\left \{ \left \{01/02,01/02\right \},\left \{10/02,08/04\right \},...\right \}</math>). Therefore <math>V_{nr}</math> and <math>V_{t}</math> are [[permutation]]s. :<math>\begin{align} V_{nr} &= \frac{n!}{(n-k)!} = \frac{365!}{(365-23)!} \\[8pt] V_t &= n^k = 365^{23} \\[8pt] P(A) &= \frac{V_{nr}}{V_t} \approx 0.492703 \\[8pt] P(B) &= 1 - P(A) \approx 1 - 0.492703 \approx 0.507297 \quad (50.7297\%)\end{align}</math> Another way the birthday problem can be solved is by asking for an approximate probability that in a group of {{mvar|n}} people at least two have the same birthday. For simplicity, [[leap year]]s, [[twin]]s, [[selection bias]], and seasonal and weekly variations in birth rates{{refn|see [[Birthday#Distribution through the year]]}} 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. For independent birthdays, a [[Discrete uniform distribution|uniform distribution]] 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.<ref>{{Harv|Bloom|1973}}</ref><ref>{{cite book |author-first = J. Michael |author-last = Steele |title = The CauchyβSchwarz Master Class |url = https://archive.org/details/cauchyschwarzmas00stee_431 |url-access = limited | pages = [https://archive.org/details/cauchyschwarzmas00stee_431/page/n217 206], 277 |date=2004 |publisher = Cambridge University Press |location=Cambridge | isbn = 9780521546775 }}</ref> 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.<ref name="Borja">{{cite journal |author1 = Mario Cortina Borja |author2 = John Haigh |title = The Birthday Problem |journal = Significance |date = September 2007 |volume = 4 |issue = 3 |pages = 124β127 |publisher = Royal Statistical Society |doi = 10.1111/j.1740-9713.2007.00246.x|doi-access = free }}</ref> The goal is to compute {{math|''P''(''B'')}}, the probability that at least two people in the room have the same birthday. However, it is simpler to calculate {{math|''P''(''A''β²)}}, the probability that no two people in the room have the same birthday. Then, because {{math|''B''}} and {{math|''A''β²}} are the only two possibilities and are also [[mutually exclusive events|mutually exclusive]], {{math|''P''(''B'') {{=}} 1 β ''P''(''A''β²).}} Here is the calculation of {{math|''P''(''B'')}} for 23 people. Let the 23 people be numbered 1 to 23. The [[event (probability theory)|event]] 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 [[conditional probability]]: the probability of Event 2 is {{sfrac|364|365}}, 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 {{sfrac|363|365}}, 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 {{sfrac|343|365}}. Finally, the principle of conditional probability implies that {{math|''P''(''A''β²)}} is equal to the product of these individual probabilities: {{NumBlk|:|<math>P(A')=\frac{365}{365}\times\frac{364}{365}\times\frac{363}{365}\times\frac{362}{365}\times\cdots\times\frac{343}{365}</math>|{{EquationRef|1}}}} The terms of equation ({{EquationNote|1}}) can be collected to arrive at: {{NumBlk|:|<math>P(A')=\left(\frac{1}{365}\right)^{23}\times(365\times364\times363\times\cdots\times343)</math>|{{EquationRef|2}}}} Evaluating equation ({{EquationNote|2}}) gives {{math|''P''(''A''β²) β 0.492703}} Therefore, {{math|''P''(''B'') β 1 β 0.492703 {{=}} 0.507297}} (50.7297%). This process can be generalized to a group of {{mvar|n}} people, where {{math|''p''(''n'')}} is the probability of at least two of the {{mvar|n}} people sharing a birthday. It is easier to first calculate the probability {{math|''{{overline|p}}''(''n'')}} that all {{mvar|n}} birthdays are ''different''. According to the [[pigeonhole principle]], {{math|''{{overline|p}}''(''n'')}} is zero when {{math|''n'' > 365}}. When {{math|''n'' β€ 365}}: :<math> \begin{align} \bar p(n) &= 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] &= \frac{ 365 \times 364 \times \cdots \times (365-n+1) }{ 365^n } \\[6pt] &= \frac{ 365! }{ 365^n (365-n)!} = \frac{n!\cdot\binom{365}{n}}{365^n} = \frac{_{365}P_n}{365^n}\end{align} </math> where {{math|!}} is the [[factorial]] operator, {{math|{{pars|s=160%|{{su|p=365|b=''n''|a=c}}}}}} is the [[binomial coefficient]] and {{math|''<sub>k</sub>P<sub>r</sub>''}} denotes [[permutation]]. 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 {{math|{{pars|s=160%|{{sfrac|364|365}}}}}}, the third cannot have the same birthday as either of the first two {{math|{{pars|s=160%|{{sfrac|363|365}}}}}}, and in general the {{mvar|n}}th birthday cannot be the same as any of the {{math|''n'' β 1}} preceding birthdays. The [[event (probability theory)|event]] of at least two of the {{mvar|n}} persons having the same birthday is [[complementary event|complementary]] to all {{mvar|n}} birthdays being different. Therefore, its probability {{math|''p''(''n'')}} is :<math> p(n) = 1 - \bar p(n). </math> The following table shows the probability for some other values of {{mvar|n}} (for this table, the existence of leap years is ignored, and each birthday is assumed to be equally likely): [[Image:Birthdaymatch.svg|thumb|right|upright=1.4|The probability that no two people share a birthday in a group of {{mvar|n}} people. Note that the vertical scale is logarithmic (each step down is 10<sup>20</sup> times less likely).]] :{| class="wikitable" !{{mvar|n}}!!{{math|''p''(''n'')}} |- |align=right|1 || {{0}}0.0% |- |align=right|5 || {{0}}2.7% |- |align=right|10 || 11.7% |- |align=right|20 || 41.1% |- |align=right|23 || 50.7% |- |align=right|30 || 70.6% |- |align=right|40 || 89.1% |- |align=right|50 || 97.0% |- |align=right|60 || 99.4% |- |align=right|70 || 99.9% |- |align=right|75 || 99.97% |- |align=right|100 || {{val|99.99997}}% |- |align=right|200 || {{val|99.9999999999999999999999999998}}% |- |align=right|300 || (100 β {{val|6|e=-80}})% |- |align=right|350 || (100 β {{val|3|e=-129}})% |- |align=right|365 || (100 β {{val|1.45|e=-155}})% |- |align=right|<!-- per assumptions in text -->β₯ 366<!-- leap years are ignored --> || 100% |}
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)