In: Statistics and Probability
Consider the following study results concerning Age and Church Attendance:
Age
Church Attendance 20-29 30-39 40-49 50-59
Yes 21 63 94 72
No 69 87 106 78
Test to see if the proportion of people who attend church is the same for all age groups (95% confidence).
What is the value of the test statistic?
What is the p-value?
What is your decision concerning the null hypothesis and your conclusion?
Null hypothesis:Ho: proportion of people who attend church is the same for all age groups
Alternate hypothesis:Ho: proportion of people who attend church is not the same for all age groups
Applying chi square test of independence: |
Expected | Ei=row total*column total/grand total | 20-29 | 30-39 | 40-49 | 50-59 | Total |
yes | 38.1356 | 63.5593 | 84.7458 | 63.5593 | 250 | |
No | 51.8644 | 86.4407 | 115.2542 | 86.4407 | 340 | |
total | 90 | 150 | 200 | 150 | 590 | |
chi square χ2 | =(Oi-Ei)2/Ei | 20-29 | 30-39 | 40-49 | 50-59 | Total |
yes | 7.700 | 0.005 | 1.011 | 1.121 | 9.8360 | |
No | 5.661 | 0.0036 | 0.7431 | 0.8242 | 7.2324 | |
total | 13.3611 | 0.0085 | 1.7536 | 1.9451 | 17.068 | |
test statistic X2 = | 17.068 |
degree of freedom(df) =(rows-1)*(columns-1)= | 3 |
p value from excel: chidist(17.068,3-1) =0.0007
since p value <0.05 ; we reject null hypothesis
we have sufficient evidence at 0.05 level to conclude that proportion of people who attend church is not the same for all age groups