Question: For iid sample X1, . . . , Xn from population distribution F(x) with mean and variance 2 < , the 95% confidence bands for

For iid sample X1, . . . , Xn from population distribution F(x) with mean and variance 2 < , the 95% confidence bands for can be computed as low.band = X 1.96 / n; high.band = X + 1.96 / n, provided that is known, where X is the sample mean. (a) For given a vector x and = 3 as inputs, write an R function called my.conf to compute those low and high bands and choose a proper return value(s). Please do one error checking on x. (b) If is unknown, can be replaced by the sample standard deviation of x (to compute confidence bands). With only input x, write an R function called my.conf2 to compute those two bands. You can reuse the function implemented in (a).

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!