Aan de slagGa gratis aan de slag

Estimating the difference of two means using a t-interval

Earlier we used summary statistics and a visualization to compare the hourly pay of citizens vs. non-citizens. In this exercise we estimate the difference between the average hourly pay between these two groups.

The acs12_complete_hrlypay_citizen is already loaded for you.

Deze oefening maakt deel uit van de cursus

Inference for Numerical Data in R

Cursus bekijken

Oefeninstructies

  • Run a t-test to find a confidence interval for the difference in average hourly pay, hrly_pay between citizen and non-citizens, citizen in the acs12_complete_hrlypay_citizen dataset. Assign to test_results.

Praktische interactieve oefening

Probeer deze oefening eens door deze voorbeeldcode in te vullen.

# Construct 95% CI using a t-test
test_results <- ___

# See the results
test_results
Code bewerken en uitvoeren