uji goodness of fit : distribusi multinomial

30
Uji Goodness of Fit : Distribusi Multinomial

Upload: ayanna

Post on 04-Jan-2016

237 views

Category:

Documents


34 download

DESCRIPTION

Uji Goodness of Fit : Distribusi Multinomial. Distribusi Multinomial. Distribusi Multinomial merupakan generalisasi dari distribusi binomial yaitu dengan melonggarkan kriteria banyaknya hasil ( outcome ) yang mungkin jadi lebih dari 2 . - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Uji  Goodness of Fit :  Distribusi  Multinomial

Uji Goodness of Fit : Distribusi Multinomial

Page 2: Uji  Goodness of Fit :  Distribusi  Multinomial

Distribusi Multinomial

Distribusi Multinomial merupakan generalisasi dari distribusi binomial yaitu dengan melonggarkan kriteria banyaknya hasil (outcome) yang mungkin jadi lebih dari 2.

Dalam hal ini maka percobaannya disebut percobaan multinomial sedangkan distribusi probabilitasnya disebut distribusi multinomial.

Page 3: Uji  Goodness of Fit :  Distribusi  Multinomial

Definisi:Misalkan tiap percobaan bisa menghasilkan k hasil yang berbeda yaitu E1, E2, …,Ek dan masing-masing dengan probabiliitas p1, p2, …,pk.

Distribusi multinomial f(x1,x2,…,xk; n, p1,p2, ..,pk) akan memberikan probabilitas bahwa E1 akan muncul sebanyak x1 kali, E2 akan muncul sebanyak x2 kali, dst dalam pengambilan independen sebanyak n kali, jadi

x1+ x2+ ….+ xk=n

dengan p1+p2+ …+ pk =1 dan

kxk

xx

kkk ppp

xxx

nnppxxf ...

,...,),,...,;,...,( 21

2121

11

Page 4: Uji  Goodness of Fit :  Distribusi  Multinomial

1127.0)18

11()

6

1()

9

2(

3,1,2

6)6,

18

11,6

1,9

