MulaiMulai sekarang secara gratis

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.

Latihan ini adalah bagian dari kursus

Inference for Numerical Data in R

Lihat Kursus

Petunjuk latihan

  • Filter the acs12 dataset for individuals whose employment status is "employed", and save this new dataset as acs12_emp.
  • Use a t-test to construct a 95% confidence interval for the average commute time of Americans.

Latihan interaktif praktis

Cobalah latihan ini dengan menyelesaikan kode contoh berikut.

# Filter for employed respondents
acs12_emp <- acs12 %>%
  ___

# Construct 95% CI for avg time_to_work
t.test(___)
Edit dan Jalankan Kode