Statistics for Managers
Using Microsoft® Excel
5th Edition
Chapter 11
Statistics for Managers Using Microsoft Excel, 5e © 2008 Prentice-Hall, Inc. Chap 11-2
Learning Objectives
In this chapter, you learn:
The basic concepts of experimental design
How to use the one-way analysis of variance
to test for differences among the means of
several groups
How to use the two-way analysis of variance
Chapter Overview
Analysis of Variance (ANOVA)
F-test
Tukey-Kramer
test
One-Way
ANOVA
Two-Way
ANOVA
Statistics for Managers Using Microsoft Excel, 5e © 2008 Prentice-Hall, Inc. 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 the groups as populations
Observe effects on the dependent variable
Are the groups the same?
Experimental design: the plan used to collect the
Completely Randomized
Design
Experimental units (subjects) are assigned
randomly to the different levels (groups)
Subjects are assumed homogeneous
Only one factor or independent variable
With two or more levels (groups)
Analyzed by one-factor analysis of variance
Statistics for Managers Using Microsoft Excel, 5e © 2008 Prentice-Hall, Inc. 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
Hypotheses: One-Way ANOVA
All population means are equal
i.e., no treatment effect (no variation in means among groups)
At least one population mean is different
i.e., there is a treatment (groups) effect
Does not mean that all population means are different (at
least one of the means is different from the others)
Statistics for Managers Using Microsoft Excel, 5e © 2008 Prentice-Hall, Inc. Chap 11-8
Hypotheses: One-Way
ANOVA
All Means are the same:
The Null Hypothesis is True
(No Group Effect)
c
3
2
1
0
:
μ
μ
μ
μ
H
same
the
are
μ
all
Not
:
H
1
j
3
2
1
μ
μ
Hypotheses: One-Way
ANOVA
At least one mean is different:
The Null Hypothesis is NOT true
(Treatment Effect is present)
c
3
2
1
0
:
μ
μ
μ
μ
H
same
the
are
μ
all
Not
:
H
1
j
3
2
1
μ
μ
μ
μ
1
μ
2
μ
3
Statistics for Managers Using Microsoft Excel, 5e © 2008 Prentice-Hall, Inc. 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)
Partitioning the Variation
Total Variation = the aggregate dispersion of the individual data
values around the overall (grand) mean of all factor levels (SST)
Within-Group Variation = dispersion that exists among the data
values within the particular factor levels (SSW)
Among-Group Variation = dispersion between the factor
sample means (SSA)
Statistics for Managers Using Microsoft Excel, 5e © 2008 Prentice-Hall, Inc. Chap 11-12
Partitioning the Variation
Among Group
Variation (SSA)
Within Group Variation
(SSW)
Total Variation (SST)
The Total Sum of Squares
SST = Total sum of squares
c = number of groups
n
j
= number of values in group j
X
ij
= i
th
value from group j
X = grand mean (mean of all data values)
Statistics for Managers Using Microsoft Excel, 5e © 2008 Prentice-Hall, Inc. Chap 11-14
The Total Sum of Squares
Among-Group Variation
Where:
SSA = Sum of squares among groups
c = number of groups
n
j
= sample size from group j
X
j
= sample mean from group j
X = grand mean (mean of all data values)
2
1
)
(
X
X
n
SSA
c
j
j
j
Statistics for Managers Using Microsoft Excel, 5e © 2008 Prentice-Hall, Inc. Chap 11-16
Among-Group Variation
2
j
c
1
j
j
(
X
X
)
n
SSA
2
c
c
2
2
2
2
1
1
(
X
X
)
n
(
X
X
)
...
n
(
X
X
)
n
SSA
Within-Group Variation
Where:
SSW = Sum of squares within groups
c = number of groups
Statistics for Managers Using Microsoft Excel, 5e © 2008 Prentice-Hall, Inc. Chap 11-18
Within-Group Variation
Obtaining the Mean Squares
c
n
SSW
MSW
1
c
SSA
MSA
1
n
SST
MST
Mean Squares Among
Mean Squares Within
Statistics for Managers Using Microsoft Excel, 5e © 2008 Prentice-Hall, Inc. Chap 11-20
One-Way ANOVA Table
Source of
Variation
df
SS
MS
(Variance)
F-Ratio
Among
Groups
c-1
SSA
MSA
Within
Groups
n-c
SSW
MSW
Total
n-1
SST =
SSA+SSW
c = number of groups
n = sum of the sample sizes from all groups
df = degrees of freedom
One-Way ANOVA
Test Statistic
Test statistic
MSA
is mean squares among variances
MSW
is mean squares within variances
Degrees of freedom
df
1
= c – 1 (c = number of groups)
df
2
= n – c (n = sum of all sample sizes)
MSW
MSA
F
H
0
: μ
1
= μ
2
= …
= μ
c
Statistics for Managers Using Microsoft Excel, 5e © 2008 Prentice-Hall, Inc. Chap 11-22
One-Way ANOVA
Test Statistic
The F statistic is the ratio of the among variance to the
within variance
The ratio must always be positive
df
1
=
c
-1 will typically be small
df
2
=
n
-
c
will typically be large
Decision Rule:
Reject H
0
if F > F
U
,
otherwise do not reject H
0
0
= .05
Reject H
0Do not
reject H
0F
One-Way ANOVA
Example
Club 1
Club 2 Club 3
254
234 200
263
218 222
241
235 197
237
227 206
251
216 204
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
Statistics for Managers Using Microsoft Excel, 5e © 2008 Prentice-Hall, Inc. Chap 11-24
One-Way ANOVA
Example
X
1
= 249.2
X
2
= 226.0
X
3
= 205.8
X = 227.0
n
1
= 5
n
2
= 5
n
3
= 5
n = 15
c = 3
SSA = 5 (249.2 – 227)
2
+ 5 (226 – 227)
2
+ 5 (205.8 – 227)
2
= 4716.4
Statistics for Managers Using Microsoft Excel, 5e © 2008 Prentice-Hall, Inc. Chap 11-26
One-Way ANOVA
Example
MSA = 4716.4 / (3-1) = 2358.2
MSW = 1119.6 / (15-3) = 93.3
93.3
25.275
2358.2
F
F
= 25.275
0
= .05
F
U
= 3.89
Reject H
0Do not
reject H
0Critical
Value:
One-Way ANOVA
Example
H
0
: μ
1
= μ
2
= μ
3
H
1
: μ
j
not all equal
= .05
df
1
= 2 df
2
= 12
Decision:
Reject H
0
at α = 0.05
Conclusion: There is
evidence that at least one
Statistics for Managers Using Microsoft Excel, 5e © 2008 Prentice-Hall, Inc. Chap 11-28
One-Way ANOVA in Excel
EXCEL:
single
factor
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
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 pair-wise comparisons
Compare absolute mean differences with critical
range
x
Statistics for Managers Using Microsoft Excel, 5e © 2008 Prentice-Hall, Inc. Chap 11-30
Tukey-Kramer Critical Range
where:
Q
U
= Value from Studentized Range Distribution with c
and n - c degrees of freedom for the desired level
of
(see appendix E.9 table)
MSW = Mean Square Within
n
j
and n
j’
= Sample sizes from groups j and j’
The Tukey-Kramer Procedure
1. Compute absolute mean differences:
Statistics for Managers Using Microsoft Excel, 5e © 2008 Prentice-Hall, Inc. Chap 11-32
The Tukey-Kramer Procedure
5. All of the absolute mean differences are greater than
critical range. Therefore there is a significant difference
between each pair of means at the 5% level of significance.
16.285
3. Compute Critical Range:
20.2
ANOVA Assumptions
Randomness and Independence
Select random samples from the c groups (or
randomly assign the levels)
Normality
The sample values from each group are from a
normal population
Homogeneity of Variance
Statistics for Managers Using Microsoft Excel, 5e © 2008 Prentice-Hall, Inc. Chap 11-34
ANOVA Assumptions
Levene’s Test
Tests the assumption that the variances of each
group are equal.
First, define the null and alternative hypotheses:
H
0
: σ
21
= σ
22
= …=σ
2c
H
1
: 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
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
Statistics for Managers Using Microsoft Excel, 5e © 2008 Prentice-Hall, Inc. Chap 11-36
Two-Way ANOVA
Assumptions
Populations are normally distributed
Populations have equal variances
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 = rcn
/
)
Statistics for Managers Using Microsoft Excel, 5e © 2008 Prentice-Hall, Inc. Chap 11-38
Two-Way ANOVA
Sources of Variation
SST
Total Variation
SSA
Factor A Variation
SSB
Factor B Variation
SSAB
Variation due to interaction
between A and B
SSE
Random variation (Error)
Degrees of
Freedom:
r – 1
c – 1
(r – 1)(c – 1)
rc(n
/
– 1)
n - 1
Two-Way ANOVA
Total Variation:
Factor A Variation:
Statistics for Managers Using Microsoft Excel, 5e © 2008 Prentice-Hall, Inc. Chap 11-40
Two-Way ANOVA
Equations
Interaction Variation:
Two-Way ANOVA
Statistics for Managers Using Microsoft Excel, 5e © 2008 Prentice-Hall, Inc. Chap 11-42
Two-Way ANOVA
Equations
factor
of
Statistics for Managers Using Microsoft Excel, 5e © 2008 Prentice-Hall, Inc. Chap 11-44
Two-Way ANOVA:
The F Test Statistic
F Test for Factor B Effect
F Test for Interaction Effect
H
0
: μ
1..
= μ
2..
=
• • •
= μ
r..
H
1
: Not all μ
i..
are equal
H
0
: the interaction of A and B is
equal to zero
H
1
: interaction of A and B isn’t zero
F Test for Factor A Effect
Two-Way ANOVA:
Summary Table
Source of
Variation
Degrees of
Freedom
Squares
Sum of
Squares
Mean
Statistic
F
Factor A
r – 1
SSA
= SSA
MSA
/(r – 1)
MSA/
MSE
Factor B
c – 1
SSB
= SSB
MSB
/(c – 1)
MSB/
MSE
AB
(Interaction) (r – 1)(c – 1)
SSAB
MSAB
= SSAB
/ (r – 1)(c – 1)
MSAB/
MSE
Error
rc(n
’
– 1)
SSE
MSE
=
SSE/rc(n’ – 1)
Statistics for Managers Using Microsoft Excel, 5e © 2008 Prentice-Hall, Inc. Chap 11-46
Two-Way ANOVA:
Features
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 denominator of the F
Test is always the same
but the numerator is different
The sums of squares always add up
SST = SSE + SSA + SSB + SSAB
Two-Way ANOVA:
Interaction
No Significant Interaction:
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
M
Statistics for Managers Using Microsoft Excel, 5e © 2008 Prentice-Hall, Inc. Chap 11-48