Using R Studio
Use the two iid samples. (You can copy and paste the code intoR). They both come from the same normal distribution.
X = c(-0.06, 1.930, 0.608 -0.133,0.657, -1.284, 0.166, 0.963,0.719, -0.896)
Y = c(0.396, 0.687, 0.809, 0.939, -0.381, -0.042, -1.529,-0.543, 0.758, -2.574, -0.160, -0.713, 0.311, -0.515, -2.332,-0.844, -0.942, 0.053, 0.066, 0.942, -0.861, -0.186, -0.947,-0.110, 0.634, 2.357, 0.201, -0.428, -1.661, 0.395)
(a) Report 95% confidence interval for the mean of X. Should weuse t-CI or z-CI?
(b) Report 95% confidence interval for the mean of X, if we havealready known the population variance is 1. Should we use t-CI orz-CI?
(c) Report 90% confidence interval (t-CI) for the mean of Y.
(d) Report 95% confidence interval (t-interval) for the mean ofY and compare the result with the result in part (c). Describe therelationship between the confidence level and the width of theCI.
(e) Assuming the CIs reported in (a) and (c) are valid, comparethe result of (a) and (c) and describe the relationship between thesample size and the width of the CI.