Use R to tackle the following problem
Suppose there is a class of 23 people with birthdays given by the random variables X1, . . . , X23. Suppose that the random variables are independent and that each Xi has the property that P(Xi = k) = 1 365 for 1 ≤ k ≤ 365; thus we make the assumption that there are no leap years and that people are equally likely to be born on each day of the year. By running simulations, estimate the probability that no two people have the same birthday
We will use the folowing steps to simulate
The therorectical probability that no two people have the same birthday
Now the R code (all statements starting with # are coments)
The output is
Get Answers For Free
Most questions answered within 1 hours.