Educational attainment of Americans by age categories in 198
Educational attainment of Americans by age categories in 1984. Counts are presented in thousands. Data collected by the U.S. Bureau of the Census. Americans under age 25 are not included because many have not completed their education. A chi-square test was used to determine whether age category and educational attainment are independent. The findings are below.
edu.table<-xtabs(Count ~ Education+Age_Group, data=dat)
Age_Group
Education >64 25-34 35-44 45-54 55-64
College,1-3 years 2503 8555 5576 3124 2524
College,4 or more years 2483 9771 7596 3904 3109
Completed high school 7558 16431 1855 9435 8795
Did not complete high school 13746 5416 5030 5777 7606
> chisq.test(edu.table)
Pearson\'s Chi-squared test
data: edu.table
X-squared = 22373.57, df = 12, p-value < 2.2e-16
Based on the results,
a) There is not enough evidence to suggest that the amount of education differs across the age groups for this population.
b) There is significant evidence to suggest that the amount of education differs across the age groups that are over 45 for this population.
c) There is significant evidence to suggest that the amount of education differs across the age groups that are over for this population.
d) None of the above
Solution
Chisquare table value at 5% with 12 degrees of freedom is 21.026, calculated value is greater than table value, so we reject null hypothesis.
Therefore there is significant evidence to suggest that the amount of education differs across the age groups that are over for this population.
| Oi | Ei | (Oi-Ei)2 | 
| 2503 | 4478.75 | 871.5798 | 
| 8555 | 6843.85 | 427.8343 | 
| 5576 | 3416.9 | 1364.3106 | 
| 3124 | 3788.79 | 116.6456 | 
| 2524 | 3753.7 | 402.8457 | 
| 2483 | 5399.55 | 1575.3653 | 
| 9771 | 8250.89 | 280.0588 | 
| 7596 | 4119.39 | 2934.1279 | 
| 3904 | 4567.74 | 96.4483 | 
| 3109 | 4525.43 | 443.3333 | 
| 7558 | 8859.01 | 191.0628 | 
| 16431 | 13537.2 | 618.5975 | 
| 1855 | 6758.66 | 3557.7882 | 
| 9435 | 7494.27 | 502.57 | 
| 8795 | 7424.8 | 252.8618 | 
| 13746 | 7552.69 | 5078.5996 | 
| 5416 | 11541.05 | 3250.678 | 
| 5030 | 5762.05 | 93.0046 | 
| 5777 | 6389.19 | 58.6579 | 
| 7606 | 6330.01 | 257.2113 | 
| 130794 | 130794 | 22373.5813 | 


