Business Statistics: A Decision

Download Report

Transcript Business Statistics: A Decision

PERENCANAAN EKSPERIMEN
BAB 1
ANALISIS VARIANSI / KERAGAMAN
Analysis of Variance ( ANOVA )
Chap 11-1
Gambaran Umum
Analysis of Variance (ANOVA)
ANOVA
1 Arah
Desain
Blok Lengkap
Acak
Desain
2 Faktor
Dgn. Replikasi
Uji-F
Uji-F
Uji
TukeyKramer
Uji Perbedaan
Signifikan
Fischer Terkecil
Chap 11-2
Kegunaan ANOVA

Mengendalikan 1 atau lebih variabel
independen



Mengamati efek pada variabel dependen


Disebut dgn faktor (atau variabel treatment)
Tiap faktor mengandung 2 atau lebih level (kategori /
klasifikasi)
Merespon level pada variabel independen
Perencanaan Eksperimen: perencanaan
dengan menggunakan uji hipotesis
Chap 11-3
ANOVA 1 Arah

Evaluasi perbedaan diantara 3 atau lebih mean
populasi
Contoh: Tingkat kecelakaan pada 3 kota
Usia pemakaian 5 merk Handphone

Asumsi
 Populasi berdistribusi normal
 Populasi mempunyai variansi yang sama
 Sampelnya random dan independen
Chap 11-4
Desain Acak Lengkap


Unit percobaan (subjek) dilakukan acak pada
perlakuan (treatments)
Hanya ada 1 faktor / var. independen


Analisis dengan :


Dengan 2 atau lebih level treatment
ANOVA 1 arah
Disebut juga Desain Seimbang jika seluruh
level faktor mempunyai ukuran sampel yang
sama
Chap 11-5
Hipotesis ANOVA 1 Arah

H0 : μ1  μ2  μ3    μk

Seluruh mean populasi adalah sama

Tak ada efek treatment (tak ada keragaman mean
dalam grup)
H A : Tidak seluruhmeanpopulasiadalahsama


Minimal ada 1 mean populasi yang berbeda

Terdapat sebuah efek treatment

Tidak seluruh mean populasi berbeda (beberapa
pasang mungkin sama)
Chap 11-6
ANOVA 1 Faktor
H0 : μ1  μ2  μ3    μk
HA : Tidak seluruhμi sama
Semua mean bernilai sama
Hipotesis nol adalah benar
(Tak ada efek treatment)
μ1  μ2  μ3
Chap 11-7
ANOVA 1 Faktor
H0 : μ1  μ2  μ3    μk
(sambungan)
HA : Tidak semuaμ i sama
Minimal ada 1 mean yg berbeda
Hipotesis nol tidak benar
(Terdapat efek treatment)
or
μ1  μ2  μ3
μ1  μ2  μ3
Chap 11-8
Partisi Variasi

Variasi total dapt dipecah menjadi 2 bagian:
SST = SSB + SSW
SST = Sum of Squares Total (Jumlah Kuadrat Total)
SSB = Sum of Squares Between (Jumlah Kuadrat Antara)
SSW = Sum of Squares Within (Jumlah Kuadrat Dalam)
Chap 11-9
Partisi Variasi
(sambungan)
SST = SSB + SSW
Variasi Total = pernyebaran agregat nilai data individu
melalui beberapa level faktor (SST)
Between-Sample Variation = penyebaran diantara mean
sampel faktor (SSB)
Within-Sample Variation = penyebaran yang terdapat
diantara nilai data dalam sebuah level faktor tertentu
(SSW)
Chap 11-10
Partisi Variasi Total
Variasi Total (SST)
=




Variasi Faktor
(SSB)
Mengacu pada:
Sum of Squares Between
Sum of Squares Among
Sum of Squares Explained
Among Groups Variation
+
Variasi Random Sampling
(SSW)




