Anda di halaman 1dari 36

Inferensia Statistik VALID??

parametrik

Tergantung dari bentuk populasi


darimana sampel diambil
Uji kesesuaian (goodness
(goodness
off fit)
fit) untuk
t k tabel
t b l
frekuensi
Goodness-of-fit Tests
ASUMSI:
Data terdiri dari sampel
acak
k sebanyak
b k n observasi
b i
saling bebas

Skala pengukuran dapat


nominal

Data
D t observasi
b i dapat
d t di
klasifikasikan menjadi r
kategori yang tidak
tumpang-tindih
tumpang tindih

Chi--Square Pearson
Chi
Hipotesis:
H0: Sampel diambil dari populasi yang menyebar
normal/poisson/binom/dsb
H1: Sampel tidak diambil dari populasi yang 
men ebar normal/poisson/binom/dsb
menyebar

Statistik Uji:
χ =∑
2
r
(Oi − Ei )
2

hit
i =1 Ei

Chi--Square Pearson (
Chi (lanjutan
lanjutan)
)
Kaidah Keputusan:
Tolak H0 Jika
χ ≥χ
2
hit
2
r − g −1

Note:
r = jumlah kategori
g= jumlah parameter yang diduga

Chi--Square Pearson (
Chi (lanjutan
lanjutan)
)
Lebih umum digunakan untuk uji logistik & log-linier

Hipotesis:
H0: Sampel diambil dari populasi yang menyebar
normal/poisson/binom/dsb
H0: Sampel tidak diambil dari populasi yang menyebar
normal/poisson/binom/dsb

Statistik Uji: r
⎛ Oi ⎞
G = 2∑ Oi ln
2
l ⎜⎜ ⎟⎟
i =1 ⎝ Ei ⎠

Chi--Square Likelihood Ratio


Chi
Lebih umum digunakan untuk uji logistik & log-linier

Hipotesis:
H0: Sampel diambil dari populasi yang menyebar
normal/poisson/binom/dsb
H0: Sampel tidak diambil dari populasi yang menyebar
normal/poisson/binom/dsb

Statistik Uji:
Q=∑
r
(Oi − Ei )
2

i =1 Oi

Chi--Square Neyman
Chi
Apakah data berikut mempunyai
sebaran poisson?

Kategori Amatan (Oi)


1 80
2 61
3 13
4 1

Ilustrasi
Hipotesis:
H0: Sampel diambil dari populasi yang menyebar poisson (X~poisson(λ))
H0: Sampel tidak diambil dari populasi yang menyebar poisson

Statistik Uji

Kategori Amatan Harapan (Oi-E


Ei)2/Ei (Oi-E
Ei)2/Oi Oiln(Oi/Ei)
(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 34
3.4 1 69
1.69 5 76
5.76 -2.45
2 45
Total 155 155 =4.60 Q=8.34 G2=5.14

Ilustrasi (lanjutan
lanjutan)
)
db 4 1 1
db=4-1-1

Kategori Æ r=4 Parameter Æ g=1

χ hit
2
= 4.60
nilai_p=P( χ 2 > 4.60 )
2

0.05 < nilai_p


_p < 0.10

Ilustrasi (lanjutan
lanjutan)
)
Ilustrasi
Contoh 1:
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
pulau terpencil untuk diberi pelatihan tentang
kepemimpinan dalam rumah tangga. Sebanyak 6
orangg konselor yyangg berbeda budaya y dan ras
disediakan untuk menjadi pembimbing mahasiswa.
Setiap konselor dapat mempunyai 0 atau lebih dari 1
mahasiswa. Setiap p mahasiswa dapatp memilih seorang g
konselor secara bebas. Peneliti menduga
mahasiswa memilih konselor tanpa melihat latar belakang
budaya
y dan ras. Dengan g kata lain,, p
peneliti menduga
g
populasi menyebar seragam. Berikut tabel konselor dengan
jumlah mahasiswa bimbingannya
Lanjutan……….
Lanjutan ……….
Lanjutan……
Lanjutan ……

Jawab:
Hipotesis:
y H0 : mahasiswa memilih konselor tanpa melihat
latar belakang budaya dan ras (populasi
menyebar seragam).
y H1 : mahasiswa memilih konselor dengan melihat
latar belakang budaya dan ras (populasi tidak
menyebar seragam).
Lanjutan….
Lanjutan ….
Statistik Uji:

(
r
O − E ) 2
χ =∑ i
2 i

i =1 Ei
(13 − 6) 2
(6 − 6) 2
(3 − 6) 2
χ2 = + + ... + = 21.33
21 33
6 6 6

