Professional Documents
Culture Documents
Anova
Anova
Analysis of Variance
Learning Objectives
Be able to use one-way analysis of variance to
test for differences among the means of several
populations
Hypotheses of One-Way
ANOVA
H0 : 1 2 3 c
All population means are equal
i.e., no treatment effect (no variation in means among
groups)
One-Factor ANOVA
H0 : 1 2 3 c
H1 : Not all j are the same
All Means are the same:
The Null Hypothesis is True
(No Treatment Effect)
1 2 3
4
One-Factor ANOVA
(continued)
H0 : 1 2 3 c
H1 : Not all j are the same
At least one mean is different:
The Null Hypothesis is NOT true
(Treatment Effect is present)
or
1 2 3
1 2 3
5
Variation Due to
Factor (SSA)
d.f. = c 1
d.f. = n c
Commonly referred to as:
Sum of Squares Within
Sum of Squares Error
Sum of Squares Unexplained
Within-Group Variation
8
nj
SST ( Xij X)
Where:
j1 i 1
Total Variation
(continued)
X
G ro u p 1
G ro u p 2
G ro u p 3
10
Among-Group Variation
SST = SSA + SSW
c
SSA n j ( X j X)2
j1
Where:
Among-Group Variation
(continued)
c
SSA n j ( X j X)2
j 1
Variation Due to
Differences Among Groups
SSA
MSA
c 1
Mean Square Among =
SSA/degrees of freedom
j
12
Among-Group Variation
(continued)
SSA n1 ( x1 x ) n2 ( x 2 x ) ... nc ( x c x )
2
R esponse, X
X3
X1
G ro u p 1
G ro u p 2
X2
G ro u p 3
13
Within-Group Variation
SST = SSA + SSW
c
SSW
j1
nj
i 1
( Xij X j )
Where:
14
Within-Group Variation
(continued)
c
SSW
j1
nj
i 1
( Xij X j )2
SSW
MSW
nc
Mean Square Within =
SSW/degrees of freedom
15
Within-Group Variation
(continued)
R esponse, X
X1
G ro u p 1
G ro u p 2
X3
X2
G ro u p 3
16
SS
df
Among
Groups
SSA
c-1
Within
Groups
SSW
n-c
Total
SST =
SSA+SSW
MS
(Variance)
SSA
MSA
MSA =
c - 1 F = MSW
SSW
MSW =
n-c
n-1
c = number of groups
n = sum of the sample sizes from all groups
df = degrees of freedom
F ratio
18
One-Way ANOVA
F Test Statistic
H0: 1= 2 = = c
H1: At least two population means are different
Test statistic
MSA
F
MSW
Degrees of freedom
df1 = c 1
(c = number of groups)
df2 = n c
populations)
Decision Rule:
Reject H if F > F ,
0
U
otherwise do not
reject H0
= .05
Do not
reject H0
Reject H0
20
FU
One-Way ANOVA
F Test Example
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
0.05 significance level, is
there a difference in mean
distance?
Club 1
254
263
241
237
251
Club 2
234
218
235
227
216
21
Club 3
200
222
197
206
204
Club 2
234
218
235
227
216
Club 3
200
222
197
206
204
Distance
270
260
250
240
230
220
210
200
x 227.0
190
X1
X2
222
Club
X
X3
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
c=3
2358.2
F
25.275
93.3
23
H 0: 1 = 2 = 3
H1: j not all equal
= 0.05
df1= 2
df2 = 12
MSA 2358.2
F
25.275
MSW
93.3
Critical
Value:
FU = 3.89
= .05
Do not
reject H0
Reject H0
FU = 3.89
F = 25.275
Decision:
Reject H0 at = 0.05
Conclusion:
There is evidence that at
least one j differs from
24
the rest
Count
Sum
Average
Variance
Club 1
1246
249.2
108.2
Club 2
1130
226
77.5
Club 3
1029
205.8
94.2
ANOVA
Source of
Variation
SS
df
MS
Between
Groups
4716.4
2358.2
Within
Groups
1119.6
12
93.3
Total
5836.0
14
F
25.275
P-value
4.99E-05
25
F crit
3.89