Mengacu pada:
Sum of Squares Within
Sum of Squares Error
Sum of Squares Unexplained
Within Groups Variation
Chap 11-11
Jumlah Kuadrat Total
(Total Sum of Squares)
SST = SSB + SSW
k
ni
SST   ( xij  x )
Dimana:
2
i1 j1
SST = Total sum of squares/Jumlah Kuadrat Total
k = jumlah populasi (levels or treatments)
ni = ukuran sampel dari populasi i
xij = pengukuran ke-j dari populasi ke-i
x = mean keseluruhan (dari seluruh nilai data)
Chap 11-12
Variasi Total
(sambungan)
SST  (x11  x)  (x12  x)  ...  (xknk  x)
2
2
2
Response, X
X
Group 1
Group 2
Group 3
Chap 11-13
Jumlah Kuadrat Antara
(Sum of Squares Between)
SST = SSB + SSW
k
SSB   ni ( x i  x )
Where:
2
i1
SSB = Sum of squares between
k = jumlah populasi
ni = ukuran sampel dari populasi i
xi = mean sampel dari populasi i
x = mean keseluruhan (dari seluruh nilai data)
Chap 11-14
Variasi Diantara Group/Kelompok
k
SSB   ni ( x i  x )
2
i1
Perbedaan variasi antar
kelompok
SSB
MSB 
k 1
Mean Square Between =
SSB/degrees of freedom
i
j
•degrees of freedom :
derajat kebebasan
Chap 11-15
Variasi Diantara Group/Kelompok
(sambungan)
SSB  n1( x1  x)  n2 ( x 2  x)  ...  nk ( xk  x)
2
2
2
Response, X
X3
X1
Group 1
Group 2
X2
X
Group 3
Chap 11-16
Jumlah Kuadrat Dalam
(Sum of Squares Within)
SST = SSB + SSW
k
SSW  
i1
nj

j1
( xij  xi )
2
Where:
SSW = Sum of squares within
k = jumlah populasi
ni = ukuran sampel dari populasi i
xi = mean sampel dari populasi i
xij = pengukuran ke-j dari populasi ke-i
Chap 11-17
Variasi Dalam Kelompok
(Within-Group Variation)
k
SSW  
i1
nj

j1
( xij  xi )2
Summing the variation
within each group and then
adding over all groups
SSW
MSW 
Nk
Mean Square Within =
SSW/degrees of freedom
i
Chap 11-18
Variasi Dalam Kelompok
(Within-Group Variation)
(continued)
SSW  (x11  x1 )  (x12  x2 )  ...  (xknk  xk )
2
2
2
Response, X
X3
X1
Group 1
Group 2
X2
Group 3
Chap 11-19
Tabel ANOVA 1 Arah
(One-Way ANOVA)
Source of
Variation
SS
df
Between
Samples
SSB
k-1
Within
Samples
SSW
N-k
SST =
SSB+SSW
N-1
Total
MS
F ratio
SSB
MSB
MSB =
k - 1 F = MSW
SSW
MSW =
N-k
k = jumlah populasi
N = jumlah ukuran sampel dari seluruh populasi
df = degrees of freedom/derajat kebebasan
Chap 11-20
Uji F ANOVA 1 Faktor
H0: μ1= μ2 = … = μ k
HA: Minimal 2 mean populasi berbeda

Stastistik Uji :
MSB
F
MSW
MSB : jumlah kuadrat diantara variansi
MSW : jumlah kuadrat dalam variansi

Degrees of freedom/derajat kebebasan :


df1 = k – 1
df2 = N – k
(k = jumlah populasi)
(N = jumlah ukuran sampel seluruh populasi)
Chap 11-21
Interpretasi Uji F

Statistik F adalah rasio antara taksiran
variansi dengan taksiran dalam variansi



