Inferensia Statistik VALID?? parametrik. Uji Khi Kuadrat.pdf · parametrik VALID?? Tergantung dari...
Transcript of Inferensia Statistik VALID?? parametrik. Uji Khi Kuadrat.pdf · parametrik VALID?? Tergantung dari...
Inferensia Statistikparametrik
VALID??
Tergantung dari bentuk populasiTergantung dari bentuk populasidarimana sampel diambil
Uji kesesuaian (Uji kesesuaian (goodness goodness f fitf fit) t k t b l ) t k t b l of fitof fit) untuk tabel ) untuk tabel
frekuensifrekuensifrekuensifrekuensiGoodness-of-fit Tests
ASUMSI:ASUMSI:
Data terdiri dari sampelk b k b iacak sebanyak n observasi
saling bebas
Skala pengukuran dapatnominalnominal
D t b i d t diData observasi dapat diklasifikasikan menjadi r
kategori yang tidaktumpang-tindih
ChiChi--Square PearsonSquare Pearsontumpang tindih
Hipotesis:Hipotesis:H0: Sampel diambil dari populasi yang menyebar
normal/poisson/binom/dsbnormal/poisson/binom/dsbH1: Sampel tidak diambil dari populasi yang
men ebar normal/poisson/binom/dsbmenyebar normal/poisson/binom/dsb
Statistik Uji:Statistik Uji:( )∑ −
=r
iihit E
EO 22χ ∑
=i iE1
ChiChi--Square Pearson (Square Pearson (lanjutanlanjutan))
Kaidah Keputusan:Tolak H0 Jika 2
12
−−≥ grhit χχ
Note:Note:r = jumlah kategorig= jumlah parameter yang diduga
ChiChi--Square Pearson (Square Pearson (lanjutanlanjutan))
Hipotesis:
Lebih umum digunakan untuk uji logistik & log-linier
Hipotesis:H0: Sampel diambil dari populasi yang menyebar
normal/poisson/binom/dsbH0: Sampel tidak diambil dari populasi yang menyebar
normal/poisson/binom/dsb
Statistik Uji:⎟⎞
⎜⎛
∑ ir OOG l22
⎟⎟⎠
⎞⎜⎜⎝
⎛= ∑
= i
i
ii E
OOG ln21
2
ChiChi--Square Likelihood RatioSquare Likelihood Ratio
Hipotesis:
Lebih umum digunakan untuk uji logistik & log-linier
Hipotesis:H0: Sampel diambil dari populasi yang menyebar
normal/poisson/binom/dsbH0: Sampel tidak diambil dari populasi yang menyebar
normal/poisson/binom/dsb
Statistik Uji: ( )∑ −rii EOQ
2( )∑=
=i i
ii
OQ
1
ChiChi--Square Square NeymanNeyman
Apakah data berikut mempunyaisebaran poisson?
Kategori Amatan (Oi)1 802 613 133 134 1
IlustrasiIlustrasi
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/Ei (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 0.50 0.54 -12.682χ
2 61 50.4 2.23 1.84 23.293 13 14.6 0.18 0.20 -3.024 1 3 4 1 69 5 76 2 454 1 3.4 1.69 5.76 -2.45
Total 155 155 =4.60 Q=8.34 G2=5.14
IlustrasiIlustrasi ((lanjutanlanjutan))
db=4-1-1db 4 1 1
Kategori r=4 Parameter g=1
60.42 =hitχnilai_p=P( )
hitχ60.42
2 >χ
0.05 < nilai_p < 0.10_p
IlustrasiIlustrasi ((lanjutanlanjutan))
IlustrasiIlustrasi
Contoh 1:Seorang peneliti berkebangsaan Zimbabwe datang keSeorang peneliti berkebangsaan Zimbabwe datang keIPB untuk mengadakan penelitian. Sebanyak 36mahasiswa yang berkulit hitam diambil secara acakuntuk diteliti. Mahasiswa tersebut dikarantina di sebuahuntuk diteliti. Mahasiswa tersebut dikarantina di sebuahpulau terpencil untuk diberi pelatihan tentangkepemimpinan dalam rumah tangga. Sebanyak 6orang konselor yang berbeda budaya dan rasg y g ydisediakan untuk menjadi pembimbing mahasiswa.Setiap konselor dapat mempunyai 0 atau lebih dari 1mahasiswa. Setiap mahasiswa dapat memilih seorangp p gkonselor secara bebas. Peneliti mendugamahasiswa memilih konselor tanpa melihat latar belakangbudaya dan ras. Dengan kata lain, peneliti mendugay g , p gpopulasi menyebar seragam. Berikut tabel konselor denganjumlah mahasiswa bimbingannya
LanjutanLanjutan……….……….
LanjutanLanjutan…………
Jawab:Hipotesis:H0 : mahasiswa memilih konselor tanpa melihatlatar belakang budaya dan ras (populasimenyebar seragam).H1 : mahasiswa memilih konselor dengan melihatlatar belakang budaya dan ras (populasi tidakmenyebar seragam).
LanjutanLanjutan….….Statistik Uji:
222
1
( )ri i
i i
O EE
χ=
−=∑
1i i=
2 2 22 (13 6) (6 6) (3 6) 21 33χ − − −= + + + =
K
... 21.336 6 6
χ = + + + =
Keputusan:tabel untuk taraf nyata 0.05 dan derajat bebas 6-1=5 adalah 11.070 .Karena χ2 hitung lebih besar darikhi k d t 2 t bl k k b kti t k l kkhi-kuadrat χ2 table maka cukup bukti untuk menolakH0. Dapat disimpulkan bahwa mahasiswa memilihkonselor dengan melihat latar belakang budaya danrasras.
LanjutanLanjutan…..…..
Contoh2:seorang peneliti berkebangsaan Timoe Leste datangseorang peneliti berkebangsaan Timoe Leste datangke IPB untuk mengadakan penelitian. Peneliti tersebutingin mengetahui sebaran dari jumlah mahasiswa IPByang berkunjung ke perpustakaan Agronomi danStatistika untuk interval waktu tertentu. Interval waktuang dig nakan peneliti 30 menit nt k setiapyang digunakan peneliti 30 menit untuk setiap
observasi. Peneliti mengambil contoh dengan ukuran300 observasi Peneliti menduga jumlah mahasiswa300 observasi. Peneliti menduga jumlah mahasiswayang berkunjung ke perpustakaan Agronomi danStatistika mengikuti sebaran Poisson.
LanjutanLanjutan….….
LanjutanLanjutan….….
Jawab:Hipotesis:Hipotesis:H0 : data mengikuti sebaran PoissonH d id k ik i b P iH1 : data tidak mengikuti sebaran PoissonStatistik Uji:Mencari
(0)(20) (1)(54) (7)(4)(0)(20) (1)(54) ... (7)(4)ˆ 2.67300
λ + + += =
300
LanjutanLanjutan…..…..
Mencari nilai harapan dengan rumus:ˆ̂ ˆ
( )!
xef xx
λ λ−
=!
0 ,1, .. , 7x
x =Observasi 20 54 74 67 45 25 11 4Nilai harapan 20.7 55.5 74.1 66.0 44.1 23.4 10.5 3.9
22
1
( )ri i
i i
O EE
χ −=∑
1i iE=
2 2 22 (20 20.7) (54 55.5) (4 3.9)... 0.234χ − − −= + + + =... 0.234
20.7 55.5 3.9χ + + +
LanjutanLanjutan….….
Kesimpulan:
i b l d dilih k d j b bDari 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 untukperpustakaan Agronomi dan Statistika untuk
interval waktu 30 menit mengikuti sebaran
Poisson.
The MINITAB data file "GRADES MTW" The 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
IlustrasiIlustrasi
I chose to divide the observations into 10 I chose to divide the observations into 10 bins, as follows:
X BB BANormsdi
st(X)
Normal prob =normdis(BA)-normdit(BB)
Observed counts
Expected Counts O-E
((O-E)2)/EX 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.0020 5 0 0 5 0 691 0 191 38 38 3 0 3 0 0020.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.1301.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.0044> 2 1.000 0.023 3 4.5 -1.5 0.524
The chi square statistic is the sum of the values in The chi-square statistic is the sum of the values in
the last column, and is equal to 2.69.
Since the data are divided into 10 bins and we have
estimated two parameters, the calculated value may p , y
be tested against the chi-square distribution with 10 -
1 2 = 7 degrees of freedom 1 -2 = 7 degrees of freedom.
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
normally distributed.
LanjutanLanjutan….….
LanjutanLanjutan….….
LanjutanLanjutan….….juju
LanjutanLanjutan….….
Kesimpulan:Dari tabel A 11 diperoleh nilai tabelDari tabel A.11 diperoleh nilai tabeldengan derajat bebas 9-2-1=6 dan tarafnyata 0 05 adalah 12 592 hitung lebihnyata 0.05 adalah 12.592. hitung lebihbesar dari tabel, maka cukup bukti untukmenolak H Jadi dugaan Departemenmenolak H0. Jadi dugaan DepartemenKimia tersebut dapat diterima untuk tarafnyata 0 05nyata 0.05.
LanjutanLanjutan…..…..Contoh4:Contoh4:
LanjutanLanjutan…………..…………..jj
LanjutanLanjutanLanjutanLanjutan……..……..
6-1-1=4 9,49
Test of Homogeneity Test of Homogeneity Test of Homogeneity Test of Homogeneity and Independenceand Independenceand Independenceand 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 h2. 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) ( p )
A test of homogeneity tests the null hypothesis that A test of homogeneity tests the null hypothesis that
different populations have the same proportions of some
h t i ti characteristics.
The key difference from the test of independence is that
there are multiple populations that the data is drawn from.
H0: p1 = p2 = · · · = pnH0: 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.
A test of independence tests the null hypothesis thatA test of independence tests the null hypothesis thatthere is no association between the two variables in a
i bl h h d i ll d fcontingency table where the data is all drawn fromone population.
H0 : X and Y are independent. Ha : X and Y are dependentHa : X and Y are dependent.
Test of independenceTest of independence
Test of independence and Test of independence and ppHomogeneity RequirementsHomogeneity 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 test1 If dependent observations, use McNemar’s test.df = (number rows - 1)(number columns - 1)
The p-value is always the area to the The p-value is always the area to the RIGHT of χ2 .
The The χχ22 DistributionDistribution