'What is the probability that at least two people in a
'random group of 23 will have the same birthday?
'Modified by statisticsbyjim.com
COPY 100000 rptCount
REPEAT rptCount
SAMPLE 23 1,365 birthdays 'Randomly select 23 birthdays
MULTIPLES birthdays >= 2 sameBirthdayCount 'how many duplicates, triplicates, quads etc?
SCORE sameBirthdayCount sameBirthdayCountScore 'keep score in an accumulating vector
END
COUNT sameBirthdayCountScore >= 1 successes 'how often were one or more birthdays replicated?
DIVIDE successes rptCount probability
PRINT probability
HISTOGRAM percent binsize 1 sameBirthdayCountScore