Tahun : 2010
Pertemuan 12
Analisis Varians Satu Arah dan
Dua Arah
1
Outline Materi :
2
Analisis Variansi
k n 2
T
Jumlah Kuadrat Total = JKT x ij2
i 1 j1 nk
k
i
T 2
T 2
Sebagai manager
Mesin1 Mesin2 Mesin3
produksi, anda ingin
25.40 23.40 20.00
melihat mesin pengisi akan
26.31 21.80 22.20
dilihat rata-rata waktu
24.10 23.50 19.75
pengisiannya. Diperoleh
23.74 22.75 20.60
data seperti di samping.
25.10 21.60 20.40
Pada tingkat signifikansi
0.05 adakah perbedaan
rata-rata waktu ?
7
7
Penyelesaian
Hipotesa :
H 0: 1 = 2 = 3
H1: Ada rata-rata yang tidak sama
Tingkat signifikasi = 0.05
Karena df1= derajat bebas perlakuan = 2
dan df2 = derajat bebas galat = 12, maka
f(0.05;2;12) = 3.89.
Jadi daerah pelokannya:
H0 ditolak jika F > 3.89
8
8
Data
Populasi
1 2 3
25.40 23.40 20.00
26.31 21.80 22.20 Total
24.10 23.50 19.75
23.74 22.75 20.60
25.10 21.60 20.40
Total 124.65 113.05 102.95 340.65
9
9
Jumlah Kuadrat Total
k n 2
T
JKT x ij2
i 1 j1 nk
25.40 2 26.312 24.10 2 23.74 2 25.10 2
23.40 2 21.80 2 23.50 2 22.752 21.60 2
20.00 2 22.20 2 19.752 20.60 2 20.40 2
340.652
5 3
58.2172
10
10
Jumlah Kuadrat Perlakuan dan
Jumlah Kuadrat Galat
k
T 2
i
T 2
JKP i 1
n nk
124.65 113.05 102.95 340.65
2 2 2 2
5 5 3
47.1640
JKG 58.2172 47.1640 11.0532
11
11
Tabel Anova dan Kesimpulan
i 1 j1 N
k
Ti2 T2
Jumlah Kuadrat Perlakuan = JKP
i 1 n i N
Jumlah Kuadrat Galat = JKG JKT JKP
k
dengan N n i
i 1
13
13
Tabel Anova
Untuk ukuran sampel yang berbeda
14
14
Contoh 2
Hipotesa :
H 0: 1 = 2 = 3= 4
H1: Ada rata-rata yang tidak sama
Tingkat signifikasi = 0.05
Karena df1= derajat bebas perlakuan = 3
dan df2 = derajat bebas galat = 16, maka
f(0.05;3;16) = 3.24.
Jadi daerah pelokannya:
H0 ditolak jika F > 3.24
16
16
Data
Populasi
1 2 3 4
8.2 7.7 6.9 6.8
8.7 8.4 5.8 7.3
Total
9.4 8.6 7.2 6.3
9.2 8.1 6.8 6.9
8.0 7.4 7.1
6.1
Total 35.5 40.8 40.2 34.4 150.9
17
17
Jumlah Kuadrat Total
k ni 2
T
JKT x ij2
i 1 j1 N
8.2 2 8.7 2 9.4 2 9.2 2 7.7 2 8.4 2 8.6 2
8.12 8.0 2 6.9 2 5.82 7.2 2 6.82 7.4 2
2
150.9
6. 1 6. 8 7 .3 6 .3 6 .9 7 .1
2 2 2 2 2 2
20
19.350
18
18
Jumlah Kuadrat Perlakuan dan
Jumlah Kuadrat Galat
k
Ti2 T2
JKP
i 1 n i N
35.52 40.82 40.2 2 34.4 2 150.9 2
4 5 6 5 20
15.462
19
19
Tabel Anova dan Kesimpulan
23
The ANOVA Procedure
SSTR MSTR
Treatments SSTR k-1 MSTR
k - 1 MSE
SSBL
Blocks SSBL b-1 MSBL
b-1
26
Randomized Block Design
27
Randomized Block Design
Treatment
Means 29.8 28.8 28.4
28
Randomized Block Design
Mean Square Due to Treatments
The overall sample mean is 29. Thus,
SSTR = 5[(29.8 - 29)2 + (28.8 - 29)2 + (28.4 - 29)2] = 5.2
MSTR = 5.2/(3 - 1) = 2.6
Mean Square Due to Blocks
SSBL = 3[(30.333 - 29)2 + . . . + (25.667 - 29)2] = 51.33
MSBL = 51.33/(5 - 1) = 12.8
• Mean Square Due to Error
SSE = 62 - 5.2 - 51.33 = 5.47
MSE = 5.47/[(3 - 1)(5 - 1)] = .68
29
Randomized Block Design
ANOVA Table
Total 62.00 14
30
Randomized Block Design
• Rejection Rule
p-Value Approach: Reject H0 if p-value < .05
Critical Value Approach: Reject H0 if F > 4.46
For = .05, F.05 = 4.46
(2 d.f. numerator and 8 d.f. denominator)
31
Randomized Block Design
Test Statistic
F = MSTR/MSE = 2.6/.68 = 3.82
• Conclusion
The p-value is greater than .05 (where F = 4.46)
and less than .10 (where F = 3.11). (Excel provides
a p-value of .07). Therefore, we cannot reject H0.
There is insufficient evidence to conclude that
the miles per gallon ratings differ for the three
gasoline blends.
32
• Selamat Belajar Semoga Sukses.
33
Materi Tambahan :
34
Analysis of Variance
35
General Experimental Setting
37
Randomized Design Example
H 0 : 1 2 c
H1 : Not all i are the same
The Null
Hypothesis is
True
1 2 3
42
One-Way ANOVA
(Treatment Effect Present)
H 0 : 1 2 c
H1 : Not all i are the same The Null
Hypothesis is
NOT True
1 2 3 1 2 3
43
One-Way ANOVA
(Partition of Total Variation)
SST ( X ij X ) 2
j 1 i 1
X
j 1 i 1
ij
X X
2 2 2
SST X 11 X 21 X nc c X
Response, X
c
SSA n j ( X j X ) 2
MSA
SSA
j 1 c 1
n X
2 2 2
SSA n1 X 1 X 2 2 X nc X c X
Response, X
X3
X2
X
X1
c nj
SSW
SSW ( X ij X j ) 2
MSW
j 1 i 1 nc
X j : The sample mean of group j
X ij : The i -th observation in group j
SSW X 11 X 1 X 21 X 1
2 2 2
X nc c X c
Response, X
X3
X2
X
X1
j 51
One-Way ANOVA
F Test Statistic
• Test Statistic
– F MSA
MSW
• MSA is mean squares among
• MSW is mean squares within
• Degrees of Freedom
– df1 c 1
– df 2 n c
52
One-Way ANOVA
Summary Table
Degrees
Source Mean
of Sum of F
of Squares
Freedo Squares Statistic
Variation (Variance)
m
Among MSA = MSA/MS
c–1 SSA
(Factor) SSA/(c – 1 ) W
Within MSW =
n–c SSW
(Error) SSW/(n – c )
SST =
Total n–1 SSA +
SSW
53
Features of One-Way ANOVA
F Statistic
• The F Statistic is the Ratio of the Among
Estimate of Variance and the Within
Estimate of Variance
– The ratio must always be positive
– df1 = c -1 will typically be small
– df2 = n - c will typically be large
• The Ratio Should Be Close to 1 if the Null
is True
54
Features of One-Way ANOVA
F Statistic
(continued)
55
One-Way ANOVA F Test
Example
57
One-Way ANOVA Example
Computations
Source Degree
Mean
of s of Sum of F
Squares
Variatio Freedo Squares Statistic
(Variance)
n m
MSA/MS
Among W
3-1=2 47.1640 23.5820
(Factor)
=25.60
Within 15-
11.0532 .9211
(Error) 3=12
15-
Total 58.2172
1=14
59
One-Way ANOVA Example
Solution
Test Statistic:
H0: 1 = 2 = 3
H1: Not All Equal MSA 23.5820
= .05
F 25.6
MSW .9211
df1= 2 df2 = 12
Decision:
Critical Value(s): Reject at = 0.05.
= 0.05 Conclusion:
There is evidence that at
least one i differs from
0 3.89 F the rest.
60
The Tukey-Kramer Procedure
63
Levene’s Test for
Homogeneity of Variance:
Procedure
64
Levene’s Test for
Homogeneity of Variances:
Example
As production manager, Machine1 Machine2
you want to see if 3 filling Machine3
machines have different 25.40 23.40 20.00
variance in filling times. 26.31 21.80 22.20
You assign 15 similarly 24.10 23.50 19.75
trained & experienced 23.74 22.75 20.60
workers, 5 per machine, to 25.10 21.60 20.40
the machines. At the .05
significance level, is there
a difference in the variance
in filling times? 65
Levene’s Test:
Absolute Difference from the
Median
66
Summary Table
SUMMARY
Groups Count Sum Average Variance
Machine1 5 3.87 0.774 0.35208
Machine2 5 3.5 0.7 0.19
Machine3 5 3.05 0.61 0.5005
ANOVA
Source of Variation SS df MS F P-value F crit
Between Groups 0.067453 2 0.033727 0.097048 0.908218 3.88529
Within Groups 4.17032 12 0.347527
Total 4.237773 14
67
Levene’s Test Example:
Solution
H0: 1
2
2
2 2
3 Test Statistic:
H1: Not All Equal
MSA 0.0337
= .05 F 0.0970
df1= 2 df2 = 12 MSW 0.3475
Decision:
Critical Value(s):
Do not reject at = 0.05.
Conclusion:
= 0.05
There is no evidence that
at least one j differs
2