Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

(I am stuck on this problem) (I got part a) but part b,c,d,e I am lost. How do I code from part b,c,d,e in R

image text in transcribed (I am stuck on this problem) (I got part a) but part b,c,d,e I am lost. How do I code from part b,c,d,e in R Studio? Part b ask to use the function Replicate
11.3 (Birthday problem). Suppose you have a class of n students and yo u're interested in the probability that at least two students in the class share the same birthday. If one assumes that each birthday is equally likely from the set sample of size n chosen with replacement from the set 1, 2, , 365)], then collecting birthdays can be viewed as a a. Write a fiunction with argument n that samples n birthdays and computes b. Using the replicate function, repeat this simulation 1000 times for the c. From the output, approximate the probability that there is at least one d. It can be shown that the exact probability of a birthday match is given by the number of unique birthdays observed special case of n 30 students. matching birthday among the 30 birthdays 365 P30 36530 P(match)1- where N Pk is the number of ways of arranging a sample of k of N distinct items. Compare the approximate probability in part (d) with the exact probability. e. The R function pbirthday, with argument n,computes the (approximate probability of at least one match among n birthdays. Use this function to check your answer in part (d)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

PostgreSQL Up And Running A Practical Guide To The Advanced Open Source Database

Authors: Regina Obe, Leo Hsu

3rd Edition

1491963417, 978-1491963418

More Books

Students also viewed these Databases questions

Question

Why do HCMSs exist? Do they change over time?

Answered: 1 week ago