Академический Документы
Профессиональный Документы
Культура Документы
Chap 13-1
Chapter Goals
After completing this chapter, you should be able
to:
Chapter Overview
Analysis of Variance (ANOVA)
One-Way
ANOVA
F-test
TukeyKramer
test
Two-Way
ANOVA
Interaction
Effects
Assumptions
Populations are normally distributed
Populations have equal variances
Samples are randomly and independently drawn
H0 : 1 2 3 c
One-Factor ANOVA
H0 : 1 2 3 c
H1 : Not all i are the same
All Means are the same:
The Null Hypothesis is True
(No Treatment Effect)
1 2 3
One-Factor ANOVA
H0 : 1 2 3 c
H1 : Not all i 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
(continued)
Variation Due to
Factor (SSA)
nj
SST ( Xij X)
Where:
j1 i 1
Total Variation
(continued)
X
Group 1
Group 2
Group 3
Among-Group Variation
SST = SSA + SSW
c
SSA n j ( X j X)2
Where:
j1
Among-Group Variation
(continued)
c
SSA n j ( X j X)2
j 1
Variation Due to
Differences Among Groups
SSA
MSA
k 1
Mean Square Among =
SSA/degrees of freedom
Among-Group Variation
(continued)
SSA n1 ( x1 x ) n2 ( x 2 x ) ... nc ( x c x )
2
Response, X
X3
X1
Group 1
Group 2
X2
Group 3
Within-Group Variation
SST = SSA + SSW
c
SSW
j 1
nj
i 1
( Xij X j )
Where:
Within-Group Variation
(continued)
c
SSW
j1
nj
i 1
( Xij X j )2
SSW
MSW
nc
Mean Square Within =
SSW/degrees of freedom
Within-Group Variation
(continued)
Response, X
X1
Group 1
Group 2
X2
Group 3
X3
SS
df
Among
Groups
SSA
c-1
Within
Groups
SSW
n-c
SST =
SSA+SSW
n-1
Total
MS
(Variance)
F ratio
SSA
MSA
MSA =
c - 1 F = MSW
SSW
MSW =
n-c
c = number of groups
n = sum of the sample sizes from all groups
df = degrees of freedom
Test statistic
MSA
F
MSW
Degrees of freedom
df1 = c 1
(c = number of groups)
df2 = n c
Decision Rule:
Reject H if F > F ,
0
U
otherwise do not
reject H0
= .05
Do not
reject H0
Reject H0
FU
One-Factor 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 .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
Club 2
234
218
235
227
216
Club 3
200
222
197
206
204
Distance
270
260
250
240
230
220
210
X1
X2
200
190
1
2
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
SSA = 5 (249.2 227)2 + 5 (226 227)2 + 5 (205.8 227)2 = 4716.4
SSW = (254 249.2)2 + (263 249.2)2 ++ (204 205.8)2 = 1119.6
2358.2
F
25.275
93.3
H0: 1 = 2 = 3
H1: i not all equal
= .05
df1= 2
df2 = 12
Critical
Value:
FU = 3.89
= .05
Do not
reject H0
Reject H0
FU = 3.89
MSA 2358.2
F
25.275
MSW
93.3
Decision:
Reject H0 at = 0.05
Conclusion:
There is evidence that
at least one i differs
F = 25.275
from 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
F crit
3.89
e.g.: 1 = 2 3
1= 2
Critical Range QU
MSW 1 1
2 n j n j'
where:
QU = Value from Studentized Range Distribution with c and
n - c degrees of freedom for the desired level of (see
appendix A.12 table)
MSW = Mean Square Within
ni and nj = Sample sizes from groups j and j
Club 2
234
218
235
227
216
Club 3
200
222
197
206
204
QU 3.77
Tukey-Kramer Procedure:Example
(continued)
MSW 1 1
93.3 1 1
3.77
16.285
2 n j n j'
2 5 5
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
Duncans Test
MSW 1
1
2 n j n j'
where:
rp = Least significant studentized Range Distribution with n - c
degrees of freedom for the desired level of (see
appendix A.13 table)
p = 2,3,, k ; the range of any subset of sample
means
Tukey-Kramer in PHStat
Two-Way ANOVA
(continued)
Assumptions
Two-Way ANOVA
Sources of Variation
SST = SSA + SSB + SSAB + SSE
SSA
Factor A Variation
SST
Total Variation
SSB
Factor B Variation
SSAB
n-1
(continued)
Degrees of
Freedom:
r1
c1
(r 1)(c 1)
SSE
rc(n 1)
SST ( Xijk X)
i1 j1 k 1
Factor A Variation:
SSA cn ( Xi.. X)
i 1
Factor B Variation:
SSB rn ( X. j. X)2
j1
Interaction Variation:
r
where:
Xi..
X
j1 k 1
i1 j 1 k 1
ijk
rcn
X
i1 k 1
rn
ijk
Xijk
Xij.
Mean of cell ij
k 1 n
n
Grand Mean
ijk
cn
X. j.
(continued)
SSAB
MSAB Mean square interaction
(r 1)(c 1)
SSE
MSE Mean square error
rc(n'1)
Two-Way ANOVA:
The F Test Statistic
H0: 1.. = 2.. = 3.. =
H1: Not all i.. are equal
MSA
F
MSE
Reject H0
if F > FU
MSB
F
MSE
Reject H0
if F > FU
MSAB
F
MSE
Reject H0
if F > FU
Two-Way ANOVA
Summary Table
Source of
Variation
Sum of
Squares
Degrees of
Freedom
Factor A
SSA
r1
Factor B
SSB
c1
AB
(Interaction)
SSAB
(r 1)(c 1)
Error
SSE
rc(n 1)
Total
SST
n1
Mean
Squares
F
Statistic
MSA
MSA
MSE
= SSA /(r 1)
MSB
= SSB /(c 1)
MSAB
= SSAB / (r 1)(c 1)
MSE =
SSE/rc(n 1)
MSB
MSE
MSAB
MSE
Examples:
Interaction vs. No Interaction
No interaction:
Interaction is
present:
Factor B Level 3
Factor B Level 2
Factor A Levels
Mean Response
Factor B Level 1
Mean Response
Factor B Level 1
Factor B Level 2
Factor B Level 3
Factor A Levels
Chapter Summary
ANOVA assumptions