Question
Make loop of M=10000 iterations that draws a sample size of n=5 random numbers from a normal distribution each time. Let this normal distribution be
Make loop of M=10000 iterations that draws a sample size of n=5 random numbers from a normal distribution each time. Let this normal distribution be defined by population parameters of mean (mu) = 2.0 and sigma (standard deviation) = 2.0. At each iteration, estimate the sample mean, estimate the standard error of the mean (SEM) and from that calculate a 95% confidence interval using the true population standard deviation (which is of course known exactly in this simulation). What R distribution function do you use here and why?
In your code, calculate the following:
1. Compute the fraction of iterations in which the true population mean (mu) is within the bounds of your calculated 95% confidence interval.
2. Explain whether the value you calculated is what you expected.
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