Professional Documents
Culture Documents
Analysis of Variance
Copyright 2015, 2012, 2009 Pearson Education, Inc. Chapter 11, Slide 1
Learning Objectives
In this chapter, you learn:
The basic concepts of experimental design
How to use one-way analysis of variance to test for differences
among the means of several groups
When and how to use a randomized block design
How to use two-way analysis of variance and interpret the
interaction effect
How to perform multiple comparisons in a one-way analysis of
variance, a randomized block design, and a two-way analysis of
variance
Copyright 2015, 2012, 2009 Pearson Education, Inc. Chapter 11, Slide 2
Chapter Overview
DCOVA
Analysis of Variance (ANOVA)
Copyright 2015, 2012, 2009 Pearson Education, Inc. Chapter 11, Slide 3
General ANOVA Setting
DCOVA
population
Observe effects on the dependent variable
Are the groups the same?
Copyright 2015, 2012, 2009 Pearson Education, Inc. Chapter 11, Slide 4
Completely Randomized Design
DCOVA
Experimental units (subjects) are assigned
randomly to groups
Subjects are assumed homogeneous
Only one factor or independent variable
With two or more levels
Analyzed by one-factor analysis of variance
(ANOVA)
Copyright 2015, 2012, 2009 Pearson Education, Inc. Chapter 11, Slide 5
One-Way Analysis of Variance
DCOVA
Evaluate the difference among the means of three
or more groups
Examples: Number of accidents for 1st, 2nd, and 3rd shift
Expected mileage for five brands of tires
Assumptions
Populations are normally distributed
Copyright 2015, 2012, 2009 Pearson Education, Inc. Chapter 11, Slide 6
Hypotheses of One-Way ANOVA
DCOVA
H0 : 1 2 3 c
All population means are equal
i.e., no factor effect (no variation in means among
groups)
Copyright 2015, 2012, 2009 Pearson Education, Inc. Chapter 11, Slide 7
One-Way ANOVA
DCOVA
H0 : 1 2 3 c
H1 : Not all j are equal
1 2 3
Copyright 2015, 2012, 2009 Pearson Education, Inc. Chapter 11, Slide 8
One-Way ANOVA (continued)
DCOVA
H0 : 1 2 3 c
H1 : Not all j are equal
or
1 2 3 1 2 3
Copyright 2015, 2012, 2009 Pearson Education, Inc. Chapter 11, Slide 9
Partitioning the Variation
DCOVA
Total variation can be split into two parts:
Copyright 2015, 2012, 2009 Pearson Education, Inc. Chapter 11, Slide 10
Partitioning the Variation
(continued)
DCOVA
SST = SSA + SSW
Copyright 2015, 2012, 2009 Pearson Education, Inc. Chapter 11, Slide 11
Partition of Total Variation
DCOVA
Total Variation (SST)
Copyright 2015, 2012, 2009 Pearson Education, Inc. Chapter 11, Slide 12
Total Sum of Squares
DCOVA
SST ( Xij X) 2
j1 i 1
Where:
2 2 2
SST ( X 11 X ) ( X 12 X ) ( X cn X )
c
R esponse, X
G ro u p 1 G ro u p 2 G ro u p 3
Copyright 2015, 2012, 2009 Pearson Education, Inc. Chapter 11, Slide 14
Among-Group Variation
DCOVA
SSA
Variation Due to
Differences Among Groups MSA
c 1
Mean Square Among =
SSA/degrees of freedom
i j
Copyright 2015, 2012, 2009 Pearson Education, Inc. Chapter 11, Slide 16
Among-Group Variation
DCOVA
(continued)
SSA n 1 (X1 X) n 2 (X 2 X) n c (X c X)
2 2 2
R esponse, X
X3
X2 X
X1
G ro u p 1 G ro u p 2 G ro u p 3
Copyright 2015, 2012, 2009 Pearson Education, Inc. Chapter 11, Slide 17
Within-Group Variation
DCOVA
j 1 i 1
Where:
nj
DCOVA
c
SSW ( Xij X j )2
j1 i 1
SSW
Summing the variation
MSW
within each group and then
adding over all groups nc
Mean Square Within =
SSW/degrees of freedom
j
Copyright 2015, 2012, 2009 Pearson Education, Inc. Chapter 11, Slide 19
Within-Group Variation
DCOVA
(continued)
R esponse, X
X3
X2
X1
G ro u p 1 G ro u p 2 G ro u p 3
Copyright 2015, 2012, 2009 Pearson Education, Inc. Chapter 11, Slide 20
Obtaining the Mean Squares
DCOVA
The Mean Squares are obtained by dividing the various
sum of squares by their associated degrees of freedom
SST
MST Mean Square Total
n 1 (d.f. = n-1)
Copyright 2015, 2012, 2009 Pearson Education, Inc. Chapter 11, Slide 21
One-Way ANOVA Table
DCOVA
Total n1 SST
c = number of groups
n = sum of the sample sizes from all groups
df = degrees of freedom
Copyright 2015, 2012, 2009 Pearson Education, Inc. Chapter 11, Slide 22
One-Way ANOVA
F Test Statistic DCOVA
H0: 1= 2 = = c
H1: At least two population means are different
Test statistic MSA
FSTAT
MSW
MSA is mean squares among groups
MSW is mean squares within groups
Degrees of freedom
df1 = c 1 (c = number of groups)
df2 = n c (n = sum of sample sizes from all populations)
Copyright 2015, 2012, 2009 Pearson Education, Inc. Chapter 11, Slide 23
Interpreting One-Way ANOVA
F Statistic DCOVA
Decision Rule:
Reject H if F
0 STAT > F,
otherwise do not reject
0
H0 Do not
reject H0
Reject H0
F
Copyright 2015, 2012, 2009 Pearson Education, Inc. Chapter 11, Slide 24
One-Way ANOVA
F Test Example DCOVA
Copyright 2015, 2012, 2009 Pearson Education, Inc. Chapter 11, Slide 25
One-Way ANOVA Example:
Scatter Plot Distance
DCOVA
Club 1 Club 2 Club 3 270
254 234 200 260
263
241
218
235
222
197
250 X1
240
237 227 206
230
251 216 204
220
X2 X
210
x1 249.2 x 2 226.0 x 3 205.8
X3
200
x 227.0 190
1 2 3
Club
Copyright 2015, 2012, 2009 Pearson Education, Inc. Chapter 11, Slide 26
One-Way ANOVA Example
Computations DCOVA
Copyright 2015, 2012, 2009 Pearson Education, Inc. Chapter 11, Slide 27
One-Way ANOVA Example
Solution DCOVA
Critical Decision:
Value:
Reject H0 at = 0.05
F = 3.89
= .05 Conclusion:
There is evidence that
0 Do not Reject H0 at least one j differs
reject H0
F0.05 = 3.89 from the rest
Copyright 2015, 2012, 2009 Pearson Education, Inc. Chapter 11, Slide 28
One-Way ANOVA
Excel Output DCOVA
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
SS df MS F P-value F crit
Variation
Between
4716.4 2 2358.2 25.275 0.0000 3.89
Groups
Within
1119.6 12 93.3
Groups
Total 5836.0 14
Copyright 2015, 2012, 2009 Pearson Education, Inc. Chapter 11, Slide 29
One-Way ANOVA
Minitab Output DCOVA
One-way ANOVA: Distance versus Club
Source DF SS MS F P
Club 2 4716.4 2358.2 25.28 0.000
Error 12 1119.6 93.3
Total 14 5836.0
Copyright 2015, 2012, 2009 Pearson Education, Inc. Chapter 11, Slide 30
The Tukey-Kramer Procedure
DCOVA
1= 2 3 x
Copyright 2015, 2012, 2009 Pearson Education, Inc. Chapter 11, Slide 31
Tukey-Kramer Critical Range
DCOVA
MSW 1 1
Critical Range Q
2 n j n j'
where:
Q = Upper Tail Critical Value from Studentized
Range Distribution with c and n - c degrees
of freedom (see appendix E.7 table)
MSW = Mean Square Within
nj and nj = Sample sizes from groups j and j
Copyright 2015, 2012, 2009 Pearson Education, Inc. Chapter 11, Slide 32
The Tukey-Kramer Procedure:
Example DCOVA
1. Compute absolute mean
Club 1 Club 2 Club 3 differences:
254 234 200
263 218 222 x1 x 2 249.2 226.0 23.2
241 235 197 x1 x 3 249.2 205.8 43.4
237 227 206
251 216 204 x 2 x 3 226.0 205.8 20.2
Q 3.77
Copyright 2015, 2012, 2009 Pearson Education, Inc. Chapter 11, Slide 33
The Tukey-Kramer Procedure:
Example (continued)
3. Compute Critical Range: DCOVA
MSW 1 1 93.3 1 1
Critical Range Q 3.77 16.285
2 n j n j' 2 5 5
4. Compare:
5. All of the absolute mean differences
are greater than the critical range. x1 x 2 23.2
Therefore there is a significant x1 x 3 43.4
difference between each pair of
means at 5% level of significance. x 2 x 3 20.2
Thus, with 95% confidence we conclude that
the mean distance for club 1 is greater than
club 2 and 3, and club 2 is greater than club 3.
Copyright 2015, 2012, 2009 Pearson Education, Inc. Chapter 11, Slide 34
ANOVA Assumptions
DCOVA
Copyright 2015, 2012, 2009 Pearson Education, Inc. Chapter 11, Slide 35
ANOVA Output From Excel
DCOVA
Copyright 2015, 2012, 2009 Pearson Education, Inc. Chapter 11, Slide 36
ANOVA Output From Minitab
DCOVA
Copyright 2015, 2012, 2009 Pearson Education, Inc. Chapter 11, Slide 37
The Tukey Procedure
DCOVA
The Tukey Procedure is used for a randomized
block design for multiple comparisons.
Done after rejection of equal means in ANOVA
The critical range for the multiple comparisons
procedure for randomized block designs is:
MSE
Critical Range Q
r
where:
Q = Upper Tail Critical Value from Studentized
Range Distribution with c and (r-1)(c-1)
degrees of freedom (see appendix E.7 table)
Copyright 2015, 2012, 2009 Pearson Education, Inc. Chapter 11, Slide 38
The Tukey-Kramer Procedure: Example
DCOVA
1. Compute absolute mean differences: 2. Compute the critical range
Copyright 2015, 2012, 2009 Pearson Education, Inc. Chapter 11, Slide 39
Factorial Design:
Two-Way ANOVA DCOVA
Copyright 2015, 2012, 2009 Pearson Education, Inc. Chapter 11, Slide 40
Two-Way ANOVA
(continued)
DCOVA
Assumptions
Copyright 2015, 2012, 2009 Pearson Education, Inc. Chapter 11, Slide 41
Two-Way ANOVA
Sources of Variation DCOVA
SST SSB c1
Factor B Variation
Total Variation
SSAB
Variation due to interaction (r 1)(c 1)
between A and B
n-1
SSE rc(n 1)
Random variation (Error)
Copyright 2015, 2012, 2009 Pearson Education, Inc. Chapter 11, Slide 43
Two-Way ANOVA Equations
DCOVA
Total Variation: r c n
SST ( Xijk X) 2
i1 j1 k 1
Factor A Variation: r
SSA cn ( Xi.. X)
2
i 1
Factor B Variation: c
SSB rn ( X. j. X)2
j1
Copyright 2015, 2012, 2009 Pearson Education, Inc. Chapter 11, Slide 44
Two-Way ANOVA Equations
(continued)
DCOVA
Interaction Variation:
r c
SSAB n ( Xij. Xi.. X.j. X)2
i 1 j 1
i 1 j1 k 1
Copyright 2015, 2012, 2009 Pearson Education, Inc. Chapter 11, Slide 45
Two-Way ANOVA Equations
(continued)
r c n
where: X
i1 j 1 k 1
ijk DCOVA
X Grand Mean
c n
rcn
X
j1 k 1
ijk
X ijk
X. j. i1 k 1
Mean of jth level of factor B (j 1, 2, ..., c)
rn
Xijk
n
Xij.
r = number of levels of factor A
Mean of cell ij
k 1 n
c = number of levels of factor B
n = number of replications in each
cell
Copyright 2015, 2012, 2009 Pearson Education, Inc. Chapter 11, Slide 46
Mean Square Calculations
DCOVA
SSA
MSA Mean square factor A
r 1
SSB
MSB Mean square factor B
c 1
SSAB
MSAB Mean square interaction
(r 1)(c 1)
SSE
MSE Mean square error
rc(n'1)
Copyright 2015, 2012, 2009 Pearson Education, Inc. Chapter 11, Slide 47
Interpreting Results From A DCOVA
Two Way ANOVA
First determine if the interaction is statistically
significant
Copyright 2015, 2012, 2009 Pearson Education, Inc. Chapter 11, Slide 48
Two-Way ANOVA:
The F Test Statistics DCOVA
Copyright 2015, 2012, 2009 Pearson Education, Inc. Chapter 11, Slide 49
Two-Way ANOVA
Summary Table DCOVA
MSA MSA
Factor A SSA r1
= SSA /(r 1) MSE
MSB MSB
Factor B SSB c1
= SSB /(c 1) MSE
AB MSAB MSAB
SSAB (r 1)(c 1)
(Interaction) = SSAB / (r 1)(c 1) MSE
MSE =
Error SSE rc(n 1)
SSE/rc(n 1)
Total SST n1
Copyright 2015, 2012, 2009 Pearson Education, Inc. Chapter 11, Slide 50
Features of Two-Way ANOVA
F Test DCOVA
Degrees of freedom always add up
n-1 = rc(n-1) + (r-1) + (c-1) + (r-1)(c-1)
Total = error + factor A + factor B + interaction
The denominators of the F Test are always the
same but the numerators are different
The sums of squares always add up
SST = SSE + SSA + SSB + SSAB
Total = error + factor A + factor B + interaction
Copyright 2015, 2012, 2009 Pearson Education, Inc. Chapter 11, Slide 51
Do In-Store Location and the Permissibility
of Mobile Payments Impact Sales DCOVA
Sales By Location and Permissibility Of Mobile Payments
Mobile
Payments In-Aisle Front Kiosk Expert
No 30.06 32.22 30.78 30.33
No 29.96 31.47 30.91 30.29
No 30.19 32.13 30.79 30.25
No 29.96 31.86 30.95 30.25
No 29.74 32.29 31.13 30.55
Yes 30.66 32.81 31.34 31.03
Yes 29.99 32.65 31.80 31.77
Yes 30.73 32.81 32.00 30.97
Yes 30.72 32.42 31.07 31.43
Yes 30.73 33.12 31.69 30.72
Copyright 2015, 2012, 2009 Pearson Education, Inc. Chapter 11, Slide 52
Excel Two-Way Anova Results
DCOVA
Copyright 2015, 2012, 2009 Pearson Education, Inc. Chapter 11, Slide 53
Minitab Two-Way Anova Results
DCOVA
Copyright 2015, 2012, 2009 Pearson Education, Inc. Chapter 11, Slide 54
The Tukey-Kramer Procedure
DCOVA
The Tukey-Kramer Procedure can also be used for a
two way ANOVA when there is no significant interaction.
Done after one of both of the factor effects is significant
The critical range for each factor for multiple
comparisons procedure for a two way ANOVA is:
MSE MSE
Critical Range For Factor A Q Critical Range For Factor B Q
cn rn
where: where:
Q = Upper Tail Critical Value from Q = Upper Tail Critical Value from
Studentized Range Distribution Studentized Range Distribution with c and
with r and rc(n-1) degrees of freedom (see rc(n-1) degrees of freedom (see appendix
appendix E.7 table) E.7 table)
Copyright 2015, 2012, 2009 Pearson Education, Inc. Chapter 11, Slide 55
The Tukey-Kramer Procedure: Example
DCOVA
1. Compute absolute mean differences: 2. Compute the critical range
3. All pairwise comparisons exceed the critical range and are significant. This indicates mean
sales are different for the four in-store locations.
Copyright 2015, 2012, 2009 Pearson Education, Inc. Chapter 11, Slide 56
Visualizing Interactions: The DCOVA
Cell Means Plot
An Insignificant Interaction Will Yield Cell Means Plots
With Approximately Parallel Line Segments
Copyright 2015, 2012, 2009 Pearson Education, Inc. Chapter 11, Slide 57
Interactions Will Yield Plots With
Some Non-parallel Line Segments
DCOVA
Interaction is present: some
No interaction: line line segments not parallel
segments are parallel
Factor B Level 1
Mean Response
Mean Response
Factor B Level 1
Factor B Level 3
Factor B Level 2
Factor B Level 2
Factor B Level 3
Copyright 2015, 2012, 2009 Pearson Education, Inc. Chapter 11, Slide 58
Interpreting An Interaction Effect
DCOVA
A statistically significant interaction indicates that
the effect one factor has on the dependent
variable depends on what the level of another
factor is.
Copyright 2015, 2012, 2009 Pearson Education, Inc. Chapter 11, Slide 59
Do ACT Prep Course Type and Course
Length Impact Average ACT Scores? DCOVA
ACT Scores for Different Types and Lengths of Courses
LENGTH OF COURSE
Traditional 26 18 34 28
Traditional 27 24 24 21
Traditional 25 19 35 23
Traditional 21 20 31 29
Traditional 21 18 28 26
Online 27 21 24 21
Online 29 32 16 19
Online 30 20 22 19
Online 24 28 20 24
Online 30 29 23 25
Copyright 2015, 2012, 2009 Pearson Education, Inc. Chapter 11, Slide 60
Plotting Cell Means Shows A
DCOVA
Strong Interaction
Nonparallel lines indicate
the effect of condensing
the course depends on
whether the course is
taught in the traditional
classroom or by online
distance learning
Copyright 2015, 2012, 2009 Pearson Education, Inc. Chapter 11, Slide 61
Excel Analysis Of ACT Prep
DCOVA
Course Data
The interaction between course
length & type is significant
because its p-value is 0.0000.
Copyright 2015, 2012, 2009 Pearson Education, Inc. Chapter 11, Slide 62
Minitab Analysis Of ACT Prep
DCOVA
Course Data The interaction between course
length & type is significant
because its p-value is 0.0000.
Copyright 2015, 2012, 2009 Pearson Education, Inc. Chapter 11, Slide 63
With The Significant Interaction
Collapse The Data Into Four Groups
DCOVA
After collapsing into four groups do a one way
ANOVA
Copyright 2015, 2012, 2009 Pearson Education, Inc. Chapter 11, Slide 64
Excel Analysis Of Collapsed Data
DCOVA
Copyright 2015, 2012, 2009 Pearson Education, Inc. Chapter 11, Slide 66
Chapter Summary
In this chapter we discussed:
The basic concepts of experimental design
How to use one-way analysis of variance to test for differences
among the means of several groups
When and how to use a randomized block design
How to use two-way analysis of variance and interpret the
interaction effect
How to perform multiple comparisons in a one-way analysis of
variance, a randomized block design, and a two-way analysis of
variance
Copyright 2015, 2012, 2009 Pearson Education, Inc. Chapter 11, Slide 67
On Line Topic For Chapter 11
Fixed effects, random effects, and mixed effects model
Copyright 2015, 2012, 2009 Pearson Education, Inc. Chapter 11, Slide 68