$$ \newcommand{X}{} \newcommand{Y}{}
$$
Problem 1: Interval Calibration
Suppose we’re estimating the proportion \(\theta\) of Georgia’s registered voters who will turn out for an election, using a sample of size \(n=625\) drawn with replacement. Below are three sampling distributions corresponding to three different values of \(\theta\): 0.6, 0.7, and 0.8. On each, I’ve drawn a 95% confidence interval centered at 0.7.
The green vertical line marks the true value of \(\theta\) in each case.
Exercise 14.1 (Part A)
For which of these three values of \(\theta\) does the interval contain the true value? Looking at the sampling distributions, roughly what fraction of intervals constructed this way (centered at \(\hat\theta\) with the same width) would contain \(\theta\) in each case?
Exercise 14.2 (Part B)
If you wanted to have 95% coverage no matter which of these three \(\theta\) values was true, would you need to make your interval wider, narrower, or keep it the same? Explain briefly.
Exercise 14.3 (Part C)
Suppose you wanted to achieve 99% coverage instead of 95%. By what factor would you need to multiply the interval width?
Hint: For a normal distribution, 95% of the probability is within \(\pm 1.96\) standard deviations of the mean, and 99% is within \(\pm 2.58\) standard deviations.
Problem 2: Sample Size Calculation
Suppose you’re planning a survey to estimate the proportion of Georgia’s registered voters who will turn out for an election. You want your 95% confidence interval to have a width of no more than \(\pm .02\), i.e. \(\pm\) 2 percentage points.
Exercise 15.1 (Part A)
Using the normal approximation, how large a sample do you need? You don’t know \(\theta\), so use the worst case.
Exercise 15.2 (Part B)
Suppose you’ve already done a pilot study with \(n=625\) people and found that your 95% interval has a half-width of about \(.04\). You want to cut the half-width in half, to \(.02\). How large a sample do you need?
Do this the easy way: compare the width you have to the width you want.
Problem 3: Checking Coverage
Now let’s verify that all this works in practice.
Exercise 16.1 (Part A)
Write a function interval that takes a sample Y and returns a 95% confidence interval for \(\theta\) using the normal approximation. It should return a vector of length 2: the lower and upper bounds.
Exercise 16.2 (Part B)
Using the GA turnout population, draw 10,000 samples of size \(n=625\) with replacement. For each sample, compute your interval. What fraction of these intervals contain the true value of \(\theta\)?
Exercise 16.3 (Part C)
Repeat Part B, but now also compute a 95% bootstrap interval for each sample. Compare the coverage of the normal approximation interval and the bootstrap interval.