Professional Documents
Culture Documents
Microsoft Excel
7th Edition
Chapter 11
Analysis of Variance
Statistics for Managers Using Microsoft Excel7e Copyright 2014 Pearson Education, Inc. Chap 11-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
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
Statistics for Managers Using Microsoft Excel7e Copyright 2014 Pearson Education, Inc. Chap 11-2
Chapter Overview
DCOVA
Analysis of Variance (ANOVA)
Randomized
One-Way Block Design Two-Way
ANOVA (On Line Topic) ANOVA
F-test
Tukey Multiple Interaction
Tukey- Comparisons Effects
Kramer
Multiple Tukey Multiple
Comparisons Comparisons
Levene Test
For
Homogeneity
of Variance
Statistics for Managers Using Microsoft Excel7e Copyright 2014 Pearson Education, Inc. Chap 11-3
General ANOVA Setting
DCOVA
population
Observe effects on the dependent variable
Are the groups the same?
Statistics for Managers Using Microsoft Excel7e Copyright 2014 Pearson Education, Inc. Chap 11-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)
Statistics for Managers Using Microsoft Excel7e Copyright 2014 Pearson Education, Inc. Chap 11-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
Statistics for Managers Using Microsoft Excel7e Copyright 2014 Pearson Education, Inc. Chap 11-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)
H1 : Not all of the population means are equal
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)
Statistics for Managers Using Microsoft Excel7e Copyright 2014 Pearson Education, Inc. Chap 11-7
One-Way ANOVA
DCOVA
H0 : 1 2 3 c
H1 : Not all j are equal
The Null Hypothesis is True
All Means are the same:
(No Factor Effect)
1 2 3
Statistics for Managers Using Microsoft Excel7e Copyright 2014 Pearson Education, Inc. Chap 11-8
One-Way ANOVA DCOVA
(continued)
H0 : 1 2 3 c
H1 : Not all j are equal
or
1 2 3 1 2 3
Statistics for Managers Using Microsoft Excel7e Copyright 2014 Pearson Education, Inc. Chap 11-9
Partitioning the Variation
DCOVA
Statistics for Managers Using Microsoft Excel7e Copyright 2014 Pearson Education, Inc. Chap 11-10
Partitioning the Variation
(continued)
DCOVA
SST = SSA + SSW
Statistics for Managers Using Microsoft Excel7e Copyright 2014 Pearson Education, Inc. Chap 11-11
Partition of Total Variation
DCOVA
Total Variation (SST)
Statistics for Managers Using Microsoft Excel7e Copyright 2014 Pearson Education, Inc. Chap 11-12
Total Sum of Squares
DCOVA
SST ( Xij X) 2
j1 i1
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
Statistics for Managers Using Microsoft Excel7e Copyright 2014 Pearson Education, Inc. Chap 11-14
Among-Group Variation
DCOVA
SSA
Variation Due to
Differences Among Groups MSA
c 1
Mean Square Among =
SSA/degrees of freedom
mi mj
Statistics for Managers Using Microsoft Excel7e Copyright 2014 Pearson Education, Inc. Chap 11-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
Statistics for Managers Using Microsoft Excel7e Copyright 2014 Pearson Education, Inc. Chap 11-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
Statistics for Managers Using Microsoft Excel7e Copyright 2014 Pearson Education, Inc. Chap 11-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
Statistics for Managers Using Microsoft Excel7e Copyright 2014 Pearson Education, Inc. Chap 11-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)
Statistics for Managers Using Microsoft Excel7e Copyright 2014 Pearson Education, Inc. Chap 11-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
Statistics for Managers Using Microsoft Excel7e Copyright 2014 Pearson Education, Inc. Chap 11-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)
Statistics for Managers Using Microsoft Excel7e Copyright 2014 Pearson Education, Inc. Chap 11-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
Statistics for Managers Using Microsoft Excel7e Copyright 2014 Pearson Education, Inc. Chap 11-24
One-Way ANOVA
F Test Example DCOVA
Statistics for Managers Using Microsoft Excel7e Copyright 2014 Pearson Education, Inc. Chap 11-25
One-Way ANOVA Example:
Scatter Plot DCOVA
Distance
270
Club 1 Club 2 Club 3
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
Statistics for Managers Using Microsoft Excel7e Copyright 2014 Pearson Education, Inc. Club Chap 11-26
One-Way ANOVA Example
Computations DCOVA
Statistics for Managers Using Microsoft Excel7e Copyright 2014 Pearson Education, Inc. Chap 11-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 H 0
at least one j differs
reject H0
FSTAT = 25.275 from the rest
F = 3.89
Statistics for Managers Using Microsoft Excel7e Copyright 2014 Pearson Education, Inc. Chap 11-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
Statistics for Managers Using Microsoft Excel7e Copyright 2014 Pearson Education, Inc. Chap 11-29
The Tukey-Kramer Procedure
DCOVA
1= 2 3 x
Statistics for Managers Using Microsoft Excel7e Copyright 2014 Pearson Education, Inc. Chap 11-30
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
Statistics for Managers Using Microsoft Excel7e Copyright 2014 Pearson Education, Inc. Chap 11-31
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
Statistics for Managers Using Microsoft Excel7e Copyright 2014 Pearson Education, Inc. Chap 11-32
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 x1 x 2 23.2
are greater than critical range.
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 can conclude
that the mean distance for club 1 is greater
than club 2 and 3, and club 2 is greater than
club 3.
Statistics for Managers Using Microsoft Excel7e Copyright 2014 Pearson Education, Inc. Chap 11-33
ANOVA Assumptions
DCOVA
Statistics for Managers Using Microsoft Excel7e Copyright 2014 Pearson Education, Inc. Chap 11-34
ANOVA Assumptions
Levenes Test
DCOVA
Statistics for Managers Using Microsoft Excel7e Copyright 2014 Pearson Education, Inc. Chap 11-35
Levene Homogeneity Of Variance
Test Example
DCOVA
H0: 21 = 22 = 23
H1: Not all 2j are equal
Statistics for Managers Using Microsoft Excel7e Copyright 2014 Pearson Education, Inc. Chap 11-36
Levene Homogeneity Of Variance
Test Example (continued)
Anova: Single Factor DCOVA
SUMMARY
Groups Count Sum Average Variance
Since the
Club 1 5 39 7.8 36.2 p-value is
Club 2 5 35 7 17.5 greater
Club 3 5 31 6.2 50.2 than 0.05
there is
P- insufficient
Source of Variation SS df MS F value F crit
evidence
Between Groups 6.4 2 3.2 0.092 0.912 3.885
of a
Within Groups 415.6 12 34.6 difference
in the
Total 422 14 variances
Statistics for Managers Using Microsoft Excel7e Copyright 2014 Pearson Education, Inc. Chap 11-37
Factorial Design:
Two-Way ANOVA DCOVA
Statistics for Managers Using Microsoft Excel7e Copyright 2014 Pearson Education, Inc. Chap 11-38
Two-Way ANOVA
(continued)
DCOVA
Assumptions
Statistics for Managers Using Microsoft Excel7e Copyright 2014 Pearson Education, Inc. Chap 11-39
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)
Statistics for Managers Using Microsoft Excel7e Copyright 2014 Pearson Education, Inc. Chap 11-41
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
Statistics for Managers Using Microsoft Excel7e Copyright 2014 Pearson Education, Inc. Chap 11-42
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
Statistics for Managers Using Microsoft Excel7e Copyright 2014 Pearson Education, Inc. Chap 11-43
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
Statistics for Managers Using Microsoft Excel7e Copyright 2014 Pearson Education, Inc. Chap 11-44
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)
Statistics for Managers Using Microsoft Excel7e Copyright 2014 Pearson Education, Inc. Chap 11-45
Two-Way ANOVA:
The F Test Statistics 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
Statistics for Managers Using Microsoft Excel7e Copyright 2014 Pearson Education, Inc. Chap 11-47
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
Statistics for Managers Using Microsoft Excel7e Copyright 2014 Pearson Education, Inc. Chap 11-48
Examples:
Interaction vs. No Interaction
DCOVA
Interaction is present:
No interaction: line some line segments
segments are parallel not 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 Excel7e Copyright 2014 Pearson Education, Inc. Chap 11-49
Do ACT Prep Course Type & 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
Statistics for Managers Using Microsoft Excel7e Copyright 2014 Pearson Education, Inc. Chap 11-50
Plotting Cell Means Shows A
Strong Interaction DCOVA
Statistics for Managers Using Microsoft Excel7e Copyright 2014 Pearson Education, Inc. Chap 11-51
Excel Analysis Of ACT Prep
Course Data DCOVA
Statistics for Managers Using Microsoft Excel7e Copyright 2014 Pearson Education, Inc. Chap 11-52
With The Significant Interaction
Collapse The Data Into Four Groups
DCOVA
After collapsing into four groups do a one way
ANOVA
Statistics for Managers Using Microsoft Excel7e Copyright 2014 Pearson Education, Inc. Chap 11-53
Excel Analysis Of Collapsed
Data
DCOVA
Statistics for Managers Using Microsoft Excel7e Copyright 2014 Pearson Education, Inc. Chap 11-55
Chapter Summary
In this chapter we discussed
The 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
The two-way analysis of variance
Examined effects of multiple factors
Examined interaction between factors
Statistics for Managers Using Microsoft Excel7e Copyright 2014 Pearson Education, Inc. Chap 11-56
Statistics for Managers Using
Microsoft Excel
7th Edition
Online Topic
Statistics for Managers Using Microsoft Excel7e Copyright 2014 Pearson Education, Inc. RBD - 1
Learning Objective
Statistics for Managers Using Microsoft Excel7e Copyright 2014 Pearson Education, Inc. RBD - 2
The Randomized Block Design
DCOVA
Statistics for Managers Using Microsoft Excel7e Copyright 2014 Pearson Education, Inc. RBD - 3
Partitioning the Variation
DCOVA
Statistics for Managers Using Microsoft Excel7e Copyright 2014 Pearson Education, Inc. RBD - 4
Sum of Squares for Blocks
DCOVA
r
SSBL c ( Xi. X) 2
i1
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)
Statistics for Managers Using Microsoft Excel7e Copyright 2014 Pearson Education, Inc. RBD - 5
Partitioning the Variation
DCOVA
Total variation can now be split into three parts:
Statistics for Managers Using Microsoft Excel7e Copyright 2014 Pearson Education, Inc. RBD - 6
Mean Squares
DCOVA
SSBL
MSBL Mean square blocking
r 1
SSA
MSA Mean square among groups
c 1
SSE
MSE Mean square error
(r 1)(c 1)
Statistics for Managers Using Microsoft Excel7e Copyright 2014 Pearson Education, Inc. RBD - 7
Randomized Block ANOVA Table
DCOVA
Source of SS df MS F
Variation
Among MSBL
Blocks SSBL r-1 MSBL
MSE
Among MSA
SSA c-1 MSA
Groups
MSE
Error SSE (r1)(c-1) MSE
Total SST rc - 1
c = number of populations rc = total number of observations
r = number of blocks df = degrees of freedom
Statistics for Managers Using Microsoft Excel7e Copyright 2014 Pearson Education, Inc. RBD - 8
Testing For Factor Effect
DCOVA
H 0 : .1 .2 .3 . c
H1 : Not all population means are equal
MSA
FSTAT =
MSE Main Factor test: df1 = c 1
df2 = (r 1)(c 1)
Statistics for Managers Using Microsoft Excel7e Copyright 2014 Pearson Education, Inc. RBD - 9
Test For Block Effect
DCOVA
H 0 : 1. 2. 3. ... r.
H1 : Not all block means are equal
MSBL
FSTAT =
MSE Blocking test: df1 = r 1
df2 = (r 1)(c 1)
Statistics for Managers Using Microsoft Excel7e Copyright 2014 Pearson Education, Inc. RBD - 10
Topic Summary
Statistics for Managers Using Microsoft Excel7e Copyright 2014 Pearson Education, Inc. RBD - 11
All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or
transmitted, in any form or by any means, electronic, mechanical, photocopying, recording, or
otherwise, without the prior written permission of the publisher.
Printed in the United States of America.
Statistics for Managers Using Microsoft Excel7e Copyright 2014 Pearson Education, Inc.