Keputusan:
K
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 table
khi-kuadrat t bl makak cukup
k b kti untuk
bukti t k menolak
l k
H0. Dapat disimpulkan bahwa mahasiswa memilih
konselor dengan melihat latar belakang budaya dan
ras.
ras
Lanjutan…..
Lanjutan …..
Contoh2:
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
yang
ang digunakan
dig nakan peneliti 30 menit untuk
nt k setiap
observasi. Peneliti mengambil contoh dengan ukuran
300 observasi.
observasi Peneliti menduga jumlah mahasiswa
yang berkunjung ke perpustakaan Agronomi dan
Statistika mengikuti sebaran Poisson.
Lanjutan….
Lanjutan ….
Lanjutan….
Lanjutan ….
Jawab:
y Hipotesis:
H0 : data mengikuti sebaran Poisson
H1 : data
d tidak
id k mengikuti
ik i sebaran
b P i
Poisson
y Statistik Uji:
Mencari

ˆ (0)(20) +(1)(54) +...+(7)(4)


λ= = 2.67
300
Lanjutan…..
Lanjutan …..
Mencari nilai harapan dengan rumus:
e − λˆ
λˆ x
f (x) =
x!
x = 0 ,1, .., 7
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
r
(O − E ) 2
χ2 = ∑ i i

i =1 Ei
(20 − 20.7) (54 −55.5)
2
(4 −3.9)
2 2
χ =
2
+ +... + = 0.234
20.7 55.5 3.9
Lanjutan….
Lanjutan ….
Kesimpulan:
y Darii tabel
b l dapat
d dilih untuk
dilihat k derajat
d j bebas
b b 8-1-
1=6 dan taraf nyata berapapun, hitung selalu
χ 2
lebih kecil dari tabel. Dapat disimpulkan tidak
cukup bukti untuk menolak H0. Dapat dikatakan
bahwa jumlah mahasiswa IPB yang datang ke
perpustakaan Agronomi dan Statistika untuk
interval waktu 30 menit mengikuti sebaran
Poisson.
y The MINITAB data file "GRADES
GRADES.MTW
MTW"
contains data on verbal and mathematical
SAT scores and grade point average for
200 college students. Suppose we wish to
determine whether the verbal SAT scores
follow a normal distribution. One method
is to evaluate the normal probability
plot for the data

Ilustrasi
y I chose to divide the observations into 10
bins, as follows:
Normal prob
Normsdi =normdis(BA) Observed Expected ((O-
X BB BA st(X) normdit(BB)
-normdit(BB) counts Counts O-E
O E E))2)/
)/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 5 -1 0 159
0.159 0 092
0.092 18 18 4
18.4 -0 4
-0.4 0 007
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
05
0.5 0 05
0.5 0 691
0.691 0 191
0.191 38 38 3
38.3 -0.3
03 0 002
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
y The chi-square
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 p
parameters,, the calculated value may
y
be tested against the chi-square distribution with 10 -
1 -2
2 = 7 degrees of freedom.
freedom
y For this distribution, the critical value for the 0.05
significance level is 14.07. Since 2.69 < 14.07, we do
j
not reject the null hypothesis
yp that the data are
normally distributed.
Lanjutan….
Lanjutan ….
Lanjutan….
Lanjutan ….
Lanjutan….
Lanjutan
ju ….
Lanjutan….
Lanjutan ….
Kesimpulan:
y Dari tabel A.11
A 11 diperoleh nilai tabel
dengan derajat bebas 9-2-1=6 dan taraf
nyata 0.05
0 05 adalah 12.592.
12 592 hitung lebih
besar dari tabel, maka cukup bukti untuk
menolak H0. Jadi dugaan Departemen
Kimia tersebut dapat diterima untuk taraf
nyata 0.05.
0 05
Lanjutan…..
Lanjutan …..
Contoh4:
Lanjutan
Lanjutan…………..
j …………..
Lanjutan……..
Lanjutan……..

6-1-1=4 9,49
Test of Homogeneity
and Independence
Often used to help answer:
1
1. Is the proportion of x the same in all the
populations? (homogeneity)
2. Is the
h proportion
i off x different
diff in
i at least
l one off the
h
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)
p )
y A test of homogeneity tests the null hypothesis that
different populations have the same proportions of some
characteristics.
h t i ti
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
(the proportion of X is the same in all the populations studied)

H1: At least one proportion of X is not the same.

Test of homogeneity.
y A test of independence tests the null hypothesis that
there is no association between the two variables in a
contingency
i table
bl where
h the
h data
d i all
is ll drawn
d f
from
one population.

H0 : X and Y are independent.


Ha : X and Y are dependent
dependent.

Test of independence
Test of independence
p and
Homogeneity Requirements

1. Sample data are randomly selected,


2
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

1If dependent observations,


observations use McNemar’s test.
test
df = (number rows - 1)(number columns - 1)
y The p-value is always the area to the
RIGHT of χ2 .

The χ2 Distribution

Anda mungkin juga menyukai