Rasio harus selalu positif
df1 = k -1 berukuran kecil
df2 = N - k berukuran besar
Rasio akan mendekati 1 jika :
H0: μ1= μ2 = … = μk Benar
Rasio akan lebih besar dari 1 jika :
H0: μ1= μ2 = … = μk Salah
Chap 11-22
Contoh Kasus
You want to see if three
different golf clubs yield
different distances. You
randomly select five
measurements from trials on
an automated driving
machine for each club. At the
.05 significance level, is there
a difference in mean
distance?
Club 1
254
263
241
237
251
Club 2
234
218
235
227
216
Club 3
200
222
197
206
204
Chap 11-23
One-Factor ANOVA Example:
Scatter Diagram
Club 1
254
263
241
237
251
Club 2
234
218
235
227
216
Club 3
200
222
197
206
204
Distance
270
260
250
240
•
••
•
•
230
220
X1
••
•
••
X2
210
x1  249.2 x 2  226.0 x 3  205.8
200
x  227.0
190
•
••
••
1
2
Club
3
X
X3
Chap 11-24
One-Factor ANOVA Example
Computations
Club 1
254
263
241
237
251
Club 2
234
218
235
227
216
Club 3
200
222
197
206
204
x1 = 249.2
n1 = 5
x2 = 226.0
n2 = 5
x3 = 205.8
n3 = 5
x = 227.0
N = 15
k=3
SSB = 5 [ (249.2 – 227)2 + (226 – 227)2 + (205.8 – 227)2 ] = 4716.4
SSW = (254 – 249.2)2 + (263 – 249.2)2 +…+ (204 – 205.8)2 = 1119.6
MSB = 4716.4 / (3-1) = 2358.2
MSW = 1119.6 / (15-3) = 93.3
2358.2
F
 25.275
93.3
Chap 11-25
One-Factor ANOVA Example
Solution
H0: μ1 = μ2 = μ3
HA: μi not all equal
 = .05
df1= 2
df2 = 12
Test Statistic:
MSB 2358.2
F

 25.275
MSW
93.3
Critical
Value:
Decision:
Reject H0 at  = 0.05
F = 3.885
Conclusion:
 = .05
0
Do not
reject H0
Reject H0
F.05 = 3.885
F = 25.275
There is evidence that at
least one μi differs from
the rest
Chap 11-26
ANOVA -- Single Factor:
Excel Output
EXCEL: tools | data analysis | ANOVA: single factor
SUMMARY
Groups
Count
Sum
Average
Variance
Club 1
5
1246
249.2
108.2
Club 2
5
1130
226
77.5
Club 3
5
1029
205.8
94.2
ANOVA
Source of
Variation
SS
df
MS
Between
Groups
4716.4
2
2358.2
Within
Groups
1119.6
12
93.3
Total
5836.0
14
F
25.275
P-value
4.99E-05
F crit
3.885
Chap 11-27
The Tukey-Kramer Procedure

Tells which population means are significantly
different



e.g.: μ1 = μ2  μ3
Done after rejection of equal means in ANOVA
Allows pair-wise comparisons

Compare absolute mean differences with critical
range
μ1= μ2
μ3
x
Chap 11-28
Tukey-Kramer Critical Range
Critical Range  q
MSW
2
1 1
  
n n 
j 
 i
where:
q = Value from standardized range table
with k and N - k degrees of freedom for
the desired level of 
MSW = Mean Square Within
ni and nj = Sample sizes from populations (levels) i and j
Chap 11-29
The Tukey-Kramer Procedure:
Example
Club 1
254
263
241
237
251
Club 2
234
218
235
227
216
Club 3
200
222
197
206
204
1. Compute absolute mean
differences:
x1  x 2  249.2  226.0  23.2
x1  x 3  249.2  205.8  43.4
x 2  x 3  226.0  205.8  20.2
2. Find the q value from the table in appendix J with
k and N - k degrees of freedom for
the desired level of 
qα  3.77
Chap 11-30
The Tukey-Kramer Procedure:
Example
3. Compute Critical Range:
Critical Range  qα
MSW
2
1 1
    3.77 93.3  1  1   16.285
n n 
2 5 5
j 
 i
4. Compare:
5. All of the absolute mean differences
are greater than critical range.
Therefore there is a significant
difference between each pair of
means at 5% level of significance.
x1  x 2  23.2
x1  x 3  43.4
x 2  x 3  20.2
Chap 11-31
Tukey-Kramer in PHStat
Chap 11-32
BAB 2
Randomized Complete Block ANOVA

