Data for Exercise 8.55
BlackeduA data frame/tibble with 3800 observations on two variables
a factor with levels Female and Male
a factor with levels High school dropout,
High school graudate, Some college, Bachelor's degree, and
Graduate degree
Bureau of Census data.
Kitchens, L. J. (2003) Basic Statistics and Data Analysis. Pacific Grove, CA: Brooks/Cole, a division of Thomson Learning.
T1 <- xtabs(~gender + education, data = Blackedu)
T1
#> education
#> gender High school dropout High school graduate Some college
#> Female 486 659 691
#> Male 496 530 435
#> education
#> gender Bachelor's degree Graduate degree
#> Female 208 96
#> Male 134 65
chisq.test(T1)
#>
#> Pearson's Chi-squared test
#>
#> data: T1
#> X-squared = 34.195, df = 4, p-value = 6.797e-07
#>