Question: Solve using MatLab Problem 6. The Birthday Problem. If there are a group of n people in a room, what is the probability that two
Solve using MatLab

Problem 6. The Birthday Problem. If there are a group of n people in a room, what is the probability that two or more of them have the same birthday [month and day only, ignore the year]. It is possible to determine the answer to this question by simulation. Write a function that calculates the probability that two or more of n people will have the same birthday, where n is the calling argument. [HINT: To do this, the function should create an array of size n and generate n birthdays in the range 1 to 365 randomly. It should then check to see if any of the n birthdays are identical. The function should perform this experiment at least 5000 times and calculate the fraction of those times in which two or more people had the same birthday.] Then, write a test program [calling program] that calculates and prints out [using a user defined function] the probability that 2 or more of n people witll have the same birthday for n-2, 3, 4, 40. LastName FirstName_P6_xxxxx Notes: the xxxx can be whatever you want
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
