Analysis of Variance
Analysis of Variance
( ANOVA )
Analysis Of Variance
Learning Objectives
Basic Concept of ANOVA
– Hypothesis Testing
– Assumptions
– Models
ANOVA Models
One-Way ANOVA:
– Fixed Effects
– Random Effects
Example:
(a) 3 lines set up to plate the same product. We want
to compare if the mean plating thickness of
products from the 3 lines are the same or not.
Total
2
Component
2
1 2
Component 2 2
Component k
4
6
2
x6 x3 x5 x1 x2 x7 x4 x
x
Seagate Confidential 6 Supplier Six Sigma Modular Training
Analysis Of Variance
x6 x3 x5 x1 x2 x7 x4 x
x
In mechanics, the effect of these rotating masses
is a total pulling force (moment of inertia or
second moment) on the central axis.
Seagate Confidential 7 Supplier Six Sigma Modular Training
Analysis Of Variance
90
80 Sample 2
70 Y31
60 Y11
50
40
Y21
30 Sample 1
20 Sample 3
SSTotal
2
2
y 11 y y 12 y .. y 21 y .. y ij y
2
2
a n
y
2
SSTotal ij -y Total Variation
i 1 j 1
SSBetween n1 y 1
2
2
y n2 y 2 y .. ..n i y i y 2
a Variation
y 2
SSFactors ni 1
y between
i 1 subgroups
90
80 Sample 2
e Y3
Y1
31
70
60 e 12 e 11
50
40 e 21
30 Sample 1
20 Y2 Sample 3
SS Error y 11
y1 .. y
2
21
y2 ..y ij y i
2 2
a n Variation
SSError y
i 1 j 1
ij -y 2
within
subgroups
a n a a n
i=1 j=1
( yij – y )2 = n
i
i=1
( y i – y ) 2
+ i=1 j=1 ij i
( y - y ) 2
Factor SSFactor
Error SSError
Total SSTotal
a n
SS Total = ( y ij – y ) 2
i=1 j=1
Seagate Confidential 16 Supplier Six Sigma Modular Training
Analysis Of Variance
x6 x3 x5 x1 x2 x7 x4 x
x
90
80 Sample 2 n =7
2
70
Y1 Y31 Y3
60 Y11
50
40 Y21
30 Sample 1
n3= 7
20 Y2 Sample 3
n1=6
The total degrees of freedom for the example above will be 19.
(N-1) deviations freely to move about the grand average Y
Seagate Confidential 19 Supplier Six Sigma Modular Training
Analysis Of Variance
90
Sample 2 n =7 Y31
80 2
70
Y1 Y3
60 Y11
50
40 Y21
30 Sample 1
n3= 7
20 Y2 Sample 3
n1=6
90
80 Sample 2 n =7
2
70
Y1 Y3
60 Y11 Y31
50
40 Y21
30 Sample 1
n3= 7
20 Y2 Sample 3
n1=6
i1 i
n
x x 2
s2
n 1
Seagate Confidential 24 Supplier Six Sigma Modular Training
Analysis Of Variance
MS Factor
S2 Factor
~
MS Error S2 Error
Seagate Confidential 25 Supplier Six Sigma Modular Training
Analysis Of Variance
H0 : 1 = 2 = = k
all group means are equal
Ha : i j for some i j
at least one pair of group means is not equal
2
Variation between groups S between
Fcalculated 2
Variation within group S within
Fcrit
Compare Fcal MS Factor to Fcrit = F ( ,1,2)
MS Error
If F cal > F crit, then reject Ho
Seagate Confidential 26 Supplier Six Sigma Modular Training
Analysis Of Variance
ANOVA — Assumptions
The observations are mutually independent.
– Stat Nonparametrics Runs Test
Step 6: Interpret the P-Value (or the F-statistic) for the factor effect
P-Value < 0.05, then REJECT Ho
Otherwise, operate as if the null hypothesis is true
Step 7: Translate the statistical conclusion into process terms
One Way
ANOVA-Example 1
Using the previous Example -
ANOVA.mtw (columns C1-C3)
Step 1
The practical problem: Do the machines contribute to an overall increase
in roughness variation because their means are different ?
Normal?
If points are
ordered in time
sequence,
shows possible
time effects
ANOVA — Models
Fixed Effects (ANOVA Fixed) Model
factor levels in the experiment are specifically chosen
the conclusion is relevant only for the chosen levels and may not be
extended to similar treatments that were not considered
ANOVA — Models
A k–Way ANOVA model involves the study of k
factors.
k–Way ANOVA Fixed Model : k factors;all
factors of fixed effect
k–Way ANOVA Random Model: k factors;all
factors of random effect
k–Way ANOVA Mixed Model : k factors;some
factors of fixed effect others of random effect
ANOVA Model
i = 1, 2, …, 5
Yij = μ + τj + εij j = 1, 2, 3, 4
One-Way ANOVA-Fixed
Model
Source SS DF MS F-Statistic
One-Way ANOVA-Random
Model
Yij . i ij
where Yij is the value of the response variable in the
jth trial for the ith factor level or treatment
. is the overall mean for all observations
i=i–.is the effect of the ith factor level s.t.i ~ N0, 2
ij is the random error component
s.t. ij ~ N 0, 2
The hypothesis may now be rephrased:
H0 : ² = 0
Ha : ² > 0
One-Way ANOVA-Random
Model
Source SS DF MS E(MS) F-Statistic
MSA
Factor A SSA a–1 MSA 2 n 2A
MSE
One-Way ANOVA-Random
Example 2
A textile manufacturing company is interested in
loom-to-loom variability in tensile strength. The
engineer selects four looms at random and
determines the strength of four fabric samples
chosen at random from each loom.
One-Way ANOVA-Random
Model — Example 2
Stat ANOVA General Linear Model
One-Way ANOVA-Random
Model — Example 2
Stat Regression Residual Plots
One-Way ANOVA-Random
Model — Example 2
Residual Plots for One-Way ANOVA-II Model
Normal Plot of Residuals I Chart of Residuals
5
2 UCL=4.167
4
3
1 2
Residual
Residual
1
0 0 Mean=0
-1
-1 -2
-3
-4 LCL=-4.167
-2 -5
-2 -1 0 1 2 0 5 10 15
Normal Score Observation Number
3 1
Frequency
Residual
2 0
1 -1
0 -2
-2.0 -1.5 -1.0 -0.5 0.0 0.5 1.0 1.5 2.0 91 92 93 94 95 96 97 98
Residual Fit
One-Way ANOVA-Random
Model — Example 2
Session Window
One-Way ANOVA-Random
Model — Example 2
Stat Basic Statistics Display Descriptive
Statistics
One-Way ANOVA-Random
Model — Example 2
Dotplots of Tensile by Loom
99
98
97
96
Tensile
95
94
93
92
91
90
Loom
1
0
i i for j = 1,, 0
j jb
j ij 0 for i = 1, , a
and
iij 0
ij k ~ N0, 2
Seagate Confidential 53 Supplier Six Sigma Modular Training
Analysis Of Variance
b)H0 : 1 = 2 = = b = 0
Ha : not all j equal 0
c) H0 : all ij = 0
Ha : not all ij equal 0
MSA a–1 2
nb
i
2
nb
2
i
0
MSA
a 1 a 1 MSE
MSB b–1 2
na
2
j
na
2j 0
MSB
b 1 b 1 MSE
MSAB (a–1)(b–1) n
2 2
ij
n
2
ij
0
MSAB
a 1b 1 a 1b 1 MSE
MSE (n–1)ab 2
Two-Way ANOVA-Fixed
Model — Example 3
A supplier of Italian bread to supermarkets
studied the effects of height of the shelf display
(factor A:bottom, middle, top) and width of the
shelf display (factor B: regular, wide) on the
sales of their bread. Twelve supermarkets were
assigned at random to obtain two replicates per
treatment. The results may be found in Analysis
Of Variance.MTW.
Seagate Confidential 57 Supplier Six Sigma Modular Training
Analysis Of Variance
Two-Way ANOVA-Fixed
Model — Example 3
Stat ANOVA Two-way
Two-Way ANOVA-Fixed
Model — Example 3
Stat Regression Residual Plots
Two-Way ANOVA-Fixed
Model — Example 3
Residual Plots for Two-Way ANOVA-I Model
Normal Plot of Residuals I Chart of Residuals
3 UCL=5.319
5
2
8
1
Residual
Residual
0 0 Mean=0
-1
6
-2
-5 LCL=-5.319
-3
-1 0 1 0 5 10
Normal Score Observation Number
2 1
Residual
0
1 -1
-2
0 -3
-3 -2 -1 0 1 2 3 40 50 60 70
Residual Fit
Two-Way ANOVA-Fixed
Model — Example 3
Session Window
Two-way ANOVA: Sales versus Height, Width
Two-Way ANOVA-Fixed
Model — Example 3
Individual 95% CI
Height Mean ---+---------+---------+---------+--------
Bottom 44.0 (----*----)
Middle 67.0 (----*----)
Top 42.0 (---*----)
---+---------+---------+---------+--------
40.0 48.0 56.0 64.0
Individual 95% CI
Width Mean ---+---------+---------+---------+--------
Regular 50.0 (------------*------------)
Wide 52.0 (------------*------------)
---+---------+---------+---------+--------
47.5 50.0 52.5 55.0
Two-Way ANOVA-Fixed
Model — Example 3
Stat ANOVA Main Effects Plot
Two-Way ANOVA-Fixed
Model — Example 3
Main Effects Plot for Sales of Italian Bread
Height Width
71
63
Sales
55
47
39
Two-Way ANOVA-Fixed
Model — Example 3
Stat ANOVA Interactions Plot
Two-Way ANOVA-Fixed
Model — Example 3
Interactions Plot for Sales of Italian Bread
Height
70 Bottom
Middle
Top
60
Mean
50
40
Regular Wide
Width
MSA
MSA a–1 2 nb 2 n
2
nb 2 0
MSAB
MSB
MSB b–1 2 na2 n
2
na2 0
MSAB
MSAB
MSAB (a–1)(b–1) n
2 2
n
2
0
MSE
MSE (n–1)ab 2
Two-Way ANOVA-Random
Model — Example 4
An automobile manufacturer wants to study the
effects of drivers (factor A) and cars (factor B) on
gasoline consumption. Four drivers were selected
at random; also five cars of the same model were
randomly selected from the assembly line.Each
driver drove the car twice over a certain test
course. The results may be found in Analysis Of
Variance.MTW.
Two-Way ANOVA-Random
Model — Example 4
Stat ANOVA General Linear Model
Two-Way ANOVA-Random
Model — Example 4
Stat Regression Residual Plots
Two-Way ANOVA-Random
Model — Example 4
Residual Plots for Two-Way ANOVA-II Model
Normal Plot of Residuals I Chart of Residuals
4 UCL=6.528
3 5
2
1
Residual
Residual
0
0 Mean=0
-1
-2
-3
-4 -5
LCL=-6.528
-5
-2 -1 0 1 2 0 5 10
Normal Score Observation Number
1
Residual
0
1
-1
-2
-3
-4
0 -5
-5 -4 -3 -2 -1 0 1 2 3 4 40 50 60 70
Residual Fit
Two-Way ANOVA-Random
Model — Example 4
Session Window
General Linear Model: Gasoline versus Driver, Car
Two-Way ANOVA-Random
Model — Example 4
Main Effects Plot for Gasoline Consumption
Driver Car
35.0
32.5
Gasoline
30.0
27.5
25.0
Two-Way ANOVA-Random
Model — Example 4
Interactions Plot for Gasoline Consumption
Driver
1
2
35 3
4
Mean
30
25
1 2 3 4 5
Car
Two-Way ANOVA-Mixed
Model
(Unrestricted)
If factor A is a fixed effect and factor B is a random effect.
Source SS DF MS E(MS) F-Statistic
2
MSA
Factor A SSA a–1 MSA 2 i
n
2
a 1 MSAB
MSB
Factor B SSB b–1 MSB 2 an2 n
2
MSAB
AB Interaction SSAB (a–1)(b–1) MSAB MSAB
2 n
2
MSE
Error SSE ab(n–1) MSE 2
Two-Way ANOVA-Mixed
Model
(Restricted)
If factor A is a fixed effect and factor B is a random effect.
Source SS DF MS E(MS) F-Statistic
MSE
Error SSE ab(n–1) MSE 2
Two-Way ANOVA-Mixed
Model — Example 5
A manufacturer of imitation pearls entailed studying the
effect of the number of coats of a special lacquer (factor
A) applied to a opalescent plastic bead on the market
value of the pearl. Four batches of 12 beads (factor B)
were used in the study. The three levels of factor A (6, 8
and 10 coats) were fixed in advance, while the four
batches were randomly selected from the bead
production process.
The results may be found in Analysis Of Variance.MTW.
Two-Way ANOVA-Mixed
Model — Example 5
Stat ANOVA General Linear Model
Two-Way ANOVA-Mixed
Model — Example 5
Stat ANOVA General Linear Model
Two-Way ANOVA-Mixed
Model — Example 5
Stat ANOVA Residual Plots
Two-Way ANOVA-Mixed
Model — Example 5
Residual Plots for Two-Way ANOVA-III Model
Normal Plot of Residuals I Chart of Residuals
3 10
2 UCL=7.100
Residual
Residual
0
-1 0 Mean=-8.9E-16
-2
-3
-4 LCL=-7.100
-5 -10
-2 -1 0 1 2 0 10 20 30 40 50
Normal Score Observation Number
Residual
0
5 -1
-2
-3
-4
0 -5
-5 -4 -3 -2 -1 0 1 2 3 71 72 73 74 75 76 77 78 79
Residual Fit
Two-Way ANOVA-Mixed
Model — Example 5
Stat ANOVA Balanced ANOVA
Two-Way ANOVA-Mixed
Model — Example 5
Stat ANOVA Residual Plots
Two-Way ANOVA-Mixed
Model — Example 5
Residual Plots for Two-Way ANOVA-III Model
Normal Plot of Residuals I Chart of Residuals
3 10
2 UCL=7.100
Residual
Residual
0
-1 0 Mean=-8.9E-16
-2
-3
-4 LCL=-7.100
-5 -10
-2 -1 0 1 2 0 10 20 30 40 50
Normal Score Observation Number
Residual
0
5 -1
-2
-3
-4
0 -5
-5 -4 -3 -2 -1 0 1 2 3 71 72 73 74 75 76 77 78 79
Residual Fit
Source DF SS MS F P
Coats 2 150.388 75.194 243.60 0.000
Batch 3 152.852 50.951 10.56 0.000
Coats*Batch 6 1.852 0.309 0.06 0.999
Error 36 173.625 4.823
Difference in F*
Total 47 478.717
No difference in p-Value
Two-Way ANOVA-Mixed
Model — Example 5
Stat ANOVA Main Effects Plot
Two-Way ANOVA-Mixed
Model — Example 5
Main Effects Plot for Pearl Value
Coats Batch
80.0
77.5
Value
75.0
72.5
70.0
Two-Way ANOVA-Mixed
Model — Example 5
Stat ANOVA Interactions Plot
Two-Way ANOVA-Mixed
Model — Example 5
Interactions Plot for Pearl Value
Coats
80 6
8
10
Mean
75
70
1 2 3 4
Batch
MSA a–1
2 nbc i2 a 1
MSB b–1
2 nac 2j b 1
MSC c–1
2 nab 2k c 1
MSAB (a–1)(b–1)
MSAC (a–1)(c–1)
2 nc ij2 a 1b 1
2
Three-Way ANOVA-Fixed
Model — Example 6
Assemblers in an electronics firm will attach 12
components to a new printed circuit board. A
study was performed to assess the effects of
gender (factor A), method of sequence (factor B)
and experience of operator (factor C) on the time
required to assemble 50 boards.
The results may be found in Analysis Of
Variance.MTW.
Seagate Confidential 98 Supplier Six Sigma Modular Training
Analysis Of Variance
Three-Way ANOVA-Fixed
Model — Example 6
Stat ANOVA General Linear Model
Three-Way ANOVA-Fixed
Model — Example 6
Stat ANOVA General Linear Model
Three-Way ANOVA-Fixed
Model — Example 6
Stat Regression Residual Plots
Three-Way ANOVA-Fixed
Model — Example 6
Residual Plots for Three-Way ANOVA-I Model
Normal Plot of Residuals I Chart of Residuals
50 100 UCL=90.63
Residual
Residual
0 0 Mean=-2.7E-14
-50 LCL=-90.63
-100
-2 -1 0 1 2 0 10 20 30 40 50 60
Normal Score Observation Number
Residual
0
5
0 -50
Three-Way ANOVA-Fixed
Model — Example 6
Session Window
General Linear Model: Time versus Gender, Sequence, Operator
Factor Type Levels Values
Gender fixed 2 Female Male
Sequence fixed 3 1 2 3
Operator fixed 2 Experienced On Training
Three-Way ANOVA-Fixed
Model — Example 6
Main Effects Plot for Assembly Time
1100
Time
1050
1000
950
Three-Way ANOVA-Fixed
Model — Example 6
Interactions Plot for Assembly Time
Gender 1200
Male
1050
Female 900
Sequence 1200
3
1050
2
1 900
Operator
Three-Way ANOVA-Random
Model
Yijkm ... i j k ij ik jk ijk ijkm
Y is the observed value of the response variable
... is the overall mean for all observations
is the main effect of the random factor A s.t. ~ N0, 2
is the main effect of the random factor B s.t ~ N0,
2
MSC c–1
2 nab 2 nb
2
na2 n
2
MSAB (a–1)(b–1)
2 nc
2
n
2
MSAC (a–1)(c–1)
2 nb
2
n
2
MSBC (b–1)(c–1)
2 na2 n
2
MSABC (a–1)(b–1)(c–1)
2
Three-Way ANOVA-Random
Model
H0 Ha Test Statistic
Three-Way ANOVA-Random
Model — Example 7
An engineer plans to assess the variation in lead
tip co-planarity for PQFPs.
The study involved 2 projectors, 3 inspectors and
10 specimens — all factors were randomly
selected. The results may be found in Analysis Of
Variance.MTW.
Three-Way ANOVA-Random
Model — Example 7
Stat ANOVA General Linear Model
Three-Way ANOVA-Random
Model — Example 7
Stat Regression Residual Plots
Three-Way ANOVA-Random
Model — Example 7
Residual Plots for Three-Way ANOVA-II Model
Normal Plot of Residuals I Chart of Residuals
0.2
0.1
UCL=0.1542
0.1
777 77777 777 77
Residual
Residual
777 7
0.0 0.0 7 7 7777
Mean=1.04E-16
7 7 77
-0.1
LCL=-0.1542
-0.1 -0.2
-2 -1 0 1 2 0 50 100
Normal Score Observation Number
30
Frequency
Residual
20 0.0
10
0 -0.1
-0.10
-0.08
-0.06
-0.04
-0.02
0.000.020.040.060.080.10 0 1 2 3 4 5
Residual Fit
Three-Way ANOVA-Random
Model — Example 7
Session Window
Three-Way ANOVA-Random
Model — Example 7
Main Effects Plot for Lead Tip Coplanarity
4.5
Coplanarity
3.0
1.5
0.0
Three-Way ANOVA-Random
Model — Example 7
Interactions Plot for Lead Tip Coplanarity
Projector 5.0
2
2.5
1 0.0
Inspector 5.0
3
2.5
2
1 0.0
Part
Three-Way ANOVA-Mixed
Model — Example 8
The effect of certain factors on the thickness of a
certain coating under qualification was assessed.
The factors were
a)Shift – morning and night
b) Machine Setting – 35, 44 and 52 sec
c) Operator – 3 operators from a large pool
The results may be found in Analysis Of
Variance.MTW.
Three-Way ANOVA-Mixed
Model — Example 8
Stat ANOVA Balanced ANOVA
(Unrestricted Model)
Three-Way ANOVA-Mixed
Model — Example 8
Stat Regression Residual Plots
Three-Way ANOVA-Mixed
Model — Example 8
Residual Plots for Three-Way ANOVA-III Model
Normal Plot of Residuals I Chart of Residuals
3 5 UCL=4.825
2
1
Residual
Residual
0 0 Mean=0
-1
-2
-3 -5 LCL=-4.825
-2 -1 0 1 2 0 10 20 30 40
Normal Score Observation Number
4 1
Residual
3 0
2 -1
1 -2
0 -3
-2.5-2.0-1.5-1.0-0.50.0 0.5 1.0 1.5 2.0 2.5 40 50 60 70 80 90 100 110
Residual Fit
Three-Way ANOVA-Mixed
Model — Example 8
Session Window
ANOVA: Thickness versus Shift, Setting, Prod Operator
Analysis of Variance for Thickness
Source DF SS MS F P
Shift 1 9.0 9.0 0.29 0.644
Setting 2 15676.4 7838.2 73.18 0.001
Prod Operator 2 1120.9 560.4 4.91 0.090 x
Shift*Setting 2 114.5 57.3 2.39 0.208
Shift*Prod Operator 2 62.0 31.0 1.29 0.369
Setting*Prod Operator 4 428.4 107.1 4.46 0.088
Shift*Setting*Prod Operator 4 96.0 24.0 7.08 0.001
Error 18 61.0 3.4
Total 35 17568.2
Three-Way ANOVA-Mixed
Model — Example 8
ANOVA: Thickness versus Shift, Setting, Prod Operator
Source Variance Error Expected Mean Square for Each Term
component term (using unrestricted model)
1 Shift 5 (8) + 2(7) + 6(5) + Q[1,4]
2 Setting 6 (8) + 2(7) + 4(6) + Q[2,4]
3 Prod Operator 37.194 * (8) + 2(7) + 4(6) + 6(5) + 12(3)
4 Shift*Setting 7 (8) + 2(7) + Q[4]
5 Shift*Prod Operator 1.167 7 (8) + 2(7) + 6(5)
6 Setting*Prod Operator 20.778 7 (8) + 2(7) + 4(6)
7 Shift*Setting*Prod Operator 10.306 8 (8) + 2(7)
8 Error 3.389 (8)
Three-Way ANOVA-Mixed
Model — Example 8
H0 Ha Test Statistic
Three-Way ANOVA-Mixed
Model — Example 8
Stat ANOVA Balanced ANOVA
(Restricted Model)
Three-Way ANOVA-Mixed
Model — Example 8
Session Window
Source DF SS MS F P
Shift 1 9.0 9.0 0.29 0.644
Setting 2 15676.4 7838.2 73.18 0.001
Prod Operator 2 1120.9 560.4 165.38 0.000
Shift*Setting 2 114.5 57.3 2.39 0.208
Shift*Prod Operator 2 62.0 31.0 9.15 0.002
Setting*Prod Operator 4 428.4 107.1 31.61 0.000
Shift*Setting*Prod Operator 4 96.0 24.0 7.08 0.001
Error 18 61.0 3.4
Total 35 17568.2
Three-Way ANOVA-Mixed
Model — Example 8
ANOVA: Thickness versus Shift, Setting, Prod Operator
Three-Way ANOVA-Mixed
Model — Example 8
H0 Ha Test Statistic
Three-Way ANOVA-Mixed
Model — Example 8
Session Window
Three-Way ANOVA-Mixed
Model — Example 8
Stat ANOVA Main Effects Plot
Three-Way ANOVA-Mixed
Model — Example 8
Main Effects Plot for Coating Thickness
90
Thickness
70
50
30
Three-Way ANOVA-Mixed
Model — Example 8
Stat ANOVA Interactions Plot
Three-Way ANOVA-Mixed
Model — Example 8
Interactions Plot for Coating Thickness
Shift 100
Night
75
50
Morning
Setting 100
52
75
44
50
35
2
50
End of Topic
What question do you have?
Quote:
Statistical Significance does not
always mean Practical Significance
Seagate Confidential 13 Supplier Six Sigma Modular Training