Chi-Square Tests-New

advertisement
QIM 511
SPSS: Chi-Square Test
Presented By:
ANG LING POH
ONG MEI YEAN
SOO PEI ZHI
Nonparametric Techniques
 Is used when having serious violations of
distribution assumptions or not normal
 Appropriate for data measured on scales that are
not interval or ratio.
 Selection of nonparametric techniques are:
 Chi-square tests
 Mann-Whitney test
 Wilcoxon signed-rank test
 Kruskal-Wallis test
 Friedman test
 Spearman’s rank-order correlation
Chi-square Tests
 2 Main types
Chi-square test for
goodness of fit
For analysis of a single
categorical variable
Chi-square test for
independence or
relatedness
For analysis of the
relationship between 2
categorical variables
 3 assumptions to deal before conducting chi-square
tests:
1)
2)
3)
Random sampling
Independence of observations
Size of expected frequencies
Chi-square test for Goodness of Fit
 used to compare observed and expected
frequencies in each category.
 sample size is usually small
Chi-square test for Goodness of Fit
 Steps to conduct chi-square test for goodness of
fit:
Select the Data menu
Click on Weight Cases to open the dialogue box
Click on the Weight cases by radio button
Select the relevant variable and move to Frequency
Variable
5) Then, select Analyze menu
6) Click on Nonparametric Tests and then Chi Square
7) Select the required variable to move into Test
Variable List box
1)
2)
3)
4)
Goodness of fit chi square Output
file will look like this:
You can see from the output that the chi-square value is no significant (p > .05).
Interpreting Chi square test
for Goodness of Fit
Example
Color preference of 150 people, p < 0.05
Category Color
Observed
Frequencies
Expected
Frequencies
Yellow
35
20%
Red
50
30%
Green
30
10%
Blue
10
10%
White
25
30%
 Chi-square requires that you use numerical values, not
percentage or ratios.
 Chi-square should not be calculated if the expected value
in any category is less than 5.
Color preference of 150 people
Category Color
Observed
Frequencies
Expected
Frequencies
Yellow
35
30
Red
50
45
Green
30
15
Blue
10
15
White
25
45
Calculate chi-square
2 = Chi-square
O = Observed frequency
E = Expected frequency
k = number of categories, groupings, or possible outcomes
Calculate chi-square
Category
Color
O
E
(O-E)
(O-E)2
(O-E)2
E
Yellow
35
30
5
25
0.83
Red
50
45
5
25
0.56
Green
30
15
15
225
15
Blue
10
15
-5
25
1.67
White
25
45
-20
400
8.89
2 = 26.95
Calculate Degrees of freedom (df)
 Refers to the number of values that are free to vary after
restriction has been placed on data.
 Defined as N- 1, the number in the group minus one
restriction.
df = N – 1
= 5 – 1
= 4
Critical 2 values
2 = 26.95 , df = 4 , p < 0.05
Critical 2
 If chi-square value is bigger than critical value, reject null
hypothesis.
 If chi-square value is smaller than critical value, fail to
reject null hypothesis.
Chi-square Test for Relatedness or
Independence
 Used to evaluate group differences when
the test variable is nominal, dichotomous,
ordinal, or grouped interval.
 A test of the influence or impact that a
subject’s value on one variable has on the
same subject’s value for a second variable.
Chi-square Test for Relatedness or
Independence
 Steps to conduct chi-square test for goodness of fit:
1.
2.
3.
4.
5.
6.
7.
8.
9.
Select the Analyze menu
Click on Descriptive Statistics and then Crosstabs
Select a row and column variable to move into the
respective box
Click on Statistics command pushbutton to open
Crosstabs: Statistics subdialogue box
Click on the Chi-square check box then Continue
Click on the Cells subdialogue box
In the Counts box, click on the Observed and Expected
check boxes
In the Percentages box, click on the Row, Column
andTotal check boxes
Click on Continue and then OK.
Interpreting Chi square test
for Relatedness or Independence
Example
Incidence of three types of malaria in three tropical regions.
H0 : The two categorical variables are independent.
H1. : The two categorical variables are related.
Calculate expected frequency
e = expected frequency
c = frequency for that column
r = frequency for that row
n = total number of subjects in study
Calculate expected frequency
e = 90 x 86
250
= 30.96
Calculate chi-square
2 = 125.516
Calculate Degrees of freedom (df)
df = (r-1)(c-1)
= (3-1)(3-1)
= (2)(2)
= 4
r = number of categories in the row variable
c = number of categories in the column
variable
Find critical 2 values
2 = 125.516 , df = 4 , p < 0.05
Critical 2
Chi-square value is bigger than critical
chi-square value, reject null hypothesis.
REFERENCES
 Green, S. B., Salkind, N. J., & Akey, T. M. (2000). Using SPSS for Windows:
Analyzing and understanding data (2nd ed.). New Jersey: Prentice Hall.
 Coakes, S. J., Steed, L., & Ong, C. (2010). SPSS:analysis without anguish:
version 17.0 for Windows (Version 17.0 ed.). McDougall Street, Milton, Qld:
John Wiley & Sons Australia, Ltd.
 Hinkle, Wiersma, & Jurs. Chi-square test for goodness of fit. Retrieved
from http://www.phy.ilstu.edu/slh/chi-square.pdf
 Penn State Lehigh Valley. Chi-square test. Retrieved 9 March, 2011,
from http://www2.lv.psu.edu/jxm57/irp/chisquar.html
 Maben, A. F. Chi-square test. Retrieved from
http://www.enviroliteracy.org/pdf/materials/1210.pdf
 Bench, M. Interpreting the chi-square test. Retrieved 9 March, 2011,
from http://www.mathbench.umd.edu/mod106_chisquare/page10.htm
Download