Birthday Paradox.math

the birthday problem or birthday paradox concerns the probability that, in a set of n randomly chosen people, some pair of them will have the same birthday.

The 1st sheet is for at least 2 people share the same birthday where there are 365 equal birthdays available. 23 people are needed to have at least a 50% chance of at least one matching birthday.

bday-paradox-atleast2

1r. R code for birthday paradox. (uses Markov chain)

The more general problem of the first repeat or first repetition. Example being rolling a single standard die and showing the probabilities of getting the first repeat face on the Xth roll.

call function with: bday.tMax.dist.cum(6) where the interger value is the number of equal items with replacement.

No attempt is for the cumulative probabilitites that all show 1 instead of only 1.

for the Birthday paradox: mean = 24.6166, mode = 21, median = 23 (0.50729723432)

365 items bday.tMax.dist.cum(365) takes about 10 seconds to run