Beruflich Dokumente
Kultur Dokumente
8)
Chi-square test of association (contingency) 2x2 tables rxc tables Post-hoc Interpretation Running SPSS Windows CROSSTABS Chi-square test of goodness of fit
Purpose
Chi-square test of association 2X2 associations (i.e., relation between two dichotomous variables) Examples Gender (m/f) x Experience of physical aggression in past year (yes/no) First Language (English / Not English) x Getting Question on Test Correct (Correct/Incorrect)
Purpose
Chi-square test of association
RxC associations (i.e., more categories than 2x2)
Examples
Socioeconomic Status x Vehicle Brand Age Group x Preferred Music Genre
Example of a 2X2
Testing the association between Beer Consumption and Gender Null hypothesis
No association Proportion of cases in one cell to the marginal (e.g. 44/70) = proportion of the marginal on the other variable to the total (e.g., 54/104)
Gender
44
10
54
26
24
50
70
34
104
E11 54 = 70 104
E11 = 36.3
Once we have calculated one expected value, the others follow:
M
Gender
(O
bserved
E xpected )
E xpected
M
Gender
2 =
= 10.3
df = (r-1) (c-1) = 1 critical value at .01 = 6.64 (see Table E in book) Report: 2 (1) = 10.3, p < .01
M 44 p1 p 2 n1 + n 2 p= Gender 1 1 1+ N2 N + pq F 26 N1 N 2 q = 1 p 44 + 26 p= 54 + 50 70 .815 .520 Z= 1 1 Z = 3.204, p < .01 + (.673)(.327 ) 54 50 Zcrit @ .01 = 2.58
10
54
24
50
34
104
Using SPSS
The data can be in 2 forms: By Category gender beer 1 1 2 2 1 2 1 2 frequency 44 10 26 24
Using SPSS
or, by subject (would be 104 rows) male = 1, female = 2 gender beer 1 1 1 2 1 2 . . . 2 2 2 1 yes = 1, no = 2
Using SPSS
Note: if you input the data this way, you must do the following in the Data Window: Data Weight cases by (freq var)
Using SPSS
Analyze Descriptive Statistics Crosstabs In Crosstabs, click on Chi-square under Statistics Observed, Expected, and Unstandardized Residuals under Cells
Using SPSS
Using SPSS
Gender * Beer Crosstabulation Beer yes Gender male Count Expected Count Residual Count Expected Count Residual Count Expected Count 44 36.3 7.7 26 33.7 -7.7 70 70.0 no 10 17.7 -7.7 24 16.3 7.7 34 34.0 Total 54 54.0 50 50.0 104 104.0
female
Total
Using SPSS
Chi-Square Tests Value 10.255b 8.959 10.467 df 1 1 1 Asymp. Sig. (2-sided) .001 .003 .001 Exact Sig. (2-sided) Exact Sig. (1-sided)
Pearson Chi-Square Continuity Correctiona Likelihood Ratio Fisher's Exact Test Linear-by-Linear Association N of Valid Cases
.001
a. Computed only for a 2x2 table b. 0 cells (.0%) have expected count less than 5. The minimum expected count is 16. 35.
R x C Example
2 with variables having > 2 levels first step is the same might want to do post hoc tests to further understand the association
Look at table and describe the association (focus on large residuals) Or pick out specific cells (2 x 2) and test Or collapse cells to make a 2 x 2 and test
use = .05/k
myself
home-parents
roommate
spouse-partner
Total
a. 0 cells (.0%) have expected count less than 5. The minimum expected count is 31.88.
myself
home-parents
roommate
spouse-partner
Total
home-parents
roommate
spouse-partner
Conclusion: A large proportion of the Chi square can be explained by the Fact that there is a very large proportion of first year students who live in residence
Total
OE E
resid
res
other housing
Total
Count Expected Count Residual Count Expected Count Residual Count Expected Count
k = 60
= .05 60
= .0008
5X 4 X 3X 2 X1 4 X 3X 2 X1 2 X 1X 3 X 2 X 1 2 X 1X 2 X 1
In our example, we collapsed a number of categories. Therefore, we would not use the above adjustment. Gardner indicates that there are no specific meaningful Bonferonni adjustment when categories are collapsed and suggests at a minimum to use a Type I error rate of .01
Pearson Chi-Square Continuity Correctiona Likelihood Ratio Fisher's Exact Test Linear-by-Linear Association N of Valid Cases
.000
a. Computed only for a 2x2 table b. 0 cells (.0%) have expected count less than 5. The minimum expected count is 181. 47.
2 =
(O
bserved
E xpected )
E xpected
*I collapsed three categories (2-3 times per week, 4-6 times per week, and every day)
10
(O
bserved
E xpected )
E xpected
2 =
= 10.66
df = number of categories - 1 = 4 Gardner recommends Type I error rate of .20 Critical value at .20 = 5.99 2 Reject null of good fit: (4) = 10.66 p < .20
11