You are on page 1of 10

Non-parametric statistic

Not all research situations use continuous variables. The t


test, analysis of variance, correlation and prediction all
required that the measured variable or variables have
scores that are quantitative.
Chi-square tests are used when the scores are on a nominal
variable, that is, a variable with values that are categories.
The scores in this situation is in the form of frequencies,
that is, how many people or observations fall into different
categories.
The chi-square test was originally developed by Karl
Pearson and is sometimes called the Pearson chi-square.

Two types of chi-square tests:


(a) chi-square test for goodness of fit, which is a chi-square
test involving levels of a single nominal variable, and
(b) chi-square test for independence, which is used when there
are two nominal variables, each with several categories.
Several assumptions for using chi-square tests:
1. Random sampling: observations should be randomly
sampled from the population of all possible observations
2. Independence of observations: each observation should be
generated by a different subject and no subject is counted
twice
3. The categories used to measure a variable is mutually
exclusive and exhaustive

Only one variable is used.


Example: A professor believes that his students will support
him if he does not conduct a final examination. He obtains
160 students supporting and 115 opposing him. A chisquare test for goodness of fit will allow us to determine if
differences in frequency exist across response categories.
Table 1: Number of students opinion
Support

115

Oppose

160

Total

275

Table 2 : Calculation of chi-square test


Opinion

fo

Support

115

Oppose

160

Total

275

fe

fo-fe

(fo-fe)

(fo-fe)/fe

137.5

-22.5

506.25

3.682

137.5

22.5

506.25

3.682
7.364

Click Weight Cases, then enter frequency in the box Weight Cases
By.
Click Nonparametric Tests and then choose Chi Square Test.
Select the variable required (opinion) and put it in the boxTest
Variable List.
Click Continue and OK.
opinion
1.00
2.00
Total

Observed N
115
160
275

Expected N
137.5
137.5

Residual
-22.5
22.5

Test Statistics
Chi-Square a
df
Asymp. Sig.

opinion
7.364
1
.007

a. 0 cells (.0%) have expected frequencies less than


5. The minimum expected cell frequency is 137.5.

In the test of independence, we use two variables and each


variable has several categories.
Example: A study on the association between gender and
career choice
Table 3: Number of subjects according to gender and career
choice

Gender

Police

Firema
n

Clerk

Teach
er

Jumlah

Male

15

10

15

46

Female

15

15

41

Total

21

15

21

30

87

Table 4: Calculation of chi-square test of independence


Categor
y

fo

fe

fo-fe

(fo-fe)

(fo-fe)/fe

M-P

15

11.10

3.9

15.21

1.37

M-F

10

7.93

2.07

4.28

0.54

M-C

9.90

5.10

26.01

2.34

M-T

15

15.86

0.86

0.74

0.05

F-P

9.90

3.90

15.21

1.54

F-F

7.07

2.07

4.28

0.61

F-C

15

9.09

5.10

26.01

0.74

F-T

15

14.14

0.86

2.63

0.05

Total

87

87

9.15

Click Weight Cases, then enter frequency in the box Weight


Cases By.
Click Analyze and then click Crosstabs.
Selecet the variable for row (occupation) and the variable
for column (gender).
Click Statistics and choose Chi-square test.
Click Cells. Then tick Observed and Expected, and in
Percentages click Row, Column and Total.
Click Continue and OK.

occupation * gender Crosstabulation


gender
perempuan
15
6
11.1
9.9
71.4%
28.6%
32.6%
14.6%
17.2%
6.9%
10
5
7.9
7.1
66.7%
33.3%
21.7%
12.2%
11.5%
5.7%
6
15
11.1
9.9
28.6%
71.4%
13.0%
36.6%
6.9%
17.2%
15
15
15.9
14.1
50.0%
50.0%
32.6%
36.6%
17.2%
17.2%
46
41
46.0
41.0
52.9%
47.1%
100.0%
100.0%
52.9%
47.1%
lelaki
occupation

polis

bomba

kerani

guru

Total

Count
Expected Count
% within occupation
% within gender
% of Total
Count
Expected Count
% within occupation
% within gender
% of Total
Count
Expected Count
% within occupation
% within gender
% of Total
Count
Expected Count
% within occupation
% within gender
% of Total
Count
Expected Count
% within occupation
% within gender
% of Total

Total
21
21.0
100.0%
24.1%
24.1%
15
15.0
100.0%
17.2%
17.2%
21
21.0
100.0%
24.1%
24.1%
30
30.0
100.0%
34.5%
34.5%
87
87.0
100.0%
100.0%
100.0%

Chi-Square Tests

Pearson Chi-Square
Likelihood Ratio
Linear-by-Linear
Association
N of Valid Cases

Value
9.124a
9.381
3.783

3
3

Asymp. Sig.
(2-sided)
.028
.025

.052

df

87

a. 0 cells (.0%) have expected count less than 5. The


minimum expected count is 7.07.

10

You might also like