analisis chi-square (x€¦ · · 2017-02-27the chi-square distribution can be used to see...
TRANSCRIPT
Analisis Chi-Square (x2 )
• Chi square ("χ2" dari huruf Yunani "Chi“ "Kai") to
determine if data “good” or not.• Expl. .. to determine possible outcomes for genetic crosses.
• How will we know if our fruit fly data is “good”?
xBlack
F1: all wild
wild
5610: 9
1881:3
1896:3
622: 1Jika F1 X F1 menghasilkan
F2 dengan Rasio : 9:3:3:1 ?
The chi-square distribution
can be used to see whether or not an observed
counts agree with an expected counts.
(Ringkas: data sesuai harapan/teori atau tidak)
O = observed count (Observasi)
E = Expected count (harapan)
EEO 2)(2
•For testing significance of patterns in
qualitative data
• based on counts that represent the number of items that fall in
each category
•measures the agreement between actual counts and expected counts
assuming the null hypothesis
Rumus dasar dari uji Kai Kuadrat adalah :
Keterangan :
O = frekuensi hasil observasi
E = frekuensi yang diharapkan.
Nilai E = (Jumlah sebaris x Jumlah Sekolom) / Jumlah data
Derajat bebas: df = (b-1) (k-1)
Uji Kai Kuadrat dapat digunakan untuk menguji :
1. Uji χ2 : ada tidaknya hubungan antara dua variabel (Independency test).
2. Uji χ2 : homogenitas antar- sub kelompok (Homogenity test).
3. Uji χ2 : untuk Bentuk Distribusi (Goodness of Fit)
EEO 2)(2
Tahapan Uji Hipotesis
1. Nyatakan Hipotesis– null (Ho = Specifies a distribution of proportions)
– there is no substantial statistical deviation between observed and expected data.
– Research (H1= Specifies that the distribution will be different than that indicated in the null hypothesis
2. Select an alpha level and determine the critical value ( pada tabel distribusi chi-square)
3. Hitung test statistik:
4. Make a decision (Kesimpulan) .
EEO 2)(2
Calculating the test statistic• Observed frequencies (Observasi)
– the number of individuals from the sample who are classified in a particular category
– fo
• Expected frequencies (Harapan)
– the number of individuals from the sample who are expected to be classified in a particular category
– fe
Hitungan Contoh Sederhana:
Heads Tails
Percentages 50%50%
Proportions .5 .5
Pelemparan mata uang :
What percentage of people will predict heads? tails?
Expected Heads Tails
Proportions .5 .5
Frequencies 25 25
•Expected frequency = fe = pn
•n = 50 (sample size)
•fe = .5 x 50 = 25
Calculating the test statistic
x2 = ∑ (fo - fe)2
fe
Heads Tails
Observed 35 15
Expected 25 25
Steps
1. find the difference between fo and fe for
each category
2. square the difference
3. divide the squared difference by fe
4. sum the values from all categories
Hitungan:
x2 = ∑ (fo - fe)2 = 4 + 4 = 8
fe
Heads Tails
Observed
(fo)35 15
Expected
(fe)25 25
fo - fe 10 -10
(fo - fe)2 100 100
(fo - fe)2/fe 4 4
• Membuat Kesimpulan:
– Critical value = 3.84 (with df = 1 and = .05)
– Observed chi square = 8.0
– 8.0 > 3.84
– We reject the null hypothesis
– Conclude that category frequencies are different
– People were more likely to predict heads than tails
Goodness of fit
Observed Expected
Frequency Frequency
H 40 50
T 60 50
--------------------------------------------------------
Jumlah 100 100
2
22
2 2
2 2
40 50
50
60 50
50
10
50
10
50
100
50
100
50
2 2
4
statistic formula
O E
E
( )
( ) ( )
( ) ( )
Contoh Soal :
Hasil observasi suatu data percobaan
HITUNGAN TEST STATISTIK
Data Observed Expected
Die Frequency Frequency--------------------------------------------------------
1 4 10
2 6 10
3 17 10
4 16 10
5 8 10
6 9 10
===============================
Jumlah 60 60
2
22
2 2
2 2
2 2
4 10
10
6 10
10
17 10
10
16 10
10
8 10
10
9 10
50
14 2
statistic formula
O E
E
( )
( ) ( )
( ) ( )
( ) ( )
.
HITUNGAN TEST STATISTIK
Tabel: Critical values for chi square
distributionCritical value (df = 1, = .05) = 3.84
Catatan: Setiap mahasiswa harus punya tabel lengkap. Chi-square
(3.1) .Chi-Square (tes independensi) : menguji apakah ada hubungan antara baris dengan
kolom pada sebuah tabel kontingensi. Data yang digunakan adalah data kualitatif.
X2 =(O – E)2
EΣ Di mana O = skor yang diobservasi
E = skor yang diharapkan (expected)
Contoh :Terdapat 20 siswa perempuan dan 10 siswa laki-laki yang fasih berbahasa Inggris, serta
10 siswa perempuan dan 30 siswa laki-laki yang tidak fasih berbahasa Inggris.
Apakah ada hubungan antara jenis kelamin dengan kefasihan berbahasa Inggris ?
Ho = tidak ada hubungan antara baris dengan kolom
H1 = ada hubungan antara baris dengan kolom
LP
Fasih
Tidak fasih
Σ
Σ
a b
c d
O E (O-E) (O-E)2 (O-E)2/E
a 20 (a+b)(a+c)/N
b 10 (a+b)(b+d)/N
c 10 (c+d)(a+c)/N
d 30 (c+d)(b+d)/N
df = (kolom – 1)(baris – 1)
Jika X2 hitung < X2 tabel, maka Ho diterima
Jika X2 hitung > X2 tabel, maka Ho ditolak
contoh soal peternakan
CHI-SQUARE DISTRIBUTION TABLE
Accept Hypothesis Reject Hypothesis
Probability (p)
Degrees of Freedom
0.95 0.90 0.80 0.70 0.50 0.30 0.20 0.10 0.05 0.01 0.001
1 0.004 0.02 0.06 0.15 0.46 1.07 1.64 2.71 3.84 6.64 10.83
2 0.10 0.21 0.45 0.71 1.39 2.41 3.22 4.60 5.99 9.21 13.82
3 0.35 0.58 1.01 1.42 2.37 3.66 4.64 6.25 7.82 11.34 16.27
4 0.71 1.06 1.65 2.20 3.36 4.88 5.99 7.78 9.49 13.38 18.47
5 1.14 1.61 2.34 3.00 4.35 6.06 7.29 9.24 11.07 15.09 20.52
6 1.63 2.20 3.07 3.83 5.35 7.23 8.56 10.64 12.59 16.81 22.46
7 2.17 2.83 3.82 4.67 6.35 8.38 9.80 12.02 14.07 18.48 24.32
8 2.73 3.49 4.59 5.53 7.34 9.52 11.03 13.36 15.51 20.09 26.12
9 3.32 4.17 5.38 6.39 8.34 10.66 12.24 14.68 16.92 21.67 27.88
10 3.94 4.86 6.18 7.27 9.34 11.78 13.44 15.99 18.31 23.21 29.59