Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Suppose that people are questioned one-at-a-time until for the first time there is a birthday match, that is, until two people are found who have
Suppose that people are questioned one-at-a-time until for the first time there is a birthday match, that is, until two people are found who have the same birthday. If we assume that each person is equally likely to have been born on each of the 365 days in a year, how many people will be questioned until a match is obtained? More precisely, if this experiment is repeated many times under statistically identical conditions, how many people, on average, will be questioned each time the experiment is performed? Adapt and run the following simulation. (It is written in BASIC, but you may use any language you like.) Fill in the table. Attach a printout of your code and output. Print out only the values indicated in the table 100 J-1 110 N N1 20 IF RND > N/365 THEN 110 130 M-M N+1 140 PRINT J, N+ 1, M/J 150 N-0 160 J=J+1 170 GOTo 110 Before running the simulation, estimate the long-run average here Number Questioned in this Experiment Average Number Questioned per Experiment Experiment 4 10 25 50 100 1000 10000
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