Copyright ©2012 Pearson Education, Inc. publishing as Prentice Hall Chap 11-1Chap 11-1
Chapter 11
Analysis of Variance
Basic Business Statistics12th Edition
Chap 11-2Copyright ©2012 Pearson Education, Inc. publishing as Prentice Hall Chap 11-2
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 populations (also referred to as “groups” in this chapter)
To learn the basic structure and use of 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 and a two-way analysis of variance
Chap 11-3Copyright ©2012 Pearson Education, Inc. publishing as Prentice Hall Chap 11-3
Chapter Overview
Analysis of Variance (ANOVA)
F-test
Tukey-Kramer Multiple
Comparisons
One-Way ANOVA
Two-Way ANOVA
InteractionEffects
Randomized Block Design
Tukey Multiple Comparisons
Levene TestFor
Homogeneityof Variance
Tukey Multiple Comparisons
DCOVA
Chap 11-4Copyright ©2012 Pearson Education, Inc. publishing as Prentice Hall Chap 11-4
General ANOVA Setting
Investigator controls one or more factors of interest Each factor contains two or more levels Levels can be numerical or categorical Different levels produce different groups Think of each group as a sample from a different
population Observe effects on the dependent variable
Are the groups the same? Experimental design: the plan used to collect the data
DCOVA
Chap 11-5Copyright ©2012 Pearson Education, Inc. publishing as Prentice Hall Chap 11-5
Completely Randomized Design
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)
DCOVA
Chap 11-6Copyright ©2012 Pearson Education, Inc. publishing as Prentice Hall Chap 11-6
One-Way Analysis of Variance
Evaluate the difference among the means of three or more groups
Examples: Accident rates for 1st, 2nd, and 3rd shift
Expected mileage for five brands of tires
Assumptions Populations are normally distributed Populations have equal variances Samples are randomly and independently drawn
DCOVA
Chap 11-7Copyright ©2012 Pearson Education, Inc. publishing as Prentice Hall Chap 11-7
Hypotheses of One-Way ANOVA
All population means are equal i.e., no factor effect (no variation in means among
groups)
At least one population mean is different i.e., there is a factor effect Does not mean that all population means are
different (some pairs may be the same)
c3210 μμμμ:H
same the are means population the of all Not:H1
DCOVA
Chap 11-8Copyright ©2012 Pearson Education, Inc. publishing as Prentice Hall Chap 11-8
One-Way ANOVA
The Null Hypothesis is TrueAll Means are the same:
(No Factor Effect)
c3210 μμμμ:H same the are μ all Not:H j1
321 μμμ
DCOVA
Chap 11-9Copyright ©2012 Pearson Education, Inc. publishing as Prentice Hall Chap 11-9
One-Way ANOVA
The Null Hypothesis is NOT true At least one of the means is different
(Factor Effect is present)
c3210 μμμμ:H same the are μ all Not:H j1
321 μμμ 321 μμμ
or
(continued)
DCOVA
Chap 11-10Copyright ©2012 Pearson Education, Inc. publishing as Prentice Hall Chap 11-10
Partitioning the Variation
Total variation can be split into two parts:
SST = Total Sum of Squares (Total variation)
SSA = Sum of Squares Among Groups (Among-group variation)
SSW = Sum of Squares Within Groups (Within-group variation)
SST = SSA + SSW
DCOVA
Chap 11-11Copyright ©2012 Pearson Education, Inc. publishing as Prentice Hall Chap 11-11
Partitioning the Variation
Total Variation = the aggregate variation of the individual data values across the various factor levels (SST)
Within-Group Variation = variation that exists among the data values within a particular factor level (SSW)
Among-Group Variation = variation among the factor sample means (SSA)
SST = SSA + SSW
(continued)
DCOVA
Chap 11-12Copyright ©2012 Pearson Education, Inc. publishing as Prentice Hall Chap 11-12
Partition of Total Variation
Variation Due to Factor (SSA)
Variation Due to Random Error (SSW)
Total Variation (SST)
= +
DCOVA
Chap 11-13Copyright ©2012 Pearson Education, Inc. publishing as Prentice Hall Chap 11-13
Total Sum of Squares
c
j
n
iij
j
XXSST1 1
2)(Where:
SST = Total sum of squares
c = number of groups or levels
nj = number of observations in group j
Xij = ith observation from group j
X = grand mean (mean of all data values)
SST = SSA + SSW
DCOVA
Chap 11-14Copyright ©2012 Pearson Education, Inc. publishing as Prentice Hall Chap 11-14
Total Variation
Group 1 Group 2 Group 3
Response, X
X
2212
211 )()()( XXXXXXSST
ccn
(continued)
DCOVA
Chap 11-15Copyright ©2012 Pearson Education, Inc. publishing as Prentice Hall Chap 11-15
Among-Group Variation
Where:
SSA = Sum of squares among groups
c = number of groups
nj = sample size from group j
Xj = sample mean from group j
X = grand mean (mean of all data values)
2
1
)( XXnSSA j
c
jj
SST = SSA + SSW
DCOVA
Chap 11-16Copyright ©2012 Pearson Education, Inc. publishing as Prentice Hall Chap 11-16
Among-Group Variation
Variation Due to Differences Among Groups
i j
2
1
)( XXnSSA j
c
jj
1
c
SSAMSA
Mean Square Among =
SSA/degrees of freedom
(continued)
DCOVA
Chap 11-17Copyright ©2012 Pearson Education, Inc. publishing as Prentice Hall Chap 11-17
Among-Group Variation
Group 1 Group 2 Group 3
Response, X
X1X
2X
2222
211 )()()( XXnXXnXXnSSA cc
(continued)
3X
DCOVA
Chap 11-18Copyright ©2012 Pearson Education, Inc. publishing as Prentice Hall Chap 11-18
Within-Group Variation
Where:
SSW = Sum of squares within groups
c = number of groups
nj = sample size from group j
Xj = sample mean from group j
Xij = ith observation in group j
2
11
)( jij
n
i
c
j
XXSSWj
SST = SSA + SSW
DCOVA
Chap 11-19Copyright ©2012 Pearson Education, Inc. publishing as Prentice Hall Chap 11-19
Within-Group Variation
Summing the variation within each group and then adding over all groups cn
SSWMSW
Mean Square Within =
SSW/degrees of freedom
2
11
)( jij
n
i
c
j
XXSSWj
(continued)
jμ
DCOVA
Chap 11-20Copyright ©2012 Pearson Education, Inc. publishing as Prentice Hall Chap 11-20
Within-Group Variation
Group 1 Group 2 Group 3
Response, X
1X2X
3X
22212
2111 )()()( ccn XXXXXXSSW
c
(continued)
DCOVA
Chap 11-21Copyright ©2012 Pearson Education, Inc. publishing as Prentice Hall Chap 11-21
Obtaining the Mean Squares
cn
SSWMSW
1
c
SSAMSA
1
n
SSTMST
The Mean Squares are obtained by dividing the various sum of squares by their associated degrees of freedom
Mean Square Among(d.f. = c-1)
Mean Square Within(d.f. = n-c)
Mean Square Total(d.f. = n-1)
DCOVA
Chap 11-22Copyright ©2012 Pearson Education, Inc. publishing as Prentice Hall Chap 11-22
One-Way ANOVA Table
Source of Variation
Sum OfSquares
Degrees ofFreedom
Mean Square(Variance)
Among Groups
c - 1 MSA =
Within Groups
SSWn - c MSW =
Total SSTn – 1
SSA
MSA
MSW
F
c = number of groupsn = sum of the sample sizes from all groupsdf = degrees of freedom
SSA
c - 1
SSW
n - c
FSTAT =
DCOVA
Chap 11-23Copyright ©2012 Pearson Education, Inc. publishing as Prentice Hall Chap 11-23
One-Way ANOVAF Test Statistic
Test statistic
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)
MSW
MSAFSTAT
H0: μ1= μ2 = … = μc
H1: At least two population means are different
DCOVA
Chap 11-24Copyright ©2012 Pearson Education, Inc. publishing as Prentice Hall Chap 11-24
Interpreting One-Way ANOVA F Statistic
The F statistic is the ratio of the among estimate of variance and the within estimate of variance The ratio must always be positive df1 = c -1 will typically be small df2 = n - c will typically be large
Decision Rule: Reject H0 if FSTAT > Fα,
otherwise do not reject H0
0
Reject H0Do not reject H0
Fα
DCOVA
Chap 11-25Copyright ©2012 Pearson Education, Inc. publishing as Prentice Hall Chap 11-25
One-Way ANOVA F Test Example
You want to see if when three different golf clubs are used, they hit the ball 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 Club 2 Club 3254 234 200263 218 222241 235 197237 227 206251 216 204
DCOVA
Chap 11-26Copyright ©2012 Pearson Education, Inc. publishing as Prentice Hall Chap 11-26
••••
•
One-Way ANOVA Example: Scatter Plot
270
260
250
240
230
220
210
200
190
••
•••
•••••
Distance
1X
2X
3X
X
227.0 X
205.8 X 226.0X 249.2X 321
Club 1 Club 2 Club 3254 234 200263 218 222241 235 197237 227 206251 216 204
Club1 2 3
DCOVA
Chap 11-27Copyright ©2012 Pearson Education, Inc. publishing as Prentice Hall Chap 11-27
One-Way ANOVA Example Computations
Club 1 Club 2 Club 3254 234 200263 218 222241 235 197237 227 206251 216 204
X1 = 249.2
X2 = 226.0
X3 = 205.8
X = 227.0
n1 = 5
n2 = 5
n3 = 5
n = 15
c = 3
SSA = 5 (249.2 – 227)2 + 5 (226 – 227)2 + 5 (205.8 – 227)2 = 4,716.4
SSW = (254 – 249.2)2 + (263 – 249.2)2 +…+ (204 – 205.8)2 = 1,119.6
MSA = 4,716.4 / (3-1) = 2,358.2
MSW = 1,119.6 / (15-3) = 93.325.275
93.3
2,358.2FSTAT
DCOVA
Chap 11-28Copyright ©2012 Pearson Education, Inc. publishing as Prentice Hall Chap 11-28
FSTAT = 25.275
One-Way ANOVA Example Solution
H0: μ1 = μ2 = μ3
H1: μj not all equal
= 0.05
df1= 2 df2 = 12
Test Statistic:
Decision:
Conclusion:Reject H0 at = 0.05
There is evidence that at least one μj differs from the rest
0
= .05
Fα = 3.89Reject H0Do not
reject H0
25.27593.3
2358.2FSTAT
MSW
MSA
Critical Value:
Fα = 3.89
DCOVA
Chap 11-29Copyright ©2012 Pearson Education, Inc. publishing as Prentice Hall Chap 11-29
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 Variation
SS df MS F P-value F crit
Between Groups
4716.4 2 2358.2 25.275 4.99E-05 3.89
Within Groups
1119.6 12 93.3
Total 5836.0 14
One-Way ANOVA Excel Output DCOVA
Chap 11-30Copyright ©2012 Pearson Education, Inc. publishing as Prentice Hall
One-Way ANOVA Minitab Output
Chap 11-30
One-way ANOVA: Distance versus Club
Source DF SS MS F PClub 2 4716.4 2358.2 25.28 0.000Error 12 1119.6 93.3Total 14 5836.0
S = 9.659 R-Sq = 80.82% R-Sq(adj) = 77.62%
Individual 95% CIs For Mean Based on Pooled StDev
Level N Mean StDev -------+---------+---------+---------+--1 5 249.20 10.40 (-----*-----)2 5 226.00 8.80 (-----*-----)3 5 205.80 9.71 (-----*-----) -------+---------+---------+---------+-- 208 224 240 256Pooled StDev = 9.66
DCOVA
Chap 11-31Copyright ©2012 Pearson Education, Inc. publishing as Prentice Hall Chap 11-31
The Tukey-Kramer Procedure
Tells which population means are significantly different e.g.: μ1 = μ2 μ3
Done after rejection of equal means in ANOVA Allows paired comparisons
Compare absolute mean differences with critical range
xμ1 = μ 2
μ3
DCOVA
Chap 11-32Copyright ©2012 Pearson Education, Inc. publishing as Prentice Hall Chap 11-32
Tukey-Kramer Critical Range
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’
j'jα nn
MSWQangeCritical R
11
2
DCOVA
Chap 11-33Copyright ©2012 Pearson Education, Inc. publishing as Prentice Hall Chap 11-33
The Tukey-Kramer Procedure: Example
1. Compute absolute mean differences:Club 1 Club 2 Club 3
254 234 200263 218 222241 235 197237 227 206251 216 204 20.2205.8226.0xx
43.4205.8249.2xx
23.2226.0249.2xx
32
31
21
2. Find the Qα value from the table in appendix E.7 with c = 3 and (n – c) = (15 – 3) = 12 degrees of freedom:
3.77Q α
DCOVA
Chap 11-34Copyright ©2012 Pearson Education, Inc. publishing as Prentice Hall Chap 11-34
The Tukey-Kramer Procedure: Example
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. Thus, with 95% confidence we can conclude that the mean distance for club 1 is greater than club 2 and 3, and club 2 is greater than club 3.
285165
1
5
1
2
393773
11
2.
..
nn
MSWQangeCritical R
j'jα
3. Compute Critical Range:
20.2xx
43.4xx
23.2xx
32
31
21
4. Compare:
(continued)
DCOVA
Chap 11-35Copyright ©2012 Pearson Education, Inc. publishing as Prentice Hall Chap 11-35
ANOVA Assumptions
Randomness and Independence Select random samples from the c groups (or
randomly assign the levels) Normality
The sample values for each group are from a normal population
Homogeneity of Variance All populations sampled from have the same
variance Can be tested with Levene’s Test
DCOVA
Chap 11-36Copyright ©2012 Pearson Education, Inc. publishing as Prentice Hall Chap 11-36
ANOVA AssumptionsLevene’s Test
Tests the assumption that the variances of each population are equal.
First, define the null and alternative hypotheses: H0: σ2
1 = σ22 = …=σ2
c
H1: Not all σ2j are equal
Second, compute the absolute value of the difference between each value and the median of each group.
Third, perform a one-way ANOVA on these absolute differences.
DCOVA
Chap 11-37Copyright ©2012 Pearson Education, Inc. publishing as Prentice Hall Chap 11-37
Levene Homogeneity Of Variance Test Example
Calculate Medians
Club 1 Club 2 Club 3
237 216 197
241 218 200
251 227 204 Median
254 234 206
263 235 222
Calculate Absolute Differences
Club 1 Club 2 Club 3
14 11 7
10 9 4
0 0 0
3 7 2
12 8 18
H0: σ21 = σ2
2 = σ23
H1: Not all σ2j are equal
DCOVA
Chap 11-38Copyright ©2012 Pearson Education, Inc. publishing as Prentice Hall Chap 11-38
Levene Homogeneity Of Variance Test Example (Excel) (continued)
Anova: Single Factor
SUMMARY
Groups Count Sum Average Variance
Club 1 5 39 7.8 36.2
Club 2 5 35 7 17.5
Club 3 5 31 6.2 50.2
Source of Variation SS df MS FP-
value F crit
Between Groups 6.4 2 3.2 0.092 0.912 3.885
Within Groups 415.6 12 34.6
Total 422 14
Since the p-value is greater than 0.05 there is insufficient evidence of a difference in the variances
DCOVA
Chap 11-39Copyright ©2012 Pearson Education, Inc. publishing as Prentice Hall
Levene Homogeneity Of Variance Test Example (Minitab)
Chap 11-39
(continued)DCOVA
One-way ANOVA: Abs. Diff versus Club
Source DF SS MS F PClub 2 6.4 3.2 0.09 0.912Error 12 415.6 34.6Total 14 422.0
S = 5.885 R-Sq = 1.52% R-Sq(adj) = 0.00%
Individual 95% CIs For Mean Based on Pooled StDev
Level N Mean StDev ---------+---------+---------+---------+1 5 7.800 6.017 (---------------*----------------)2 5 7.000 4.183 (---------------*---------------)3 5 6.200 7.085 (----------------*---------------) ---------+---------+---------+---------+ 3.5 7.0 10.5 14.0
Pooled StDev = 5.885
Since the p-value is greater than 0.05 there is insufficient evidence of a difference in the variances
Chap 11-40Copyright ©2012 Pearson Education, Inc. publishing as Prentice Hall
The Randomized Block Design
Like One-Way ANOVA, we test for equal population means (for different factor levels, for example)...
...but we want to control for possible variation from a second factor (with two or more levels)
Levels of the secondary factor are called blocks
DCOVA
Chap 11-41Copyright ©2012 Pearson Education, Inc. publishing as Prentice Hall
Partitioning the Variation
Total variation can now be split into three parts:
SST = Total variationSSA = Among-Group variationSSBL = Among-Block variationSSE = Random variation
SST = SSA + SSBL + SSE
DCOVA
Chap 11-42Copyright ©2012 Pearson Education, Inc. publishing as Prentice Hall
Sum of Squares for Blocks
Where:
c = number of groups
r = number of blocks
Xi. = mean of all values in block i
X = grand mean (mean of all data values)
r
i
i. )XX(cSSBL1
2
SST = SSA + SSBL + SSE
DCOVA
Chap 11-43Copyright ©2012 Pearson Education, Inc. publishing as Prentice Hall
Partitioning the Variation
Total variation can now be split into three parts:
SST and SSA are computed as they were in One-Way ANOVA
SST = SSA + SSBL + SSE
SSE = SST – (SSA + SSBL)
DCOVA
Chap 11-44Copyright ©2012 Pearson Education, Inc. publishing as Prentice Hall
Mean Squares
1cgroups among square Mean
SSAMSA
1rblocking square Mean
SSBLMSBL
)1)(1(error square Mean
cr
SSEMSE
DCOVA
Chap 11-45Copyright ©2012 Pearson Education, Inc. publishing as Prentice Hall
Randomized Block ANOVA Table
Source of Variation
dfSS MS
Among Blocks
SSBL MSBL
Error (r–1)(c-1)SSE MSE
Total rc - 1SST
r - 1 MSBL
MSE
F
c = number of populations rc = total number of observationsr = number of blocks df = degrees of freedom
Among Groups SSA c - 1 MSA
MSA
MSE
DCOVA
Chap 11-46Copyright ©2012 Pearson Education, Inc. publishing as Prentice Hall
Main Factor test: df1 = c – 1
df2 = (r – 1)(c – 1)
MSA
MSE
c..3.2.10 μμμμ:H
equal are means population allNot :H1
FSTAT =
Reject H0 if FSTAT > Fα
Testing For Factor EffectDCOVA
Chap 11-47Copyright ©2012 Pearson Education, Inc. publishing as Prentice Hall
Test For Block Effect
Blocking test: df1 = r – 1
df2 = (r – 1)(c – 1)
MSBL
MSE
r.3.2.1.0 ...:H μμμμ
equal are means block all Not:H1
FSTAT =
Reject H0 if FSTAT > Fα
DCOVA
Chap 11-48Copyright ©2012 Pearson Education, Inc. publishing as Prentice Hall
Randomized Block Design Example
Chap 11-48
RESTAURANTS
RATERS A B C D Totals Means
1 70 61 82 74 287 71.75
2 77 75 88 76 316 79.00
3 76 67 90 80 313 78.25
4 80 63 96 76 315 78.75
5 84 66 92 84 326 81.50
6 78 68 98 86 330 82.50
Totals 465 400 546 476 1,887
Means 77.50 66.67 91.00 79.33 78.625
Ratings at Four Restaurants of a Fast-Food Chain
Raters are the blocksso r = 6.
Restaurants are thegroups of interest soc = 4.
n = rc = 24
1 1 1,88778.625
24
c r
ijj i
X
Xrc
DCOVA
Chap 11-49Copyright ©2012 Pearson Education, Inc. publishing as Prentice Hall
Hypothesis Tests For This Example
Chap 11-49
DCOVA
To decide whether there is a difference in average ratingamong the restaurants:
H0: μA= μB= μC= μD vs H1: At least one of the μ’s is different
To decide whether there is a difference in average ratingamong the raters and the blocking has reduced error:
H0: μ1= μ2= μ3= μ4 = μ5= μ6 vsH1: At least one of the μ’s is different
Chap 11-50Copyright ©2012 Pearson Education, Inc. publishing as Prentice Hall
ANOVA Output From Excel
Chap 11-50
DCOVA
Do the restaurants differ inaverage rating?
Since the p-value (0.0000) <0.05 conclude there is adifference in avg. rating.
Do the raters differ in averagerating?
Since the p-value (0.0205) <0.05 conclude there is adifference in the avg. rating ofraters. This indicates theblocking has reduced error.
Chap 11-51Copyright ©2012 Pearson Education, Inc. publishing as Prentice Hall
ANOVA Output From Minitab
Chap 11-51
DCOVA
Do the restaurants differ inaverage rating?
Since the p-value (0.0000) <0.05 conclude there is adifference in avg. rating.
Do the raters differ in averagerating?
Since the p-value (0.0205) <0.05 conclude there is adifference in the avg. rating ofraters. This indicates theblocking has reduced error.
Chap 11-52Copyright ©2012 Pearson Education, Inc. publishing as Prentice Hall Chap 11-52
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 at which level the line speed is set?
DCOVA
Chap 11-53Copyright ©2012 Pearson Education, Inc. publishing as Prentice Hall Chap 11-53
Two-Way ANOVA
Assumptions
Populations are normally distributed Populations have equal variances Independent random samples are
drawn
(continued)
DCOVA
Chap 11-54Copyright ©2012 Pearson Education, Inc. publishing as Prentice Hall Chap 11-54
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 cellsn = (r)(c)(n’)
Xijk = value of the kth observation of level i of factor A and level j of factor B
DCOVA
Chap 11-55Copyright ©2012 Pearson Education, Inc. publishing as Prentice Hall Chap 11-55
Two-Way ANOVA Sources of Variation
SSTTotal Variation
SSAFactor A Variation
SSBFactor B Variation
SSABVariation due to interaction
between A and B
SSERandom variation (Error)
Degrees of Freedom:
r – 1
c – 1
(r – 1)(c – 1)
rc(n’ – 1)
n - 1
SST = SSA + SSB + SSAB + SSE
(continued)
DCOVA
Chap 11-56Copyright ©2012 Pearson Education, Inc. publishing as Prentice Hall Chap 11-56
Two-Way ANOVA Equations
r
i
c
j
n
kijk XXSST
1 1 1
2)(
2
1
.. )( XXncSSAr
i
i
2
1
.. )( XXnrSSBc
j
j
Total Variation:
Factor A Variation:
Factor B Variation:
DCOVA
Chap 11-57Copyright ©2012 Pearson Education, Inc. publishing as Prentice Hall Chap 11-57
Two-Way ANOVA Equations
2r
1i
c
1j
.j.i..ij. )XXXX(n
SSAB
r
i
c
j
n
k
ijijk XXSSE1 1 1
2. )(
Interaction Variation:
Sum of Squares Error:
(continued)
DCOVA
Chap 11-58Copyright ©2012 Pearson Education, Inc. publishing as Prentice Hall Chap 11-58
Two-Way ANOVA Equations
where:Mean Grand
nrc
X
X
r
1i
c
1j
n
1kijk
r) ..., 2, 1, (i A factor of level i of Meannc
X
X th
c
1j
n
1kijk
..i
c) ..., 2, 1, (j B factor of level j of Meannr
XX th
r
1i
n
1kijk
.j.
ij cell of Meann
XX
n
1k
ijk.ij
r = number of levels of factor A
c = number of levels of factor B
n’ = number of replications in each cell
(continued)
DCOVA
Chap 11-59Copyright ©2012 Pearson Education, Inc. publishing as Prentice Hall Chap 11-59
Mean Square Calculations
1factor A square Mean
r
SSAMSA
1Bfactor square Mean
c
SSBMSB
)1)(1(ninteractio square Mean
cr
SSABMSAB
)1'(error square Mean
nrc
SSEMSE
DCOVA
Chap 11-60Copyright ©2012 Pearson Education, Inc. publishing as Prentice Hall Chap 11-60
Two-Way ANOVA:The F Test Statistics
F Test for Factor B Effect
F Test for Interaction Effect
H0: μ1..= μ2.. = μ3..= • • = µr..
H1: Not all μi.. are equal
H0: the interaction of A and B is equal to zero
H1: interaction of A and B is not zero
F Test for Factor A Effect
H0: μ.1. = μ.2. = μ.3.= • • = µ.c.
H1: Not all μ.j. are equal
Reject H0 if
FSTAT > FαMSE
MSAFSTAT
MSE
MSBFSTAT
MSE
MSABFSTAT
Reject H0 if
FSTAT > Fα
Reject H0 if
FSTAT > Fα
DCOVA
Chap 11-61Copyright ©2012 Pearson Education, Inc. publishing as Prentice Hall Chap 11-61
Two-Way ANOVASummary Table
Source ofVariation
Degrees Of
Freedom
Sum of Squares
Mean Squares F
Factor A r – 1 SSAMSA
= SSA /(r – 1)MSAMSE
Factor B c - 1 SSBMSB
= SSB /(c – 1)MSBMSE
AB(Interaction) (r–1)(c-1) SSAB
MSAB= SSAB / (r – 1)(c – 1)
MSABMSE
Error rc(n’ – 1) SSEMSE =
SSE/rc(n’ – 1)
Total n - 1 SST
DCOVA
Chap 11-62Copyright ©2012 Pearson Education, Inc. publishing as Prentice Hall Chap 11-62
Features of Two-Way ANOVA F Test
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 = SSA + SSB + SSAB + SSE
Total = factor A + factor B + interaction + error
DCOVA
Chap 11-63Copyright ©2012 Pearson Education, Inc. publishing as Prentice Hall Chap 11-63
Examples:Interaction vs. No Interaction
No interaction: line segments are parallel
Factor B Level 1
Factor B Level 3
Factor B Level 2
Factor A Levels
Factor B Level 1
Factor B Level 3
Factor B Level 2
Factor A Levels
Mea
n R
espo
nse
Mea
n R
espo
nse
Interaction is present: some line segments not parallel
DCOVA
Chap 11-64Copyright ©2012 Pearson Education, Inc. publishing as Prentice Hall Chap 11-64
Multiple Comparisons: The Tukey Procedure
Unless there is a significant interaction, you can determine the levels that are significantly different using the Tukey procedure
Consider all absolute mean differences and compare to the calculated critical range
Example: Absolute differences
for factor A, assuming three levels:
3..2..
3..1..
2..1..
XX
XX
XX
DCOVA
Chap 11-65Copyright ©2012 Pearson Education, Inc. publishing as Prentice Hall Chap 11-65
Multiple Comparisons: The Tukey Procedure
Critical Range for Factor A:
(where Qα is from Table E.7 with r and rc(n’–1) d.f.)
Critical Range for Factor B:
(where Qα is from Table E.7 with c and rc(n’–1) d.f.)
n'cRange Critical
MSEQ
n'rRange Critical
MSEQ
DCOVA
Chap 11-66Copyright ©2012 Pearson Education, Inc. publishing as Prentice Hall
Do ACT Prep Course Type & Length Impact Average ACT Scores
Chap 11-66
DCOVA
LENGTH OF COURSE
TYPE OF COURSE Condensed Regular
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
ACT Scores for Different Types and Lengths of Courses
Chap 11-67Copyright ©2012 Pearson Education, Inc. publishing as Prentice Hall
Plotting Cell Means Shows A Strong Interaction
Chap 11-67
DCOVA
Nonparallel lines indicatethe effect of condensingthe course depends onwhether the course istaught in the traditionalclassroom or by onlinedistance learning
The online course yields higher scores when condensed while the traditional course yields higher scores when not condensed (regular).
Chap 11-68Copyright ©2012 Pearson Education, Inc. publishing as Prentice Hall
Excel Analysis Of ACT Prep Course Data
Chap 11-68
DCOVA
The interaction between courselength & type is significantbecause its p-value is 0.0000.
While the p-values associatedwith both course length & course type are not significant,because the interaction issignificant you cannot directlyconclude they have no effect.
Chap 11-69Copyright ©2012 Pearson Education, Inc. publishing as Prentice Hall
Minitab Analysis Of ACT Prep Course Data
Chap 11-69
DCOVAThe interaction between courselength & type is significantbecause its p-value is 0.0000.
While the p-values associatedwith both course length & course type are not significant,because the interaction issignificant you cannot directlyconclude they have no effect.
Chap 11-70Copyright ©2012 Pearson Education, Inc. publishing as Prentice Hall
With The Significant Interaction Collapse The Data Into Four Groups
After collapsing into four groups do a one way ANOVA
The four groups are1. Traditional course condensed
2. Traditional course regular length
3. Online course condensed
4. Online course regular length
Chap 11-70
DCOVA
Chap 11-71Copyright ©2012 Pearson Education, Inc. publishing as Prentice Hall
Excel Analysis Of Collapsed Data
Chap 11-71
DCOVA
Group is a significant effect.p-value of 0.0003 < 0.05
1. Traditional regular > Traditional condensed2. Online condensed > Traditional condensed3. Traditional regular > Online regular4. Online condensed > Online regular
If the course is take online should use thecondensed version and if the course is takenby traditional method should use the regular.
Chap 11-72Copyright ©2012 Pearson Education, Inc. publishing as Prentice Hall
Minitab Analysis Of Collapsed Data Shows Same Conclusions
Chap 11-72
DCOVA
Chap 11-73Copyright ©2012 Pearson Education, Inc. publishing as Prentice Hall Chap 11-73
Chapter Summary
Described one-way analysis of variance The logic of ANOVA ANOVA assumptions F test for difference in c means The Tukey-Kramer procedure for multiple comparisons The Levene test for homogeneity of variance
Examined the basic structure and use of a randomized block design
Described two-way analysis of variance Examined effects of multiple factors Examined interaction between factors