Another service from Omega

The Birthday Problem



What is the chance that at least two people in a group of k people will have the same birthday?


By same birthday we mean same day and month but not necessarily the same year. We assume further that the birthdays of the k people are unrelated and each equally likely to be in any of the 365 days of the year.


Define the proposition:

E = "at least 2 equal birthdays"

Let S denote the statement of the problem above. Then, the probability of E given S is,

Pr(E|S) = 1 - Pr(not E |S)


(not E) = "all different birthdays"

So the problem reduces to the computation of the number of ways in which k people can have different birthdays. There are three cases. First, if k > 365 then necessarily at least 2 people will have the same birthday. Second, if k < 2 then there is no problem. Third, when 1 Hence, the total number of ways is,


The total number of ways in which k people can have their birthdays (with out constraints) is,


The probability we are looking for is then,

> answer := 1 - a!/((a-k)!*a^k);

        answer := 1 - ----------------
                      (365 - k)! 365

This is a function of k that can be easily computed with

> p := k -> evalf((1 - 365!/((365-k)!*365^k)),4):
> p10 := p(10); p20:=p(20); p23 := p(23); p40:=p(40); p50:=p(50);

                                 p10 := .1169

                                 p20 := .4114

                                 p23 := .5073

                                 p40 := .8912

                                 p50 := .9704

Link to the commands in this file
Carlos Rodriguez <>
Last modified: Thu Sep 3 11:55:09 EDT 1998