R Programming:
a.Choose 10 random values of X having the Normal(4, 1) distribution. Use t.test to compute the 95% confidence interval for the mean. Is 4 in your confidence interval?
b.Replicate the experiment in part a 10,000 times and compute the percentage of times the population mean 4 was included in the confidence interval.
c.Repeat part b, except sample your 10 values when X has the Exponential(1/4) distribution. What is the mean of X? What percentage of times did the confidence interval contain the population mean? It’s not 95%. Why?
d.Now repeat b. and c. using 100 values of X to make each confidence interval. What percentage of times did the confidence interval contain the population mean? Compare to part c.
Get Answers For Free
Most questions answered within 1 hours.