Reference no: EM132213370 
                                                                               
                                       
Write a script in R that computes the probability that two or more students have a same birthday for either of the following cases.
(a) For a class of 26 students
(b) For a class of N students, where N is specified once in the beginning of the code, or inputted by the user.
Next, you will write a code to simulate multiple classrooms.
Assume that each classroom has 26 students. Additionally, each student has an equally likely chance of having one of the 365 birthdays.
(a) Let N = 100 be the number of classrooms (ie. You are sampling 100 random classrooms of 26 students.)
Record the number of classrooms, out of 100, in which there are two or more students who share a birthday. Find the proportion of the classrooms in which there are two or more students who share a birthday.
(b) Repeat (a) for 500, 1000 and 2000 classrooms.
(c) Summarize the results from Problem 3 in a table and with complete sentences (typed). Include your codes in your write-up.