Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

USING R STUDIO Make a loop of M=10000 iterations that draws a sample size of n=5 random numbers from a normal distribution each time. Let

USING R STUDIO

Make a 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.

Then repeat using exactly the same code (using a normal distribution in your CI calculation), but this time using the standard deviation estimated from each sample rather than the known population standard deviation for the SEM and 95% CI (which is more realistic). This calculation is not quite correct- what do you notice about the fraction overlapping in this case, and why do you get that result?

Then repeat the code, again using the estimated sample standard deviation but now using the correct formulation of 95% CI (using a t-distribution). What fraction overlaps now?

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Linear Algebra

Authors: Jim Hefferon

1st Edition

978-0982406212, 0982406215

More Books

Students also viewed these Mathematics questions

Question

-6 -4 -2 2 4 7) y=-2. 2 10: =12 14 16 18

Answered: 1 week ago