Inferensia Statistik parametrik
VALID??
Tergantung dari bentuk populasi Tergantung dari bentuk populasi
Uji kesesuaian (
Uji kesesuaian (goodness
goodness
f fit
f fit) t k
) t k
t b l
t b l
of fit
of fit) untuk tabel
) untuk tabel
frekuensi
frekuensi
frekuensi
frekuensi
ASUMSI:
ASUMSI:
Data terdiri dari sampel k b k b i acak sebanyak n observasi
saling bebas
Skala pengukuran dapat nominal
nominal
D t b i d t di Data observasi dapat di klasifikasikan menjadi r
kategori yang tidak tumpang-tindih
Chi
Chi--Square Pearson
Square Pearson
Hipotesis:
Hipotesis:
H
0: Sampel diambil dari populasi yang menyebar
normal/poisson/binom/dsb
normal/poisson/binom/dsb
H
1: Sampel tidak diambil dari populasi yang
men ebar normal/poisson/binom/dsb
menyebar normal/poisson/binom/dsb
Statistik Uji:
Statistik Uji:
(
)
∑
−
=
r i i hitE
E
O
2 2χ
∑
= i 1E
iChi
Kaidah Keputusan:
Tolak H
0Jika
2
1
2
−
−
≥
r
g
hit
χ
χ
Note: Note: r = jumlah kategorig= jumlah parameter yang diduga
Chi
Hipotesis:
Lebih umum digunakan untuk uji logistik & log-linier
Hipotesis:
H
0: Sampel diambil dari populasi yang menyebar
normal/poisson/binom/dsb
H
0: Sampel tidak diambil dari populasi yang menyebar
normal/poisson/binom/dsb
Statistik Uji:
⎟
⎞
⎜
⎛
∑
i rO
O
G
22
l
⎟⎟
⎠
⎞
⎜⎜
⎝
⎛
=
∑
= i i i iE
O
O
G
2
ln
1 2Chi
Hipotesis:
Lebih umum digunakan untuk uji logistik & log-linier
Hipotesis:
H
0: Sampel diambil dari populasi yang menyebar
normal/poisson/binom/dsb
H
0: Sampel tidak diambil dari populasi yang menyebar
normal/poisson/binom/dsb
Statistik Uji:
(
)
∑
rO
i−
E
iQ
2(
)
∑
==
i i i iO
Q
1Chi
Apakah data berikut mempunyai sebaran poisson? Kategori Amatan (Oi) 1 80 2 61 3 13 3 13 4 1
Ilustrasi
Ilustrasi
Hipotesis: Hipotesis:
H0: Sampel diambil dari populasi yang menyebar poisson (X~poisson(λ)) H0: Sampel tidak diambil dari populasi yang menyebar poisson
Kategori Amatan Harapan (Oi-Ei)2/E
i (Oi-Ei)2/Oi Oiln(Oi/Ei) Statistik Uji Kategori Amatan (Oi) Harapan(Ei) (Oi Ei) /Ei (Oi Ei) /Oi Oiln(Oi/Ei) 1 80 86.6 χ2 0.50 0.54 -12.68 2 61 50.4 2.23 1.84 23.29 3 13 14.6 0.18 0.20 -3.02 4 1 3 4 1 69 5 76 2 45 4 1 3.4 1.69 5.76 -2.45 Total 155 155 =4.60 Q=8.34 G2=5.14
Ilustrasi
db=4-1-1 db 4 1 1 Kategori Æ r=4 Parameter Æ g=1
60
.
4
2=
hitχ
nilai_p=P( ) hitχ
60 . 4 2 2 > χ 0.05 < nilai_p < 0.10_pIlustrasi
Ilustrasi
Ilustrasi
Contoh 1:
Seorang peneliti berkebangsaan Zimbabwe datang ke Seorang peneliti berkebangsaan Zimbabwe datang ke IPB untuk mengadakan penelitian. Sebanyak 36
mahasiswa yang berkulit hitam diambil secara acak
untuk diteliti. Mahasiswa tersebut dikarantina di sebuah untuk diteliti. Mahasiswa tersebut dikarantina di sebuah pulau terpencil untuk diberi pelatihan tentang
kepemimpinan dalam rumah tangga. Sebanyak 6 orang konselor yang berbeda budaya dan rasg y g y
disediakan untuk menjadi pembimbing mahasiswa. Setiap konselor dapat mempunyai 0 atau lebih dari 1 mahasiswa. Setiap mahasiswa dapat memilih seorangp p g konselor secara bebas. Peneliti menduga
mahasiswa memilih konselor tanpa melihat latar belakang budaya dan ras. Dengan kata lain, peneliti mendugay g , p g
populasi menyebar seragam. Berikut tabel konselor dengan jumlah mahasiswa bimbingannya
Lanjutan
Lanjutan
Lanjutan……
……
Jawab:
Hipotesis:
y
H
0: mahasiswa memilih konselor tanpa melihat
latar belakang budaya dan
ras (populasi
menyebar seragam).
y
H
1: mahasiswa memilih konselor dengan melihat
latar belakang budaya dan
ras (populasi tidak
menyebar seragam).
Lanjutan
Lanjutan….
….
Statistik Uji:
22 2 1(
)
r i i i iO
E
E
χ
=−
=
∑
1 i= i 2 2 2 2(13 6)
(6 6)
(3 6)
21 33
χ
=
−
+
−
+ +
−
=
K...
21.33
6
6
6
χ
=
+
+ +
=
Keputusan:y tabel untuk taraf nyata 0.05 dan derajat bebas 6-1=5 adalah 11.070 .Karena χ2 hitung lebih besar dari
khi k d t 2 t bl k k b kti t k l k
khi-kuadrat χ2 table maka cukup bukti untuk menolak
H0. Dapat disimpulkan bahwa mahasiswa memilih konselor dengan melihat latar belakang budaya dan ras
Lanjutan
Lanjutan…..
…..
Contoh2:
seorang peneliti berkebangsaan Timoe Leste datang seorang peneliti berkebangsaan Timoe Leste datang ke IPB untuk mengadakan penelitian. Peneliti tersebut ingin mengetahui sebaran dari jumlah mahasiswa IPB yang berkunjung ke perpustakaan Agronomi dan
Statistika untuk interval waktu tertentu. Interval waktu ang dig nakan peneliti 30 menit nt k setiap
yang digunakan peneliti 30 menit untuk setiap
observasi. Peneliti mengambil contoh dengan ukuran 300 observasi Peneliti menduga jumlah mahasiswa 300 observasi. Peneliti menduga jumlah mahasiswa yang berkunjung ke perpustakaan Agronomi dan Statistika mengikuti sebaran Poisson.
Lanjutan
Lanjutan
Lanjutan….
….
Jawab:
Hipotesis:
y
Hipotesis:
H
0: data mengikuti sebaran Poisson
H
d
id k
ik i
b
P i
H
1: data tidak mengikuti sebaran Poisson
y
Statistik Uji:
Mencari
(0)(20) (1)(54)
(7)(4)
(0)(20) (1)(54) ... (7)(4)
ˆ
2.67
300
λ
=
+
+ +
=
300
Lanjutan
Lanjutan…..
…..
Mencari nilai harapan dengan rumus:
ˆˆ
ˆ
( )
!
xe
f
x
x
λλ
−=
!
0 ,1, .., 7
x
x
=
Observasi
20
54
74
67
45
25
11
4
Nilai harapan 20.7 55.5 74.1 66.0 44.1 23.4 10.5 3.9
2 2 1(
)
r i i i iO
E
E
χ
=
∑
−
1 i=E
i 2 2 2 2(20 20.7)
(54 55.5)
...
(4 3.9)
0.234
χ
=
−
+
−
+ +
...
−
=
0.234
20.7
55.5
3.9
χ
+
+ +
Lanjutan
Lanjutan….
….
Kesimpulan:
i b l d dilih k d j b b
y Dari tabel dapat dilihat untuk derajat bebas
8-1-1=6 dan taraf nyata berapapun, hitung selalu lebih kecil dari tabel. Dapat disimpulkan tidak cukup bukti untuk menolak H0. Dapat dikatakan
2
χ
cukup bukti untuk menolak H0. Dapat dikatakan bahwa jumlah mahasiswa IPB yang datang ke perpustakaan Agronomi dan Statistika untuk perpustakaan Agronomi dan Statistika untuk interval waktu 30 menit mengikuti sebaran Poisson.
y
The MINITAB data file "GRADES MTW"
yThe MINITAB data file GRADES.MTW
contains data on verbal and mathematical
SAT scores and grade point average for
SAT scores and grade point average for
200 college students. Suppose we wish to
determine whether the verbal SAT scores
determine whether the verbal SAT scores
follow a normal distribution. One method
is to evaluate the
normal probability
is to evaluate the
normal probability
plot
for the data
Ilustrasi
Ilustrasi
y
I chose to divide the observations into 10
yI chose to divide the observations into 10
X BB BA
Normsdi st(X)
Normal prob =normdis(BA)
-normdit(BB) Observed counts Expected Counts O-E E((O-)2)/E
X BB BA st(X) normdit(BB) counts Counts O E E) )/E
-2< -2 0.023 0.023 6 4.6 1.4 0.462 -1.5 -2 -1.5 0.067 0.044 6 8.8 -2.8 0.897 -1 -1 5 -1 0 159 0 092 18 18 4 -0 4 0 007 -1 -1.5 -1 0.159 0.092 18 18.4 -0.4 0.007 -0.5 -1 -0.5 0.309 0.150 33 30.0 3.0 0.305 0 -0.5 0 0.500 0.191 38 38.3 -0.3 0.002 0 5 0 0 5 0 691 0 191 38 38 3 0 3 0 002 0.5 0 0.5 0.691 0.191 38 38.3 -0.3 0.002 1 0.5 1 0.841 0.150 28 30.0 -2.0 0.130 1.5 1 1.5 0.933 0.092 21 18.4 2.6 0.377 2 1.5 2 0.977 0.044 9 8.8 0.2 0.004 4> 2 1.000 0.023 3 4.5 -1.5 0.524
The chi square statistic is the sum of the values in y The chi-square statistic is the sum of the values in
the last column, and is equal to 2.69.
y Since the data are divided into 10 bins and we have estimated two parameters, the calculated value may p , y be tested against the chisquare distribution with 10 -1 2 = 7 degrees of freedom
1 -2 = 7 degrees of freedom.
y For this distribution, the critical value for the 0.05
significance level is 14.07. Since 2.69 < 14.07, we do not reject the null hypothesis that the data are j yp
Lanjutan
Lanjutan
Lanjutan
Lanjutan
Lanjutan….
….
Kesimpulan:
y
Dari tabel A 11 diperoleh nilai tabel
yDari tabel A.11 diperoleh nilai tabel
dengan derajat bebas 9-2-1=6 dan taraf
nyata 0 05 adalah 12 592 hitung lebih
nyata 0.05 adalah 12.592. hitung lebih
besar dari tabel, maka cukup bukti untuk
menolak H Jadi dugaan Departemen
menolak H
0. Jadi dugaan Departemen
Kimia tersebut dapat diterima untuk taraf
nyata 0 05
Lanjutan
Lanjutan…..
…..
Contoh4:
Contoh4:
Lanjutan
Lanjutan
Lanjutan
Lanjutan
Lanjutan……..
……..
Test of Homogeneity
Test of Homogeneity
Test of Homogeneity
Test of Homogeneity
and Independence
and Independence
and Independence
and Independence
Often used to help answer:
Often used to help answer:
1 Is the proportion of x the same in all the 1. Is the proportion of x the same in all the
populations? (homogeneity)
h i f diff i l f h
2. Is the proportion of x different in at least one of the populations? (homogeneity)
3. Does one of many processes under evaluation have a higher proportion of x? (homogeneity)
4. Are X and Y dependent? (independence) 5. Are X and Y independent? (independence) 6. Is there a relationship between X and Y ?
(independence)
y A test of homogeneity tests the null hypothesis that y A test of homogeneity tests the null hypothesis that
different populations have the same proportions of some h t i ti
characteristics.
y The key difference from the test of independence is that
there are multiple populations that the data is drawn from.
H0: p1 = p2 = · · · = pn H0: p1 = p2 = = pn
(the proportion of X is the same in all the populations studied)
H1: At least one proportion of X is not the same. H1: At least one proportion of X is not the same.
Test of homogeneity.
Test of homogeneity.
y A test of independence tests the null hypothesis that y A test of independence tests the null hypothesis that there is no association between the two variables in a
i bl h h d i ll d f
contingency table where the data is all drawn from one population.
H0 : X and Y are independent. Ha : X and Y are dependent Ha : X and Y are dependent.
Test of independence
Test of independence
Test of independence and
Test of independence and
p
p
Homogeneity Requirements
Homogeneity Requirements
1. Sample data are randomly selected,
2 For each cell in the contingency table the expected 2. For each cell in the contingency table the expected
frequency Ei ≥ 5.
3. Individual observations must be independent.1 (No
distribution requirement.) Test Statistic
1 If dependent observations use McNemar’s test 1 If dependent observations, use McNemar’s test.
y