Q2. The following 10 samples are obtained from the population.
Sample 1: 4.61, 3.70, 2.78, 6.70, 5.04
Sample 2: 6.66, 2.51, 5.34, 6.35, 4.95
Sample 3: 4.62, 3.44, 9.12, 6.50, 8.65
Sample 4: 5.16, 3.74, 1.97, 3.73, 5.45
Sample 5: 7.03, 5.51, 2.66, 6.34, 1.70
Sample 6: 4.27, 4.37, 1.10, 6.84, 3.75
Sample 7: 4.33, 7.79, 6.27, 4.78, 6.03
Sample 8: 5.80, 8.33, 5.55, 6.01, 5.70
Sample 9: 4.25, 5.20, 8.28, 3.25, 5.24
Sample 10: 7.72, 4.53, 2.89, 3.26, 4.22
Out of the 90% Confidence intervals of the 10 samples, how many include the ? = 5.
Q3. (Confidence Interval Simulation)
Write R code that satisfies the following conditions and show the results.
? Draw 100 samples of size 5 from the above population.
? Calculate the 90% confidence intervals for the drawn samples.
? Set the result to 1 if the confidence interval includes the population mean, otherwise set it to 0.
? Calculate the probability of the population mean being included in 1000 of these 90% confidence intervals.