Get startedGet started for free

Inspecting margins of error

ACS data are distinct from decennial Census data in that they represent estimates with an associated margin of error. ACS margins of error by default represent a 90 percent confidence level around an estimate, which means that we are 90 percent sure that the true value falls within a range of the reported estimate plus or minus the reported margin of error.

In this exercise, you'll get some experience working with data that has high margins of error relative to their estimates. We'll use the example of poverty for the population aged 75 and above for Census tracts in Vermont.

This exercise is part of the course

Analyzing US Census Data in R

View Course

Exercise instructions

  • Get a dataset on elderly poverty by Census tract in Vermont from the ACS.
  • Filter the data frame to create a new data frame that stores those rows with margins of error that exceed their estimates.
  • Divide the number of rows in moe_check by the number of rows in the original dataset to see the proportion of rows that have larger margins of error than their estimates.

Hands-on interactive exercise

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

# Get data on elderly poverty by Census tract in Vermont
vt_eldpov <- ___(___ = "tract", 
                     variables = c(eldpovm = "B17001_016", 
                                   eldpovf = "B17001_030"), 
                     state = "VT")

vt_eldpov

# Identify rows with greater margins of error than their estimates
moe_check <- ___(vt_eldpov, moe > ___)

# Check proportion of rows where the margin of error exceeds the estimate
___(moe_check) / nrow(vt_eldpov)
Edit and Run Code