Anda di halaman 1dari 40

One-Way Analysis of Variance

Siskarossa Ika Oktora, SST, M. Stat


Adalah……

Prosedur statistika untuk mengkaji (mendeterminasi)


apakah rata-rata hitung (mean) dari 3 (tiga) populasi
atau lebih, sama atau tidak, yang dilakukan secara
simultan.
Dalam uji ini diasumsikan bahwa semua populasi yang
sedang dikaji memiliki keragaman atau varians
(variance) sama tanpa mempertimbangkan apakah
populasi-populasi tersebut memiliki rata-rata hitung
(mean) sama atau berbeda.
Skema untuk independent samples
Hipotesis

𝐻0 : 𝜇1 = 𝜇2 = 𝜇3 = 𝜇4 = ⋯ = 𝜇𝑘
𝑠𝑒𝑑𝑖𝑘𝑖𝑡𝑛𝑦𝑎 𝑎𝑑𝑎 1 𝑟𝑎𝑡𝑎 − 𝑟𝑎𝑡𝑎 𝑦𝑔 𝑡𝑑𝑘 𝑠𝑎𝑚𝑎
𝐻1 :
𝑠𝑒𝑑𝑖𝑘𝑖𝑡𝑛𝑦𝑎 𝑎𝑑𝑎 𝑑𝑢𝑎 𝑟𝑎𝑡𝑎 − 𝑟𝑎𝑡𝑎 𝑦𝑔 𝑏𝑒𝑟𝑏𝑒𝑑𝑎

Distribusi sampling yang digunakan untuk mengambil


keputusan statistik, yakni menolak atau gagal tolak
hipotesis nol (H0), adalah DISTRIBUSI F (F Distribution).
Notasi pada ANOVA

𝑥𝑖𝑗 = 𝑜𝑏𝑠𝑒𝑟𝑣𝑎𝑠𝑖 𝑘𝑒 − 𝑖, 𝑑𝑎𝑟𝑖 𝑠𝑎𝑚𝑝𝑒𝑙 𝑘𝑒 − 𝑗


𝑛𝑗 = 𝑗𝑢𝑚𝑙𝑎ℎ 𝑠𝑎𝑚𝑝𝑒𝑙 𝑑𝑎𝑟𝑖 𝑝𝑜𝑝𝑢𝑙𝑎𝑠𝑖 𝑘𝑒 − 𝑗
𝑛𝑗
𝑥
𝑖=1 𝑖𝑗
𝑥𝑗 = = 𝑟𝑎𝑡𝑎 − 𝑟𝑎𝑡𝑎 𝑑𝑎𝑟𝑖 𝑠𝑎𝑚𝑝𝑒𝑙 𝑘𝑒 − 𝑗
𝑛𝑗
𝑘 𝑛𝑗
𝑗=1 𝑥
𝑖=1 𝑖𝑗
𝑥= = 𝑟𝑎𝑡𝑎 − 𝑟𝑎𝑡𝑎 𝑘𝑒𝑠𝑒𝑙𝑢𝑟𝑢ℎ𝑎𝑛,
𝑛
𝑑𝑖𝑚𝑎𝑛𝑎 𝑛 = 𝑛1 + 𝑛2 +𝑛3 +...+𝑛𝑘
Tabel ANOVA
Souce of Degrees of Sum of Mean Squares F-statistics
Variation Freedom Squares
Treatment k-1 SST MST=SST/(k-1) F=MST/MSE
Error n-k SSE MSE=SSE/(n-k)
Total n-1 SS(Total) - -

𝑘
2
𝑆𝑆𝑇 = 𝑛𝑗 𝑥𝑗 − 𝑥
𝑗=1

𝑘 𝑛𝑗 𝑘
2
𝑆𝑆𝐸 = 𝑥𝑖𝑗 − 𝑥𝑗 = 𝑛𝑗 − 1 𝑆𝑗2
𝑗=1 𝑖=1 𝑗=1

𝑆𝑆 𝑇𝑜𝑡𝑎𝑙 = 𝑆𝑆𝑇 + 𝑆𝑆𝐸


Tabel ANOVA

Rejection Area :

Tolak 𝐻0 jika 𝐹 > 𝐹(∝;𝑘−1;𝑛−𝑘)


CONTOH SOAL
Dalam dekade terakhir pialang saham telah mengubah
cara mereka melakukan bisnis secara drastis. Saat ini lebih
mudah dan lebih murah untuk berinvestasi di pasar saham
dari sebelumnya.

Apa efek dari perubahan ini?

Untuk membantu menjawab pertanyaan ini seorang analis


