Covid-19: Estimating Prevalence
Herd immunity refers to the state when enough people in the population become immune to COVID-19 that the spread of the coronavirus slows or stops. The big question is what proportion of the population needs to be immune to achieve this protection.
If herd immunity is a possibility, it would help policy makers and the public know how many people are immune. Since it is infeasible to test everyone (the population), we can take a sample.
Assume that you are the epidemiologist for the state of California, which has
• Population = 40,000,000
• Number of People with Immunity = 9,000,000
Both of these are population parameters. Remember that the 2nd parameter (9 MM with immunity) is an assumed number and in real-life, we don’t know it. How many people do we test? If you can randomly sample individuals in California and test them for immunity, how large should your sample size be?
Note: set your seed as 1234 to generate the same random samples as the answer key.
Hint: this will involved a loop