Average commute time of Americans
Each year since 2005, the US Census Bureau surveys about 3.5 million households with The American Community Survey (ACS). Data collected from the ACS have been crucial in government and policy decisions, helping to determine the allocation of federal and state funds each year. Data from the 2012 ACS is available in the acs12
dataset.
When given one argument, t.test()
tests whether the population mean of its input is different than 0. That is \(H_0: \mu_{diff} = 0\) and \(H_A: \mu_{diff} \ne 0\). It also provides a 95% confidence interval.
Este ejercicio forma parte del curso
Inference for Numerical Data in R
Instrucciones del ejercicio
- Filter the
acs12
dataset for individuals whose employment status is"employed"
, and save this new dataset asacs12_emp
. - Use a t-test to construct a 95% confidence interval for the average commute time of Americans.
Ejercicio interactivo práctico
Prueba este ejercicio y completa el código de muestra.
# Filter for employed respondents
acs12_emp <- acs12 %>%
___
# Construct 95% CI for avg time_to_work
t.test(___)