Intuiution
We want to know the probability that at least 2 people have their birthday on the same date.
Then:
A = Event that at least 2 people have their birthday on the same date.
A' = Event that people have their birthday on different dates.
P(A) = 1 - P(A')
P(A') =
The interpretation is that 365/365 is the probability that one person has a different birthday. As it is the only one then all days are available. Probability of 1 person haveing a different birthday is 100%
Then the probability that the second person have a different birthday than the first one is 364/365
or ~0.997260273973.
Then the probability that the third person have a different birthday than the first one and the second is 364/365 *363/365 or ~ 0.991795834115
AND SO ON.
As we are calculating the probability of A' = Event that people have their birthday on different dates. We should take 1 - P(A') to get P(A).
P(A) = (For the 2 people) is 1 - ~0.997260273973 = 0.002739726027397249
P(A) = (For the 3 people) is 1 - ~0.997260273973 * 0.994520547945. = 0.008204165884781345
Using python
for i in range(50):
a = math.factorial(365)/math.factorial(365-i) / 365**i
print(str(1 - a) , "the probability of at leats two people have the same bithday with " + str(i) +" people")
0.0 the probability of at leats two people have the same bithday with 0 people
0.0 the probability of at leats two people have the same bithday with 1 people
0.002739726027397249 the probability of at leats two people have the same bithday with 2 people
0.008204165884781345 the probability of at leats two people have the same bithday with 3 people
0.016355912466550326 the probability of at leats two people have the same bithday with 4 people
0.02713557369979358 the probability of at leats two people have the same bithday with 5 people
0.040462483649111536 the probability of at leats two people have the same bithday with 6 people
0.056235703095975365 the probability of at leats two people have the same bithday with 7 people
0.07433529235166902 the probability of at leats two people have the same bithday with 8 people
0.09462383388916673 the probability of at leats two people have the same bithday with 9 people
0.11694817771107757 the probability of at leats two people have the same bithday with 10 people
0.141141378321733 the probability of at leats two people have the same bithday with 11 people
0.16702478883806438 the probability of at leats two people have the same bithday with 12 people
0.19441027523242949 the probability of at leats two people have the same bithday with 13 people
0.22310251200497289 the probability of at leats two people have the same bithday with 14 people
0.25290131976368646 the probability of at leats two people have the same bithday with 15 people
0.2836040052528499 the probability of at leats two people have the same bithday with 16 people
0.31500766529656066 the probability of at leats two people have the same bithday with 17 people
0.34691141787178936 the probability of at leats two people have the same bithday with 18 people
0.37911852603153673 the probability of at leats two people have the same bithday with 19 people
0.41143838358058005 the probability of at leats two people have the same bithday with 20 people
0.4436883351652058 the probability of at leats two people have the same bithday with 21 people
0.4756953076625501 the probability of at leats two people have the same bithday with 22 people
0.5072972343239854 the probability of at leats two people have the same bithday with 23 people
0.5383442579145288 the probability of at leats two people have the same bithday with 24 people
0.5686997039694639 the probability of at leats two people have the same bithday with 25 people
0.598240820135939 the probability of at leats two people have the same bithday with 26 people
0.626859282263242 the probability of at leats two people have the same bithday with 27 people
0.6544614723423994 the probability of at leats two people have the same bithday with 28 people
0.680968537477777 the probability of at leats two people have the same bithday with 29 people
0.7063162427192686 the probability of at leats two people have the same bithday with 30 people
0.7304546337286438 the probability of at leats two people have the same bithday with 31 people
0.7533475278503207 the probability of at leats two people have the same bithday with 32 people
0.774971854175772 the probability of at leats two people have the same bithday with 33 people
0.7953168646201543 the probability of at leats two people have the same bithday with 34 people
0.8143832388747152 the probability of at leats two people have the same bithday with 35 people
0.8321821063798795 the probability of at leats two people have the same bithday with 36 people
0.8487340082163846 the probability of at leats two people have the same bithday with 37 people
0.8640678210821209 the probability of at leats two people have the same bithday with 38 people
0.878219664366722 the probability of at leats two people have the same bithday with 39 people
0.891231809817949 the probability of at leats two people have the same bithday with 40 people
0.9031516114817354 the probability of at leats two people have the same bithday with 41 people
0.9140304715618692 the probability of at leats two people have the same bithday with 42 people
0.9239228556561199 the probability of at leats two people have the same bithday with 43 people
0.9328853685514263 the probability of at leats two people have the same bithday with 44 people
0.940975899465775 the probability of at leats two people have the same bithday with 45 people
0.9482528433672547 the probability of at leats two people have the same bithday with 46 people
0.9547744028332994 the probability of at leats two people have the same bithday with 47 people
0.9605979728794224 the probability of at leats two people have the same bithday with 48 people
0.9657796093226765 the probability of at leats two people have the same bithday with 49 people
Bonus below:
rate of change of probability as there are more people