Question: Exercise 7 . 2 7 - The Birthday Problem Make a matlab function BirthdayProblem.m with the declaration function p = BirthdayProblem ( n ) where
Exercise The Birthday Problem
Make a matlab function BirthdayProblem.m with the declaration
function BirthdayProblem
where n is a number of people and p is a probability vector. You can find the details of the Birthday Problem in the textbook,
but I am making the following modifications to the instructions:
The Birthday Problem primary function will create an vector of probabilities and a plot of those probabilities versus You
will perform a numerical experiment described in the problem's hint in a subfunction that your primary function calls.
So if I input
BirthdayProblem
p should be a vector of length that holds the probabilities of dots, people sharing a birthday and your program
should create a plot of these probabilities. Inside your program, each of these individual probabilities should be calculated by
calling a subfunction that runs the numerical experiment for a given value of people. Use a loop call the subfunction to do the
experiment times.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
