The Question is as follows:

Statisticians are prone to trying to impress their friends with random facts that

may not be mathematically intuitive. One such fact that is repeated ad nauseum

relates to the probability of people sharing a birthday. The common claim is that

the probability of at least two people sharing a birthday in a room of randomly

selected people is already more than 50% when there are only 25 people in the

room and more than 99% when there are only 60 people in the room. The goal

of this problem is to understand where this claim comes from and propose a slight

modication to more accurately calculate these probabilities.

To calculate the probability of at least two people sharing a birthday, there are two

assumptions that are typically made:

The year consists of 365 days, so leap years cannot happen and February 29 is

ignored.

Births occurs uniformly over the year. This means that the probability of

having a birthday of March 2 is the same as that of having a birthday of

November 21 (or any other date, for that matter).

For the rst part of this problem, we will work under these two assumptions.

(a) Calculate the probability of at least two people sharing a birthday in a room

of 1, 2, : : :, 5 randomly chosen people. Then produce a general formula for

calculating this probability for a room consisting of n randomly chosen people

(for n 1), and use this to calculate the probability for rooms consisting of

25 and 60 people to verify the claim. Note that you must use R to carryout probability calculations, and both your R code and output must

be included with your answer.

The most recent formula I came up with:

A[i] = (choose(i,2)*choose(365,1)^(i-1)*choose(1,1))/365^i

I have been stuck on this for far too long if someone could point me in the right direction that would be very helpful. Thanks