All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars
 perplexus dot info

 Happy Birthday (3) (Posted on 2006-06-09)
In Happy Birthday, the question was if there are N people in a room, what is the probability that there are at least two people in the room who share a birthday?

What if instead exactly two was required? If there are N people in a room, what is the probability that there are exactly two people in the room who share a birthday?

(Note: Assume leap year doesn't exist, and the birthdays are randomly distributed throughout the year.)

 No Solution Yet Submitted by Sir Percivale Rating: 4.0000 (3 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
 solution | Comment 3 of 12 |

The probability that the first two have the same birthday, but the rest do not match any others is:

(1/365) * (364*363*...*(367-n)) / 365^(n-2)

(verify that for n=4, the last factor shown is 367-4=363 so there are 2 factors in the numerator.)

This has to be multiplied by C(n,2) as any 2 could match, not just the first two.  Doing that, and simplifying:

(n!/(2*(n-2)!)  *  1/365  *  (364!/(366-n)!)/365^(n-2)

= n! * 364! / (2 * (n-2)! * 365^(n-1) * (366-n)!)

`2       0.00273972602739726023       0.00819665978607618684       0.01630349316353784025       0.02694915308310821076       0.0399807298479536887       0.05520626806402372278       0.07239835702277448939       0.09129843691873949310      0.111621719109554791111      0.133062603358604737312      0.155300463097987994813      0.17800566156337254114      0.200845657407805273415      0.223491058190350230516      0.245621483913308589917      0.26693111037154084218      0.287133773177058145519      0.305967527517600073820      0.323198575490432954721      0.33862449163857041822      0.35207669747078759923      0.363422156606506390524      0.372564283086520623525      0.379443075686688663626      0.384034510164175992227      0.386349238718590203728      0.386430661108204237429      0.3843524444629749330      0.380215578622375395531      0.374145060645315268732      0.366286305946829194633      0.356801384369947095334      0.345865177554498374335      0.333661549454817028636      0.320379615092957269437      0.306210183975343112338      0.291342444448990836439      0.275960944049721642240      0.260242909024539227241      0.244355934107621447842      0.228456061682810463243      0.212686258026389266544      0.197175283696741308345      0.1820369455728436846      0.16736970973403547847      0.15325664745204831648      0.139765681106954366549      0.126950092859723867150      0.114849256382798133151      0.103489550789218602952      0.092885415996021957153      0.083040509965393360754      0.073948930423344498555      0.065596466583850689856      0.057961849925131588757      0.051017976995122050958      0.044733081394646643759      0.039071836342394559460      0.03399637342592856861      0.029467207168255521262      0.025444058792315612163      0.021886575970825448264      0.018754948352905306765      0.016010421229290331466      0.013615711821107950567      0.011535334356344354368      0.009735841350485405169      0.008185989362039701570      0.006856837986978460771      0.005721791031738706872      0.004756588708967911273      0.003939259381511453274      0.003250038885461618375      0.002671264837365713676      0.002187252615445395177      0.001784158937092079478      0.001449838167264947879      0.001173695711852413980      0.000946542098494254481      0.000760450641710348482      0.000608620941670234383      0.000485249884561162384      0.000385411301563245985      0.000304945004075623186      0.000240355543655952787      0.000188720742738404788      0.0001476098017111689      0.000115010603493544990      0.000089265701902057191      0.000069016388147516392      0.000053154174128832993      0.00004077900542378294      0.000031163515103784895      0.000023722646347968896      0.000017988002547034597      0.000013586324057875598      0.000010221537523222499      0.00000765987384737100     0.0000057176022288169101     0.0000042509783168505102     0.0000031480532576567103     0.0000023220361910267104     0.0000017059450415515105     0.0000012483188746663106     0.0000009097995254615107     0.0000006604206861927108     0.0000004774693056134109     0.0000003438072413893110     0.0000002465609009152111     0.000000176103419892112     0.0000001252680864786113     0.000000088743542345114     0.0000000626110872875115     0.0000000439924671982116     0.0000000307830972108117     0.0000000214509968652118     0.0000000148859988165119     0.000000010287216885120     0.0000000070794777913`

 Posted by Charlie on 2006-06-09 11:50:07

 Search: Search body:
Forums (0)