Like One-Way ANOVA, we test for equal population
means (for different factor levels, for example)...

...but we want to control for possible variation from a
second factor (with two or more levels)

Used when more than one factor may influence the
value of the dependent variable, but only one is of key
interest

Levels of the secondary factor are called blocks
Chap 11-33
Partitioning the Variation

Total variation can now be split into three parts:
SST = SSB + SSBL + SSW
SST = Total sum of squares
SSB = Sum of squares between factor levels
SSBL = Sum of squares between blocks
SSW = Sum of squares within levels
Chap 11-34
Sum of Squares for Blocking
SST = SSB + SSBL + SSW
b
SSBL   k( x j  x)2
j1
Where:
k = number of levels for this factor
b = number of blocks
xj = sample mean from the jth block
x = grand mean (mean of all data values)
Chap 11-35
Partitioning the Variation

Total variation can now be split into three parts:
SST = SSB + SSBL + SSW
SST and SSB are
computed as they were
in One-Way ANOVA
SSW = SST – (SSB + SSBL)
Chap 11-36
Mean Squares
SSBL
MSBL  Mean square blocking 
b 1
MSB  Mean square betw een
SSB
k 1
SSW
MSW  Mean square w ithin 
(k  1)(b  1)
Chap 11-37
Randomized Block ANOVA Table
Source of
Variation
SS
df
MS
F ratio
Between
Blocks
SSBL
b-1
MSBL
MSBL
MSW
Between
Samples
SSB
k-1
MSB
MSB
MSW
Within
Samples
SSW
(k–1)(b-1)
MSW
SST
N-1
Total
k = number of populations
b = number of blocks
N = sum of the sample sizes from all populations
df = degrees of freedom
Chap 11-38
Blocking Test
H0 : μb1  μb2  μb3  ...
HA : Not all block means are equal
MSBL
F=
MSW

Blocking test:
df1 = b - 1
df2 = (k – 1)(b – 1)
Reject H0 if F > F
Chap 11-39
Main Factor Test
H0 : μ1  μ2  μ3  ...  μk
HA : Not all population means are equal
F=
MSB
MSW

Main Factor test:
df1 = k - 1
df2 = (k – 1)(b – 1)
Reject H0 if F > F
Chap 11-40
Fisher’s
Least Significant Difference Test

To test which population means are significantly
different



e.g.: μ1 = μ2 ≠ μ3
Done after rejection of equal means in randomized
block ANOVA design
Allows pair-wise comparisons

Compare absolute mean differences with critical
range
1= 2
3
x
Chap 11-41
Fisher’s Least Significant
Difference (LSD) Test
LSD  t /2
2
MSW
b
where:
t/2 = Upper-tailed value from Student’s t-distribution
for /2 and (k -1)(n - 1) degrees of freedom
MSW = Mean square within from ANOVA table
b = number of blocks
k = number of levels of the main factor
Chap 11-42
Fisher’s Least Significant
Difference (LSD) Test (continued)
LSD  t /2
2
MSW
b
Compare:
Is x i  x j  LSD ?
If the absolute mean difference
is greater than LSD then there
is a significant difference
between that pair of means at
the chosen level of significance.
x1  x 2
x1  x 3
x2  x3
etc...
Chap 11-43
Two-Way ANOVA

Examines the effect of


Two or more factors of interest on the
dependent variable
 e.g.: Percent carbonation and line speed on
soft drink bottling process
Interaction between the different levels of these
two factors
 e.g.: Does the effect of one particular
percentage of carbonation depend on which
level the line speed is set?
Chap 11-44
Two-Way ANOVA
(continued)

Assumptions

Populations are normally distributed

Populations have equal variances

