Answered step by step
Verified Expert Solution
Question
1 Approved Answer
In Matlab, simulate n = 10,000 trials of this birthday experiment for a group of NN = 23 unrelated individuals. Determine whether at least two
In Matlab, simulate n = 10,000 trials of this birthday experiment for a group of NN = 23 unrelated individuals. Determine whether at least two individuals share a birthday in each trial. Then, compute the ratio of the number of trials in which at least two individuals share a birthday to the total number of trials. n. How well does this number compare with what you obtained theoretically in part a)? Hint: The basic structure of the MATLAB code can be as follows: 00; This sets the number of trials of the experiment N = 23; This sets the number of unrelated individuals in the group x=0; This initializes a variable that counts the no. of times Sa birthday coincidence occurs for i=1:1 Sample N days out of 365 with replacement Determine if there is a coincidence in your sampled set of dates If there is a coincidence, update the value of x % Otherwise, keep x unchanged end prob = x; % This is the desired probability In Matlab, simulate n = 10,000 trials of this birthday experiment for a group of NN = 23 unrelated individuals. Determine whether at least two individuals share a birthday in each trial. Then, compute the ratio of the number of trials in which at least two individuals share a birthday to the total number of trials. n. How well does this number compare with what you obtained theoretically in part a)? Hint: The basic structure of the MATLAB code can be as follows: 00; This sets the number of trials of the experiment N = 23; This sets the number of unrelated individuals in the group x=0; This initializes a variable that counts the no. of times Sa birthday coincidence occurs for i=1:1 Sample N days out of 365 with replacement Determine if there is a coincidence in your sampled set of dates If there is a coincidence, update the value of x % Otherwise, keep x unchanged end prob = x; % This is the desired probability
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started