X2 test
X2 test
= Chi - Square
= Kai -Kuadrat
Karl Pearson th 1900
Untuk data frekuensi (Count) dari data kategori (tidak untuk % atau
proporsi)
DATA KATEGORI
I. SKALA PENGUKURAN NOMINAL :
SEX
L
A
Gol - darah
B
O
AB
tabel - kontingensi :
rxc
2. ORDINAL
STD - Ca
Tk - ek
II
III
125
-175
>17
5
Renda
h
Sedan
g
Tinggi
BSN
<125
BB
< 50
50
-75
> 75
KEGUNAAN
1. MENGUJI KESESUAIAN :
(Goodness of Fit test) frekuensi empirik / hasil
pengamatan sampel vs frekuensi
teoritik/diharapkan (expected)di populasi
2. MENGANALISIS HUBUNGAN :
(Test of Independency) antar variabel pada satu
sampel
3. KOMPARASI
(Test of Comparative = Test of Homogeneity)
Antar sampel dalam variabel tertentu
Prinsip Analisis :
Membandingkan fo vs fe --> = X2
X
2
( f O1 f e1 ) 2
f e1
( f O 2 f e 2 ) 2
fe 2
X
2
( f Oij f eij ) 2
f eij
di ilhami
Z
2
...dst
(X 2 ) 2
2
CATATAN :
1. X2 = O (nol) --> mungkin tapi jarang
fo = fe --> tidak cukup bukti menolak Ho
2. X2 > O :
a. X2 = kecil (small)
fo - fe = kecil --> tidak cukup bukti
menolak Ho
b. X2 = Cenderung besar
fo - fe = besar--> cenderung menolak
Ho (biasanya pada large
sampel)
Tabel Kontingensi 2 x 2 :
Variabel A
I
Variab
el B
a+b
II
c+d
a+c
b+d
a+b
+c+
d =N
fe
fe
( b d )( a b )
N
fe
( a c )( c d )
N
fe
( b d )( c d )
N
eab
eca
ead
II
( a c )( a b )
N
Kategori
tabel 2 x 2 :
X
2
N ( ad bc ) 2
( a b )( c d )( a c )( b d )
PERSYARATAN X2 test :
Rule of the thumb (Cochran 1954) --> terkait
sample size :
1. Tidak ada fe <1 di semua sel (no cell should
have an expected frequency less than 1)
2. Sel-sel dengan fe < 5 tidak boleh melebihi
20 % dari semua sel
(no more than 20 percent of the cells should
have an expected frequency of less than 5
4. KHUSUS tabel 2 x 2 :
Yates tahun 1934 : rumus dikoreksi --> Yates'
correction fo continuity :
fo - fe - 0.5
2
corr
DF 1
( f o f e 0.5 N ) 2
fe
atau
2
corr
N ( ad bc 0.5 N )22
( a b )( c d )( a c )( b d )
5. KRITERIA PENOLAKAN
X2hit > X2tabel (;DF)
p<
Gol - darah
X
2
Sampel
Populas
i
20
20
15
20
AB
10
60
50
100
100
( 60 50 ) 2
50
( 20 20 ) 2
20
= 5.75
(15 20 ) 2
20
( 5 10 ) 2
10
UJI KOMPARASI X2
Gol- darah
Ca lamb
Ulc Pept
75
40
20
AB
10
35
100
100