Post on 11-Nov-2014
description
Irwin/McGraw-Hill © The McGraw-Hill Companies, Inc., 2000
LINDMASON
MARCHAL
1-1
Chapter 17Nonparametric Methods:
Chi-Square Applications
GOALSWhen you have completed this chapter, you will be able to:1Karakteristik distribusi chi-square.
2 Melakukan uji hipotesis dengan membandingkan data frekuensi dengan frekuensi harapan.
3Melakukan uji hipotesis apakah dua kriteria klasifikasi saling terkait
Irwin/McGraw-Hill © The McGraw-Hill Companies, Inc., 1999
Irwin/McGraw-Hill © The McGraw-Hill Companies, Inc., 2000
LINDMASON
MARCHAL
Characteristics of the Chi-Square Distribution
• Ciri-ciri :· Derajat kemiringan posistif/positively
skewed· Non-negatif· Berbasis degrees of freedom df· Ketika degrees of freedom berubah,
distribusi baru terbentuk.
13-2
Irwin/McGraw-Hill © The McGraw-Hill Companies, Inc., 2000
LINDMASON
MARCHAL
CHI-SQUARE DISTRIBUTION CHI-SQUARE DISTRIBUTION CHI-SQUARE DISTRIBUTION CHI-SQUARE DISTRIBUTION
df = 3
df = 5
df = 10
2-2
Irwin/McGraw-Hill © The McGraw-Hill Companies, Inc., 2000
LINDMASON
MARCHAL
Goodness-of-Fit Test: Equal Expected Frequencies
• Jika adalah data pengamatan dan frekuensi harapan.
• : tidak ada perbedaan• : ada perbedaan antara• Uji statistika:
• Nilai kritis adalah nilai chi-square (x2), dengan (k-1)=df degrees of freedom, dimana k adalah
jumlah kategori.
f and fe0
H0 eff and 0
1H eff and 0
x
f f
fe
e
2 0
2
13-4
Irwin/McGraw-Hill © The McGraw-Hill Companies, Inc., 2000
LINDMASON
MARCHAL
EXAMPLE 1
• Data berikut adalah absensi karyawan suatu pabrik. Pada level signifikan 0,05, ujilah apakah ada perbedaan dalam absensi dari hari ke hari dalam seminggu.
Hari Frekuensi
Senin 120
Selasa 45
Rabu 60
Kamis 90
Jumat 130
13-5
Irwin/McGraw-Hill © The McGraw-Hill Companies, Inc., 2000
LINDMASON
MARCHAL
EXAMPLE 1 continued
• Asumsikan frekuensi harapan adalah sama: (120+45+60+90+130)/5=89.
• Hitung uji statistik adalah .• Nilai degrees of freedom adalah (5-
1)=4.• Maka, nilai kritis adalah 9,488 (dari
tabel)
13-6
x
f f
fe
e
2 0
2
Irwin/McGraw-Hill © The McGraw-Hill Companies, Inc., 2000
LINDMASON
MARCHAL
Hari Frekuensi (fo)
F harapan
(fe)
Fo-fe (f0-fe)2 (fo-fe)2 fe
Senin 120 89
Selasa 45 89
Rabu 60 89 -
Kamis 90 89
Jumat 130 89
0 X
x
f f
fe
e
2 0
2
Irwin/McGraw-Hill © The McGraw-Hill Companies, Inc., 2000
LINDMASON
MARCHAL
EXAMPLE 1 continued
1. : tidak ada perbedaan antara data hasil pengamatan dan frekuensi harapan dlm absensi. : ada perbedaan antara hasil pengamatan dengan frekuensi harapan dlm absensi.
2. Tingkat signifikan =0,053. Pilih Uji statistika: chi-square4. Decision Rule: tolak jika uji statistika lebih besar
dibanding critical value. Hitung nilai dalam tabel chi-square df=4 , sig.=0.05
5. Hitung chi-square=60,8 6. Conclusion: tolak dan disimpulkan bahwa terdapat
perbedaan antara data hasil pengamatan dan frekuensi harapan dalam absensi .
H0
H1
H0
H0
13-7
Irwin/McGraw-Hill © The McGraw-Hill Companies, Inc., 2000
LINDMASON
MARCHAL
Karakteristik chi-square
• Nilai tidak pernah negatif• Terdapat sebuah keluarga distribusi
· Tidak tergantung ukuran sampeljumlah kategori
• Distribusi chi-square kemiringannya positif
Irwin/McGraw-Hill © The McGraw-Hill Companies, Inc., 2000
LINDMASON
MARCHAL
Goodness-of-Fit Test for NormalityUji ketepatan Perkiraaan: frekuensi harapan tdk
setara
• Kartu Baseball : fe = 20, dalam kasus berikut uji chi-square dipakai untuk fe tidak setara
• Kegunaan: untuk menguji apakah frekuensi data yang diamati dalam distribusi frekuensi sesuai dengan teori distribusi normal .
• Contoh:
13-11
Juml. Rawat (1th)
% AHAA dr total
Juml. Warga Bartow (f0)
Juml. Warga yg diharapkan (fe)
0 40 55 60
1 30 50 45
2 20 32 30
3 10 13 15
100 150 150
Irwin/McGraw-Hill © The McGraw-Hill Companies, Inc., 2000
LINDMASON
MARCHAL
Steps
1. Ho= tidak ada perbedaan kondisi lokal dan nasional utk jumlah perawatan di RS
2. H1= ada perbedaan kondisi lokal dan nasional utk jumlah perawatan di RS
3. Level sign. 0,054. Uji statistika chi-square5. Decision Rule: tolak Ho jika uji statistika lebih besar
(>)dibanding critical value. Hitung nilai dalam tabel chi-square df=3, sig.=0.05 7,815
6. Hitung chi-square (x2)=1,37237. Conclusion: terima ho dan disimpulkan bahwa tidak
terdapat perbedaan antara data hasil pengamatan lokal dan nasional.
Irwin/McGraw-Hill © The McGraw-Hill Companies, Inc., 2000
LINDMASON
MARCHAL
Goodness-of-Fit Test: Unequal Expected FrequenciesEXAMPLE 2
• The U.S. Bureau of the Census indicated that 63.9% of the population is married, 7.7% widowed, 6.9% divorced (and not re-married), and 21.5% single (never been married). A sample of 500 adults from the Philadelphia area showed that 310 were married, 40 widowed, 30 divorced, and 120 single. At the .05 significance level can we conclude that the Philadelphia area is different from the U.S. as a whole?
13-8
Irwin/McGraw-Hill © The McGraw-Hill Companies, Inc., 2000
LINDMASON
MARCHAL
EXAMPLE 2 continued
Status
Married 310 319.5 .2825Widowed 40 38.5 .0584
Divorced 30 34.5 .5870
Single 120 107.5 1.4535
Total 500 2.3814
f0 fe ( ) /f f fe e02
13-9
Irwin/McGraw-Hill © The McGraw-Hill Companies, Inc., 2000
LINDMASON
MARCHAL
EXAMPLE 2 continued
• Step 1: : The distribution has not changed.
• : The distribution has changed.• Step 2: The significance level is .05.• Step 3: choose chi-square test • Step 4: is rejected if• Step 5:• Step 6: is accepted. The distribution has
not changed.
H0
H1
H0 05.,3,815.72 df
3824.22 H0
13-10
Irwin/McGraw-Hill © The McGraw-Hill Companies, Inc., 2000
LINDMASON
MARCHAL
Keterbatasan Chi-square
• Jika hanya 2 cell, fe dalam tiap sel minimal 5• Jika lebih dari 2 cell, chi-square seharusnya tidak
digunakan jika lebih dari 20% cell fe memiliki frekuensi harapan kurang dari 5
tingkat Fo fe
Petugas 30 32
Supervisor 110 113
Manajer 86 87
Manajer mid 23 24
Ass. VP 5 2
VP 5 4
Senior VP 4 1
Irwin/McGraw-Hill © The McGraw-Hill Companies, Inc., 2000
LINDMASON
MARCHAL
tingkat Fo fe 0-e (0-e)2/e % of chisq
Petugas 30 32 -2 0,125 0,89
Supervisor
110 113 -3 0,079 0,57
Manajer 86 87 -1 0,011 0,08
Manajer mid
23 24 -1 0,041 0,30
Ass. VP 5 2 3 4,5 32,12
VP 5 4 1 0.25 1,78
Senior VP 4 1 3 9 64,25
263 263 14,008 100
Irwin/McGraw-Hill © The McGraw-Hill Companies, Inc., 2000
LINDMASON
MARCHAL
tingkat Fo fe 0-e (0-e)2/e % of chisq
Petugas 30 32 -2 0,125
Supervisor
110 113 -3 0,079
Manajer 86 87 -1 0,011
Manajer mid
23 24 -1 0,041
VP 14 7 7 7
263 263
Irwin/McGraw-Hill © The McGraw-Hill Companies, Inc., 2000
LINDMASON
MARCHAL
Analisis Tabel Kemungkinan
• Bab 4. data bivariat• Bab. 5. tabel kemungkinan• Chi-square dapat dipakai utk uji dua
variabel skala nominal. (2 variabel bebas)Pilihan tinggal
penyesuaian
Luar biasa
baik cukup Tidak puas
total
Kota asal
27 35 33 25 120
Bukan kota asal
13 15 27 25 80
40 50 60 50 200
Irwin/McGraw-Hill © The McGraw-Hill Companies, Inc., 2000
LINDMASON
MARCHAL
• Df= (jumlah baris -1)(jumlah kolom-1)
= (r-1)(c-1) = (2-1)(4-1)=3• Sign. 0,01• Nilai kritis 11,345• Tolak ho jika x2 > 11,345
Irwin/McGraw-Hill © The McGraw-Hill Companies, Inc., 2000
LINDMASON
MARCHAL
• Fe =(juml.baris)(juml. Kolom)/(juml.seluruh)• = ((120)(40))/(200)=24
Pilihan tinggal
penyesuaian
Luar biasaF0-fe
Baik
F0-fe
cukup
F0-fe
Tidak puasF0-fe
TotalF0 –fe
Kota asal
27 - 24
35 – 30
33 - 36
25 - 30 120-120
Bukan kota asal
13 – 16
15 – 20
27 – 24
25 – 20
80-80
40 – 40
50 - 50 60 – 60
50 - 50 200-200
x
f f
fe
e
2 0
2
Irwin/McGraw-Hill © The McGraw-Hill Companies, Inc., 2000
LINDMASON
MARCHAL
• X2= ((27-24)2)/24 + ((35-30)2)/30 + dst
• =5,729• terima ho
Irwin/McGraw-Hill © The McGraw-Hill Companies, Inc., 2000
LINDMASON
MARCHAL
• Prosedur: · tentukan rata-rata dan standar deviasi dari
distribusi frekuensi. (f0-fe)2/fe· Hitung nilai-z untuk batas bawah kelas dan
batas atas kelas. · Tentukan untuk setiap kategori .· Gunakan chi-square goodness-of-fit test
untuk menentukan jika berkoinsiden dgn .
fe
f0fe
Irwin/McGraw-Hill © The McGraw-Hill Companies, Inc., 2000
LINDMASON
MARCHAL
EXAMPLE 3
• A sample of 500 donations to the Arthritis Foundation is reported in the following frequency distribution. Is it reasonable to conclude that the distribution is normally distributed with a mean of $10 and a standard deviation of $2? Use the .05 significance level.
• Note: To compute for the first class, first compute the probability for this class. P(x<6)=P[z<(6-10)/2]=.0228. Thus is (.0228)(500)=11.4
fe
fe
13-12
Irwin/McGraw-Hill © The McGraw-Hill Companies, Inc., 2000
LINDMASON
MARCHAL
Example 3 continued
Amount fo Area fe e
eof
ff 2
Less than $6 20 .02 11.40 6.49
$6 up to 8 60 .14 67.95 0.93
$8 up to 10 140 .34 170.65 5.50
$10 up to 12 120 .34 170.65 15.03
$12 up to 14 90 .14 67.95 7.16
More than $14 70 .02 11.40 301.22
Irwin/McGraw-Hill © The McGraw-Hill Companies, Inc., 2000
LINDMASON
MARCHAL
EXAMPLE 3 continued
• Step 1: : The distribution is normal. : The distribution is not
normal.• Step 2: The significance level is .05.• Step 3: is rejected if• Step 4:• Step 5: is rejected . The
distribution is not normal
H0
H1
H0 x df2 1107 5 05 . , , .x2 336 33 .
H0
13-14
Irwin/McGraw-Hill © The McGraw-Hill Companies, Inc., 2000
LINDMASON
MARCHAL
Contingency Table Analysis
• Contingency table analysis dgunakan untuk menguji apakah dua traits atau variables terkait.
• Setiap observasi diklasifikasikan menyesuaikan dua variabel. The usual hypothesis testing procedure is used.
• degrees of freedom /df sama dengan: (jumlah baris-1)(jumlah-kolom-1).
• Frekuensi harapan/expected frequency dihitung sebagai berikut:
(row total)(column total)/grand total
13-15
Irwin/McGraw-Hill © The McGraw-Hill Companies, Inc., 2000
LINDMASON
MARCHAL
EXAMPLE 4
• Is there a relationship between the location of an accident and the gender of the person involved in the accident? A sample of 150 accidents reported to the police were classified by type and gender. At the .05 level of significance, can we conclude that gender and the location of the accident are related?
13-16
Irwin/McGraw-Hill © The McGraw-Hill Companies, Inc., 2000
LINDMASON
MARCHAL
EXAMPLE 4 continued
Sex Work Home Other Total
Male 60 20 10 90
Female 20 30 10 60
Total 80 50 20 150
Note: The expected frequency for the work-male intersection is computed as (90)(80)/150=48.Similarly, you can compute the expected frequencies for the other cells.
13-17
Irwin/McGraw-Hill © The McGraw-Hill Companies, Inc., 2000
LINDMASON
MARCHAL
EXAMPLE 4 continued
• Step 1: : Gender and location are not related. : Gender and location are related.
• Step 2: The significance level is.05.• Step 3: is rejected if• Step 4:• Step 5: is rejected. Gender and
location are related.
H0
H1
H0 x df2 5991 2 05 . , , .
x2 16 667 .H0
13-18