Get startedGet started for free

CI via approximation

The approximation shortcut offers an alternative method of describing the sampling distribution. In this exercise, you will apply the approximation shortcut to build a confidence interval for the proportion of respondents that live in the pacific region.

When building any confidence interval, note that you use three ingredients: the point estimate (here, p_hat), the SE, and the number of standard errors to add and subtract. For a sampling distribution that is bell-shaped, adding and subtracting two SEs corresponds to a confidence level of 95%. When you use the bootstrap, you can check that the distribution is bell-shaped because you have a have the bootstrap distribution to plot. When you use the approximation, you're flying blind — well, not quite blind, but you are dependent on the "rule of thumb" to ensure that you're working with a bell shape.

This exercise is part of the course

Inference for Categorical Data in R

View Course

Hands-on interactive exercise

Have a go at this exercise by completing this sample code.

# Calculate n as the number of rows
n <- nrow(gss2016)

# Calculate p_hat as the proportion in pacific meta region
p_hat <- gss2016 %>%
  ___(prop_pacific = ___(___ == "___")) %>%
  pull()

# See the result
p_hat
Edit and Run Code