13  Homework 4: Sample Size Calculation and Coverage

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.

Normal approximation to the sampling distribution when theta is 0.6, with the true value marked in green and a fixed interval centered at 0.7.

θ = 0.6

Normal approximation to the sampling distribution when theta is 0.7, with the true value marked in green at the center of the fixed interval.

θ = 0.7

Normal approximation to the sampling distribution when theta is 0.8, with the true value marked in green and a fixed interval centered at 0.7.

θ = 0.8

The green vertical line marks the true value of \(\theta\) in each case.

Exercise 14.1 (Part A)  

Exercise

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)  

Exercise

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)  

Exercise

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)  

Exercise

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)  

Exercise

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)  

Exercise

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)  

Exercise

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)  

Exercise

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.