keuangan memilih 366 sampel rumah tangga di Amerika
secara acak dan meminta masing-masing ruta untuk
melaporkan usia kepala rumah tangga dan proporsi aset
keuangan mereka yang diinvestasikan di pasar saham.
CONTOH SOAL
Kategori usia yang diteliti adalah :
1. Young (di bawah 35)
2. Early Middle Age (35-49)
3. Late Middle Age (50-65)
4. Senior (Lebih dari 65)
Peneliti ingin mengetahui apakah kepemilikan saham
bervariasi antar kategori usia.
Apakah dari data berikut dapat disimpulkan bahwa ada
perbedaan dalam kepemilikan saham diantara keempat
kelompok usia?
CONTOH SOAL
IDENTIFIKASI
The null hypothesis in this case is:
H0: μ1 = μ2 = μ3 = μ4
(there are no differences between population means)

Our alternative hypothesis becomes:


H1: at least two means differ

Now we need some test statistics…


IDENTIFIKASI
The null hypothesis in this case is:
H0: μ1 = μ2 = μ3 = μ4
(there are no differences between population means)

Our alternative hypothesis becomes:


H1: at least two means differ

Now we need some test statistics…


STATISTIK UJI
Such a statistic exists, and is called the between-
treatments variation. It is denoted SSTr, short for
“sum of squares for treatments”. Its is calculated as:

 
k 2
SSTr   n j x j  x
sum across k Grand mean
treatments
j 1

A large SSTr indicates large variation between sample


means which supports H1.
STATISTIK UJI
SST gave us the between-treatments variation. A
second statistic, SSE (Sum of Squares for Error)
measures the within-treatments variation.
SSE is given by:
nj

SSE    yij  y j  atau SSE    n j  1 s 2j


k k
2

j 1 i 1 j 1

In the second formulation, it is easier to see that it


provides a measure of the amount of variation we
can expect from the random variable we’ve observed.
STATISTIK UJI
Since:
𝑘
2
𝑆𝑆𝑇 = 𝑛𝑗 𝑥𝑗 − 𝑥
𝑗=1
If it were the case that:
𝒙𝟏 = 𝒙𝟐 = 𝒙 𝟑 = 𝒙𝟒

then SST = 0 and our null hypothesis, H0: μ1 = μ2 = μ3 = μ4 would be


supported.

More generally, a small value of SST supports the null hypothesis. A


large value of SST supports the alternative hypothesis. The question
is, how large is “large enough”?
Penghitungan
Sample means dan Sample sizes
grand mean
Penghitungan
Hence, the between-treatments variation, sum of
squares for treatments, is

Apakah SST = 3741,4 “cukup besar”?


Penghitungan
We calculate the sample variances as:

and from these, calculate the within-treatments


variation (sum of squares for error) as:

We still need a couple more quantities in order to


relate SST and SSE together in a meaningful way…
Mean Squares
The mean square for treatments (MSTr) is given by:
MSTr  SSTr  k  1
The mean square for errors (MSE) is given by:
MSE  SSE  n  k 

MSTr
And the test statistic: F 
MSE

is F-distributed with k–1 and n–k degrees of freedom.


Compute
We can calculate the mean squares treatment and
mean squares error quantities as:
MSTr  SSTr  k  1  3741, 4 3  1247,12
MSE  SSE  n  k   161612,3 362  447,16

Giving us our F-statistic of: MSTr 1247,12


F   2, 79
MSE 447,16
Does F = 2.79 fall into a rejection region or not? What is
the p-value?
Interpret
Since the purpose of calculating the F-statistic is to
determine whether the value of SSTr is large enough
to reject the null hypothesis, if SSTr is large, F will be
large.

P-value = P(F > F-stat)

Dengan excel diperoleh p-value = 0,0405


Interpret

Since the p-value is 0.0405, which is small we reject


the null hypothesis (H0: μ1 = μ2 = μ3 = μ4) in favor of
the alternative hypothesis (H1: at least two
population means differ).

That is: there is enough evidence to infer that the


mean percentages of assets invested in the stock
market differ between the four age categories.
Checking the Required Conditions
The F-test of the analysis of variance requires that the
random variable be normally distributed with equal
variances. The normality requirement is easily
checked graphically by producing the histograms for
each sample. (histograms di slide berikut)
The equality of variances is examined by printing the
sample standard deviations or variances. The similarity
of sample variances allows us to assume that the
population variances are equal.
Histogram
Violation of the Required Conditions
If the data are not normally distributed we can replace
the one-way analysis of variance with its
nonparametric counterpart, which is the Kruskal-
Wallis test.

If the population variances are unequal, we can use


several methods to correct the problem. (tidak
dipelajari sekarang).
Tukey’s Multiple Comparison
Method
Adalah……
Jika dari ANOVA kita menyimpulkan bahwa sedikitnya
ada 2 rata-rata yang berbeda, maka kita perlu
mengetahui rata-rata mana yang menyebabkan
perbedaan tersebut.