2;3,1,2( 312

321321

npppxxxf

Sebuah airport memiliki 3 buah landas pacu (runway), dan probabilitas sebuah runway dipilih oleh pesawat yg akan mendarat adalah:runway -1 : 2/9runway -2 : 1/6runway -3 : 11/18

Berapakah probabilitas 6 pesawat yg datang secara acak di distribusikan ke dalam runway-runway tsb spt berikut:runway -1 : 2 pesawatrunway -2 : 1 pesawatrunway -3 : 3 pesawat

Jawab.Pemilihan runway acak dan independen, dengan p1=2/9, p2=1/6 dan p3=11/18. Probabilitas untuk x1=2, x2= 1 dan x3=3 adalah

Page 5: Uji  Goodness of Fit :  Distribusi  Multinomial

Contoh • Seorang dokter melakukan pengobatan sebanyak 6 kali

terhadap 6 orang penderita gagal jantung dengan hasil sembuh sempurna, sembuh dengan gejala sisa, dan meninggal.

• Berapa besar probabilitas dari 6 kali pengobatan tersebut menghasilkan 2 orang sembuh sempurna, 2 orang sembuh dengan gejala sisa, dan 2 orang meninggal.

p =n!

(P1r1) (P1

r1) (P1

r1)r1!r2r3!

p =6!

(1/3)2 (1/3)2(1/3)2

2! 2! 2!

P = 0,123 = 12,3%

Page 6: Uji  Goodness of Fit :  Distribusi  Multinomial

Contoh

• Berdasarkan teori genetika, perbandingan seekor hamster betina akan melahirkan anak dgn warna bulu merah,hitam dan putih adalah 8:4:4. Hitung peluang akan lahir anak dgn warna merah 5 ekor, hitam 2 ekor, putih 1 ekor dari kelahiran 8 ekor.

5 2 5 38

5 2 8 45,2,1

8 4 4 8 4 4 8! 8 4 1 1685,2,1; , , 168 0,656

16 16 16 16 16 16 5!2!1! 16 4 256f

Page 7: Uji  Goodness of Fit :  Distribusi  Multinomial

Uji Goodness of Fit

Uji Goodness of Fit

Bagaimana dekat hasil pengamatan/sampel sesuai dengan yang diharapkan ?

Example: In tossing a coin, you expect half heads and half tails. You tossed a coin 100 times. You expected 50 heads and 50 tails. However, you obtained 48 heads and 52 tails. Are 48 heads and 52 tails close enough to call the coin fair?

Page 8: Uji  Goodness of Fit :  Distribusi  Multinomial

Uji Hipotesis untuk proporsi dari Populasi Multinomial

1. Nyatakan Hipotesis nol dan hipotesis alternatifnya.

2. Ambil sampel random dan tentukan frekuensi pengamatan, fi , untuk masing-masing k kategori.

3. Dengan menganggap H0 benar, frekuensi harapan ei dihitung untuk tiap kategori yaitu dengan mengalikan tiap kategori dengan probabilitas tiap kategori dengan ukuran sampel (sample size).

Page 9: Uji  Goodness of Fit :  Distribusi  Multinomial

Uji Hipotesis untuk proporsi dari Populasi Multinomial

22

1

( )f ee

i i

ii

k

4. Hitung statistik uji

Catatan : Statistik mempunyai distribusi chi-kuadrat dengan derajat bebas k – 1 asalkan frekuensi harapan untuk semua kategori lebih dari 5.

Catatan : Statistik mempunyai distribusi chi-kuadrat dengan derajat bebas k – 1 asalkan frekuensi harapan untuk semua kategori lebih dari 5.

fi = frekuensi pengamatan untuk kategori iei = frekuensi harapan untuk ik = banyak kategori

dengan

Page 10: Uji  Goodness of Fit :  Distribusi  Multinomial

Uji Hipotesis untuk proporsi dari Populasi Multinomial

dengan adalah tingkat signifikansi dan distribusinya adalah distribusi chi-kuadrat

dengan derajat bebas k – 1.

p-value approach:

Critical value approach:

Reject H0 if p-value < a

5. Aturan Penolakan

2 2 Reject H0 if

Page 11: Uji  Goodness of Fit :  Distribusi  Multinomial

Multinomial Distribution Goodness of Fit Test

Example: Finger Lakes Homes (A)

Finger Lakes Homes manufactures four models of prefabricated homes, a two-story colonial, a log cabin, a split-level, and an A-frame. To help in production planning, management would like to determine if previous customer purchases indicate that there is a preference in the style selected.

Page 12: Uji  Goodness of Fit :  Distribusi  Multinomial

Split- A-Model Colonial Log Level Frame# Sold 30 20 35 15

The number of homes sold of eachmodel for 100 sales over the past twoyears is shown below.

Multinomial Distribution Goodness of Fit Test

Example: Finger Lakes Homes (A)

Page 13: Uji  Goodness of Fit :  Distribusi  Multinomial

Hypotheses

Multinomial Distribution Goodness of Fit Test

where: pC = population proportion that purchase a colonial pL = population proportion that purchase a log cabin pS = population proportion that purchase a split-level pA = population proportion that purchase an A-frame

H0: pC = pL = pS = pA = .25

Ha: The population proportions are not

pC = .25, pL = .25, pS = .25, and pA = .25

Page 14: Uji  Goodness of Fit :  Distribusi  Multinomial

Hypotheses

Ho : There is no preference in the home styles or all home styles have equal preferences.

Ha : All home styles do not have equal preferences.

Page 15: Uji  Goodness of Fit :  Distribusi  Multinomial

Rejection Rule

22

7.815 7.815

Do Not Reject H0Do Not Reject H0 Reject H0Reject H0

Multinomial Distribution Goodness of Fit Test

With = .05 and k - 1 = 4 - 1 = 3 degrees of freedom

Reject H0 if p-value < .05 or c2 > 7.815.

Page 16: Uji  Goodness of Fit :  Distribusi  Multinomial

Expected Frequencies

Test Statistic

22 2 2 230 25

2520 2525

35 2525

15 2525

( ) ( ) ( ) ( )

Multinomial Distribution Goodness of Fit Test

e1 = .25(100) = 25 e2 = .25(100) = 25

e3 = .25(100) = 25 e4 = .25(100) = 25

= 1 + 1 + 4 + 4 = 10

Page 17: Uji  Goodness of Fit :  Distribusi  Multinomial

Multinomial Distribution Goodness of Fit Test

Conclusion Using the p-Value Approach

The p-value < a . We can reject the null hypothesis.

Because c2 = 10 is between 9.348 and 11.345, the area in the upper tail of the distribution is between .025 and .01.

Area in Upper Tail .10 .05 .025 .01 .005c2 Value (df = 3) 6.251 7.815 9.348 11.345 12.838

Note: A precise p-value can be found using R. Note: A precise p-value can be found using R.

Page 18: Uji  Goodness of Fit :  Distribusi  Multinomial

Conclusion Using the Critical Value Approach

Multinomial Distribution Goodness of Fit Test

We reject, at the .05 level of significance,the assumption that there is no home stylepreference.

c2 = 10 > 7.815

Page 19: Uji  Goodness of Fit :  Distribusi  Multinomial

Solusi dengan SPSS : Data

Page 20: Uji  Goodness of Fit :  Distribusi  Multinomial

Solusi dengan SPSS

• Sesudah mengimputkan data dalam bentuk frekuensi pengamatan seperti di samping selanjutnya digunakan perintah Analyze Non Parametrik Statistik Chi-square

Page 21: Uji  Goodness of Fit :  Distribusi  Multinomial

Langkah pengerjaan dengan SPSS

Page 22: Uji  Goodness of Fit :  Distribusi  Multinomial

Output SPSS :

• Dari output SPSS diperoleh X2 = 10 dengan nilai-p = 0.019 sehingga Ho ditolak artinya distribusinya tidak seragam diskrit (homogen).

Page 23: Uji  Goodness of Fit :  Distribusi  Multinomial

Soal 1

Page 24: Uji  Goodness of Fit :  Distribusi  Multinomial

Soal 2

Page 25: Uji  Goodness of Fit :  Distribusi  Multinomial

Soal 3

Page 26: Uji  Goodness of Fit :  Distribusi  Multinomial

Soal 4

Page 27: Uji  Goodness of Fit :  Distribusi  Multinomial

Soal 5

Page 28: Uji  Goodness of Fit :  Distribusi  Multinomial

Soal 6

Page 29: Uji  Goodness of Fit :  Distribusi  Multinomial

Soal 7

Page 30: Uji  Goodness of Fit :  Distribusi  Multinomial

TERIMA KASIH