Question 855420
We assume that the 365 possible birthdays are equally likely.
If P(A) is the probability of at least two people in the room having the same birthday, it may be simpler to calculate P(A'), the probability of there not being any two people having the same birthday. Then, because A and A' are the only two possibilities and are also mutually exclusive, P(A) = 1 − P(A').
P(A') can be calculated as P(1) * P(2) * P(3) * ... * P(40).
P(A') = 365/365 * 364/365 * 363/365 * 362/365 * ... * 325/365
P(A') = (1/365)^40 * (365 * 364 * 363 *362* ... * 325)
note that we can generalize this to the following formula for any number of people, n
P(A') = 365! / ((365^n) * (365-n)!)
P(A') = 0.11
now P(A) = 1 - 0.11 = 0.89