Independent random samples are
drawn
Chap 11-45
Two-Way ANOVA
Sources of Variation
Two Factors of interest: A and B
a = number of levels of factor A
b = number of levels of factor B
N = total number of observations in all cells
Chap 11-46
Two-Way ANOVA
Sources of Variation
SST = SSA + SSB + SSAB + SSE
SSA
Variation due to factor A
SST
Total Variation
SSB
Variation due to factor B
SSAB
N-1
Variation due to interaction
between A and B
SSE
(continued)
Degrees of
Freedom:
a–1
b–1
(a – 1)(b – 1)
N – ab
Inherent variation (Error)
Chap 11-47
Two Factor ANOVA Equations
Total Sum of Squares:
a
n
b
SST   ( xijk  x )
2
i1 j1 k 1
Sum of Squares Factor A:
a
2

SS A  bn  ( xi  x )
i1
Sum of Squares Factor B:
b
2

SSB  an  ( x j  x)
j1
Chap 11-48
Two Factor ANOVA Equations
(continued)
Sum of Squares
Interaction Between
A and B:
SS
Sum of Squares Error:
a
AB
b
 n ( xij  xi  x j  x )2
i1 j1
a
b
n
SSE   ( xijk  xij )2
i1 j1 k 1
Chap 11-49
Two Factor ANOVA Equations
a
where:
b
xi 
x
j1 k 1
i1 j1 k 1
abn
ijk
 Grand Mean
ijk
bn
 Mean of each level of factor A
a
xj 
n
n
 x
n
 x
b
(continued)
n
 x
i1 k 1
an
ijk
 Mean of each level of factor B
xijk
xij  
 Mean of each cell
k 1 n
a = number of levels of factor A
b = number of levels of factor B
n’ = number of replications in each cell
Chap 11-50
Mean Square Calculations
SS A
MSA  Mean square factor A 
a 1
SSB
MSB  Mean square factor B 
b 1
MS AB
SS AB
 Mean square interaction 
(a  1)(b  1)
SSE
MSE  Mean square error 
N  ab
Chap 11-51
Two-Way ANOVA:
The F Test Statistic
H0: μA1 = μA2 = μA3 = • • •
HA: Not all μAi are equal
H0: μB1 = μB2 = μB3 = • • •
HA: Not all μBi are equal
H0: factors A and B do not interact
to affect the mean response
HA: factors A and B do interact
F Test for Factor A Main Effect
MS A
F
MSE
Reject H0
if F > F
F Test for Factor B Main Effect
MSB
F
MSE
Reject H0
if F > F
F Test for Interaction Effect
MS AB
F
MSE
Reject H0
if F > F
Chap 11-52
Two-Way ANOVA
Summary Table
Source of
Variation
Sum of
Squares
Degrees of
Freedom
Mean
Squares
F
Statistic
Factor A
SSA
a–1
MSA
MSA
MSE
Factor B
SSB
b–1
AB
(Interaction)
SSAB
(a – 1)(b – 1)
Error
SSE
N – ab
Total
SST
N–1
= SSA /(a – 1)
MSB
= SSB /(b – 1)
MSAB
= SSAB / [(a – 1)(b – 1)]
MSB
MSE
MSAB
MSE
MSE =
SSE/(N – ab)
Chap 11-53
Features of Two-Way ANOVA
F Test

Degrees of freedom always add up

N-1 = (N-ab) + (a-1) + (b-1) + (a-1)(b-1)

Total = error + factor A + factor B + interaction

The denominator of the F Test is always the
same but the numerator is different

The sums of squares always add up

SST = SSE + SSA + SSB + SSAB

Total = error + factor A + factor B + interaction
Chap 11-54
Examples:
Interaction vs. No Interaction
No interaction:
Interaction is
present:
Factor B Level 3
Factor B Level 2
1
Factor A Levels
2
Mean Response
Factor B Level 1
Mean Response


Factor B Level 1
Factor B Level 2
Factor B Level 3
1
Factor A Levels
2
Chap 11-55
Chapter Summary

Described one-way analysis of variance





Described randomized complete block designs



The logic of ANOVA
ANOVA assumptions
F test for difference in k means
The Tukey-Kramer procedure for multiple comparisons
F test
Fisher’s least significant difference test for multiple
comparisons
Described two-way analysis of variance

Examined effects of multiple factors and interaction
Chap 11-56