Two-Way Analysis of Variance: Statistics For Managers Using Microsoft Excel
Two-Way Analysis of Variance: Statistics For Managers Using Microsoft Excel
Analysis of Variance
Chapter 11
Statistics for Managers Using Microsoft Excel®7e Copyright ©2014 Pearson Education, Inc. Chap 11-1
Learning Objectives
In this chapter, you learn:
How to use two-way analysis of variance and interpret the
interaction effect
How to perform multiple comparisons in a two-way analysis of
variance
Statistics for Managers Using Microsoft Excel®7e Copyright ©2014 Pearson Education, Inc. Chap 11-2
Factorial Design:
Two-Way ANOVA
Examines the effect of
Two factors of interest on the dependent
variable
e.g., Percent carbonation and line speed on soft drink
bottling process
Interaction between the different levels of these
two factors
e.g., Does the effect of one particular carbonation
level depend on which level the line speed is set?
Statistics for Managers Using Microsoft Excel®7e Copyright ©2014 Pearson Education, Inc.
Two-Way ANOVA
(continued)
Assumptions
Statistics for Managers Using Microsoft Excel®7e Copyright ©2014 Pearson Education, Inc. Chap 11-4
Two-Way ANOVA
Sources of Variation
Two Factors of interest: A and B
r = number of levels of factor A
c = number of levels of factor B
n’ = number of replications for each cell
n = total number of observations in all cells
n = (r)(c)(n’)
Xijk = value of the kth observation of level i of
factor A and level j of factor B
Statistics for Managers Using Microsoft Excel®7e Copyright ©2014 Pearson Education, Inc. Chap 11-5
Two-Way ANOVA
Sources of Variation (continued)
Statistics for Managers Using Microsoft Excel®7e Copyright ©2014 Pearson Education, Inc. Chap 11-6
Two-Way ANOVA Equations
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
Statistics for Managers Using Microsoft Excel®7e Copyright ©2014 Pearson Education, Inc. Chap 11-7
Two-Way ANOVA Equations
(continued)
Interaction Variation:
r c
SSAB n ( Xij. Xi.. X.j. X)2
i1 j1
i 1 j1 k 1
Statistics for Managers Using Microsoft Excel®7e Copyright ©2014 Pearson Education, Inc. Chap 11-8
Two-Way ANOVA Equations
(continued)
r c n
where: X
i1 j 1 k 1
ijk
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 c = number of levels of factor B
k 1 n n’ = number of replications in each cell
Statistics for Managers Using Microsoft Excel®7e Copyright ©2014 Pearson Education, Inc. Chap 11-9
Mean Square Calculations
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)
Statistics for Managers Using Microsoft Excel®7e Copyright ©2014 Pearson Education, Inc. Chap 11-10
Two-Way ANOVA:
The F Test Statistics
F Test for Factor A Effect
H0: μ1..= μ2.. = μ3..= • • = µr..
MSA Reject H0 if
H1: Not all μi.. are equal FSTAT
MSE FSTAT > Fα
MSA MSA
Factor A SSA r–1
= SSA /(r – 1) MSE
MSB MSB
Factor B SSB c–1
= 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 n–1
Statistics for Managers Using Microsoft Excel®7e Copyright ©2014 Pearson Education, Inc. Chap 11-12
Features of Two-Way ANOVA
F Test
Degrees of freedom always add up
n-1 = (r-1) + (c-1) + (r-1)(c-1) + rc(n’-1)
Total = factor A + factor B + interaction + error
The denominators of the F Test are always the
same but the numerators are different
The sums of squares always add up
SST = SSA + SSB + SSAB + SSE
Total = factor A + factor B + interaction + error
Statistics for Managers Using Microsoft Excel®7e Copyright ©2014 Pearson Education, Inc. Chap 11-13
Examples
## 11.15 – 11.18
# 11.19
# 11.20
Statistics for Managers Using Microsoft Excel®7e Copyright ©2014 Pearson Education, Inc. Chap 11-14
Examples:
Interaction vs. No Interaction
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
Statistics for Managers Using Microsoft Excel®7e Copyright ©2014 Pearson Education, Inc. Chap 11-15
Do ACT Prep Course Type & Length
Impact Average ACT Scores
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
Statistics for Managers Using Microsoft Excel®7e Copyright ©2014 Pearson Education, Inc. Chap 11-16
Plotting Cell Means Shows A
Strong Interaction
Statistics for Managers Using Microsoft Excel®7e Copyright ©2014 Pearson Education, Inc. Chap 11-17
Excel Analysis Of ACT Prep
Course Data
The interaction between course
length & type is significant
because its p-value is 0.0000.
Statistics for Managers Using Microsoft Excel®7e Copyright ©2014 Pearson Education, Inc. Chap 11-18
What to do if interaction is present?
Statistics for Managers Using Microsoft Excel®7e Copyright ©2014 Pearson Education, Inc. Chap 11-19
Excel Analysis Of Collapsed
Data
Statistics for Managers Using Microsoft Excel®7e Copyright ©2014 Pearson Education, Inc. Chap 11-21
Examples
# 11.22
## 11.24, 11.26 (in Excel, data analysis toolpak,
choose “ANOVA: two-factor with replication”)
Statistics for Managers Using Microsoft Excel®7e Copyright ©2014 Pearson Education, Inc. Chap 11-22