Analysis of Variance: Randomized Design
Analysis of Variance: Randomized Design
Randomized Design
One-Way ANOVA : Motivation
As QC manager, you want to
see if 3 filling machines have
different mean filling times. You
assign 15 similarly trained
workers, 5 per machine, to the
machines. At the 5% level, is
there a difference in mean
filling times ?
Machine1 Machine2
Machine3
25.40 23.40 20.00
26.31 21.80 22.20
24.10 23.50 19.75
23.74 22.75 20.60
25.10 21.60 20.40
Randomized Design
Machine is called the treatment / factor / independent
variable
We say machine A is treatment 1, machine B is
treatment 2, etc.
We may also say there is only 1 treatment with three
levels
Workers (experimental units) are assigned randomly to
the machines
Data collected this way are analyzed by one-way
analysis of variance (ANOVA)
Hypotheses of One-Way ANOVA
All population means are equal
Treatment effect is absent
At least one population mean is different from the
others
Treatment effect is present
0 1 2
:
c
H = = =
1
: not all are the same
i
H
One-Way ANOVA Assumptions
Samples are randomly and independently drawn
Populations are normally distributed
Populations have equal variances :
2 2 2
1 2 c
o o o = = =
No Treatment Effect
0 1 2
:
c
H = = =
1 2 3
= =
Treatment Effect Present
1
: not all are the same
i
H
1 2 3
= =
1 2 3
1 3 2
2 3 1
or
or
= =
= =
= =
Summary Measures for Each Group
1
.
1
Sample mean of group :
( )
j
j j ij
i
j
n
or
n
j
X X X
=
=
( )
2
2
1
Sample variance of group :
1
ij j
j
i
j
j
n
j
X X
S
n
=
:
1
SSA
MSA
c
=
1
:
( 1) ... ( 1)
c
SSW SSW
MSW
n n n c
= =
+ +
Test statistic
MSA = SSA / (c-1)
MSW = SSW / (n-c)
Degrees of freedom
numerator : c 1
denominator : n c
The F-ratio will be significantly big if the null hypothesis
is false
=
MSA
F
MSW
ANOVA F Test
One-Way ANOVA Table
Source of
Variation
Sum of
Squares
d.f.
Mean
Squares
F
Statistic
Among
groups
SSA c 1
MSA =
SSA/(c 1)
MSA/MSW
Within
groups
SSW n c
MSW =
SSW/(n c)
Total SST n 1
Filling Machine Example
Machine1 Machine2 Machine3
25.40 23.40 20.00
26.31 21.80 22.20
24.10 23.50 19.75
23.74 22.75 20.60
25.10 21.60 20.40
( ) ( ) ( )
2 2 2
2 2 2
1 2 3
5 24.93 22.71 22.61 22.71 20.59 22.71
47.164
/ ( 1) 47.16 / 2 23.5820
( ) / 3 0.9211
SSA
MSA SSA c
MSW S S S
(
= + +
=
= = =
= + + =
2
1 1
2
2 2
2
3 3
24.93 1.0648
22.61 0.7780
20.59 0.9205
22.71
X S
X S
X S
X
= =
= =
= =
=
5
3
15
i
n
c
n
=
=
=
Filling Machine ANOVA Table
Source of
Variation
Sum of
Squares
d.f.
Mean
Squares
F
Statistic
Among
groups
47.1640 3-1=2 23.5820 25.60
Within
groups
11.0532 15-3=12 0.9211
Total 58.2172 15-1=14
Filling Machine : Solution
F 0 3.89
H
0
:
1
=
2
=
3
H
1
: not all equal
o = .05
df
1
= 2 df
2
= 12
Critical Value : 3.89
Test Statistic:
Decision:
Conclusion:
Reject at o = 0.05
There is evidence that at least
one
i
differs from the rest.
o = 0.05
F
MSA
MSW
= =
=
23 5820
9211
25 6
.
0.
.
Filling Machine : Solution by
SPSS
Filling Machine : Solution by
SPSS
Analyze
Compare Means
One-Way ANOVA
Options
Statistics : Homogeneity of variance test
Filling Machine : Solution by
SPSS
Tes t of Homogenei t y of Vari ances
TIME
.126 2 12 .882
Levene Statistic df1 df2 Sig.
ANOVA
TIME
47.164 2 23.582 25.602 .000
11.053 12 .921
58.217 14
Between Groups
Within Groups
Total
Sum of Squares df Mean Square F Sig.