Sebagai contoh, jika percobaan dilakukan untuk


menentukan apakah perbedaan lokasi toko
menghasilkan perbedaan rata-rata penjualan, seorang
manajer akan tertarik untuk mengetahui lokasi mana
yang menghasilkan penjualan yang lebih tinggi dan
lebih rendah secara signifikan.
Ilustrasi…
Fisher’s Least Significant
Difference (LSD) Method

Yang Dipelajari

Multiple
Comparisons
Bonferroni
Tukey’s Multiple
Adjustment to LSD
Method Comparison Method
Pengujian
Kriteria pada pengujian ini adalah :
Jika selisih 2 rata-rata sampel absolut > angka kritis 𝜔
maka dapat disimpulkan bahwa 2 rata-rata populasi
tersebut berbeda.

Pengujian tersebut didasarkan pada Studentized


range. Yang didefinisikan sbb :
𝑥𝑚𝑎𝑥 − 𝑥𝑚𝑖𝑛
𝑞= 𝑠
𝑛
Pengujian
Pengujian

Secara teori prosedur ini mensyaratkan ukuran sampel


yang sama untuk semua perlakuan.
Jika ukuran sampel berbeda maka :
𝑘
𝑛𝑔 =
1 1 1
+ + ⋯+
𝑛1 𝑛2 𝑛𝑘
Tabel yang digunakan adalah Critical Values of the
Studentized Range
Contoh 2
Karena persaingan global, produsen mobil Amerika Utara
semakin peduli dengan kualitas. Salah satu aspek dari kualitas
adalah biaya perbaikan kerusakan yang disebabkan oleh
kecelakaan. Sebuah produsen sedang mempertimbangkan
beberapa jenis baru dari bumper. Untuk menguji seberapa baik
bumper bereaksi terhadap tabrakan berkecepatan rendah, 10
bumper dari 4 jenis yang berbeda dipasang pada mobil
berukuran sedang, yang kemudian didorong ke dinding dengan
kecepatan 5 mil per jam. Biaya perbaikan kerusakan dalam
setiap kasus dinilai.
a. Apakah ada cukup bukti untuk menyimpulkan bahwa
bumper berbeda dalam reaksinya pada tabrakan berkecepatan
rendah pada tingkat signifikansi 5%?
b. Jika ada perbedaan, bumper mana yang berbeda?
Bumper 1 Bumper 2 Bumper 3 Bumper 4
610 404 599 272
354 663 426 405
234 521 429 197
399 518 621 363
278 499 426 297
358 374 414 538
379 562 332 181
548 505 460 318
196 375 494 412
444 438 637 499
Jawab
𝐻0 : 𝜇1 = 𝜇2 = 𝜇3 = 𝜇4
𝐻1 : 𝑠𝑒𝑑𝑖𝑘𝑖𝑡𝑛𝑦𝑎 𝑎𝑑𝑎 2 𝑟𝑎𝑡𝑎 − 𝑟𝑎𝑡𝑎 𝑦𝑎𝑛𝑔 𝑏𝑒𝑟𝑏𝑒𝑑𝑎
𝛼 = 0,05

𝑥1 = 380,0
𝑥2 = 485,9
𝑥3 = 483,8
𝑥4 = 348,2
Jawab

F tabel = 𝐹(0,05;3;36) = 2,86


Jawab

F hitung > F tabel


Tolak Ho, ada cukup bukti untuk menyimpulkan bahwa
terdapat perbedaan diantara beberapa bumper
dengan tingkat kepercayaan 95%.

Pertanyaannya sekarang adalah…. Bumper mana yang


berbeda???
Jawab
k=4
n1 = n2 = n3 = n4 =10
v = n-k = 40-4 = 36
MSE = 12.399
𝑞0.05(4,36)≈ 𝑞0.05 4,40 = 3,79
Sehingga
𝑀𝑆𝐸 12.399
𝜔 = 𝑞𝛼(𝑘,𝑣) = 3,79 = 133,45
𝑛𝑔 10
Jawab
Jawab
Terdapat 2 nilai absolut yang lebih besar dari 133,45.
Sehingga dapat disimpulkan bahwa 𝜇2 dan 𝜇4 serta 𝜇3
dan 𝜇4 berbeda. Sementara 4 pasang lainnya tidak
berbeda.

Berdasarkan sampel ini, maka terlihat bahwa bumper


4 mempunyai biaya perbaikan yang terendah. Karena
tidak ada cukup bukti untuk menyimpulkan bahwa
bumper 1 dan 4 berbeda, maka perusahaan akan
memilih bumper 1 jika bumper tersebut memiliki
kelebihan lainnya dibandingkan bumper 4.

Anda mungkin juga menyukai