21.26 Simulating confidence intervals. In Exercise 21.25, you found the recipe for a 68% confidence interval for a population proportion p. Suppose that (unknown to anyone) 60% of Americans actively tried to avoid drinking regular soda or pop in 2015.
(a) How would you simulate the proportion of an SRS of 25 adult Americans?
(b) Simulate choosing 10 SRSs, using a different row in Table A for each sample. What are the 10 values of the sample proportion who actively tried to avoid drinking regular soda or pop in 2015?
(c) Find the 68% confidence interval for p from each of your 10 samples. How many of the intervals capture the true parameter value p = 0.6? (Samples of size 25 are not large enough for our recipe to be very accurate, but even a small simulation illustrates how confidence intervals behave in repeated samples.)