statistic
Basic Business Statistics, 10e © 2006 Prentice-Hall, Inc..
Chap 11-*
Chapter 11
Analysis of Variance (ANOVA)
Section 11.1 only
Basic Business Statistics
10th Edition
Basic Business Statistics, 10e © 2006 Prentice-Hall, Inc..
Basic Business Statistics, 10e © 2006 Prentice-Hall, Inc.
Chap 11-*
Learning Objectives
In this chapter, you learn:
- The basic concepts of experimental design
- How to use ANOVA to test for differences among the means of several populations
Basic Business Statistics, 10e © 2006 Prentice-Hall, Inc.
Basic Business Statistics, 10e © 2006 Prentice-Hall, Inc.
Chap 11-*
Chapter Overview
Analysis of Variance (ANOVA)
F-test
Tukey-
Kramer
test
One-Way
ANOVA
Two-Way
ANOVA
NOT COVERED IN MTH 305
Interaction
Effects
Randomized
Block Design
NOT COVERED IN MTH 305
Multiple
Comparisons
Basic Business Statistics, 10e © 2006 Prentice-Hall, Inc.
Basic Business Statistics, 10e © 2006 Prentice-Hall, Inc.
Chap 11-*
General ANOVA Setting
- One independent variable that is a categorical variable
- Called factor (or treatment variable)
- Each factor contains two or more levels (or groups or categories/classifications)
- Observe effects on the dependent variable that is numerical and continuous
Basic Business Statistics, 10e © 2006 Prentice-Hall, Inc.
Basic Business Statistics, 10e © 2006 Prentice-Hall, Inc.
Chap 11-*
Completely Randomized Design
- Experimental units (subjects) are assigned randomly to a group
- Ex)
- group 1: receive MILD medicine (treatment)
- group 2: receive STRONG medicine (treatment)
- group 3: receive No medicine (control group)
- Dependent variable is a numerical variable
- Ex: Effect of medicine on blood sugar levels
- Analyzed by one-way analysis of variance (ANOVA)
Basic Business Statistics, 10e © 2006 Prentice-Hall, Inc.
Basic Business Statistics, 10e © 2006 Prentice-Hall, Inc.
Chap 11-*
Analysis of Variance (ANOVA)
- 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
Basic Business Statistics, 10e © 2006 Prentice-Hall, Inc.
Basic Business Statistics, 10e © 2006 Prentice-Hall, Inc.
Chap 11-*
Hypotheses of 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 effect
- Does not mean that all population means are different (some pairs may be the same)
Basic Business Statistics, 10e © 2006 Prentice-Hall, Inc.
Basic Business Statistics, 10e © 2006 Prentice-Hall, Inc.
Chap 11-*
ANOVA
All Means are the same:
The Null Hypothesis is True
(No Treatment Effect)
Basic Business Statistics, 10e © 2006 Prentice-Hall, Inc.
Basic Business Statistics, 10e © 2006 Prentice-Hall, Inc.
Chap 11-*
ANOVA
At least one mean is different:
The Null Hypothesis is NOT true
(Treatment Effect is present)
or
(continued)
Basic Business Statistics, 10e © 2006 Prentice-Hall, Inc.
Basic Business Statistics, 10e © 2006 Prentice-Hall, Inc.
Chap 11-*
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
Basic Business Statistics, 10e © 2006 Prentice-Hall, Inc.
Basic Business Statistics, 10e © 2006 Prentice-Hall, Inc.
Chap 11-*
Partitioning the Variation
Total Variation = the aggregate dispersion of the individual data values across the various factor levels (SST)
Within-Group Variation = dispersion that exists among the data values within a particular factor level (SSW)
Among-Group Variation = dispersion between the factor sample means (SSA)
SST = SSA + SSW
(continued)
Basic Business Statistics, 10e © 2006 Prentice-Hall, Inc.
Basic Business Statistics, 10e © 2006 Prentice-Hall, Inc.
Chap 11-*
Partition of Total Variation
Variation Due to Factor (SSA)
Variation Due to Random Sampling (SSW)
Total Variation (SST)
Commonly referred to as:
Sum of Squares Within
Sum of Squares Error
Sum of Squares Unexplained
Within-Group Variation
Commonly referred to as:
Sum of Squares Between
Sum of Squares Among
Sum of Squares Explained
Among Groups Variation
=
+
d.f. = n – 1
d.f. = c – 1
d.f. = n – c
Basic Business Statistics, 10e © 2006 Prentice-Hall, Inc.
Basic Business Statistics, 10e © 2006 Prentice-Hall, Inc.
Chap 11-*
Total Sum of Squares
Where:
SST = Total sum of squares
c = number of groups (levels or treatments)
nj = number of observations in group j
Xij = ith observation from group j
X = grand mean (mean of all data values)
SST = SSA + SSW
Basic Business Statistics, 10e © 2006 Prentice-Hall, Inc.
Basic Business Statistics, 10e © 2006 Prentice-Hall, Inc.
Chap 11-*
Total Variation
(continued)
Basic Business Statistics, 10e © 2006 Prentice-Hall, Inc.
Basic Business Statistics, 10e © 2006 Prentice-Hall, Inc.
Chap 11-*
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)
SST = SSA + SSW
Basic Business Statistics, 10e © 2006 Prentice-Hall, Inc.
Basic Business Statistics, 10e © 2006 Prentice-Hall, Inc.
Chap 11-*
Among-Group Variation
Variation Due to
Differences Among Groups
Mean Square Among = SSA/degrees of freedom
(continued)
Basic Business Statistics, 10e © 2006 Prentice-Hall, Inc.
Basic Business Statistics, 10e © 2006 Prentice-Hall, Inc.
Chap 11-*
Among-Group Variation
(continued)
Basic Business Statistics, 10e © 2006 Prentice-Hall, Inc.
Basic Business Statistics, 10e © 2006 Prentice-Hall, Inc.
Chap 11-*
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
SST = SSA + SSW
Basic Business Statistics, 10e © 2006 Prentice-Hall, Inc.
Basic Business Statistics, 10e © 2006 Prentice-Hall, Inc.
Chap 11-*
Within-Group Variation
Summing the variation within each group and then adding over all groups
Mean Square Within = SSW/degrees of freedom
(continued)
Basic Business Statistics, 10e © 2006 Prentice-Hall, Inc.
Basic Business Statistics, 10e © 2006 Prentice-Hall, Inc.
Chap 11-*
Within-Group Variation
(continued)
Basic Business Statistics, 10e © 2006 Prentice-Hall, Inc.
Basic Business Statistics, 10e © 2006 Prentice-Hall, Inc.
Chap 11-*
Obtaining the Mean Squares
Basic Business Statistics, 10e © 2006 Prentice-Hall, Inc.
Basic Business Statistics, 10e © 2006 Prentice-Hall, Inc.
Chap 11-*
ANOVA Table from Excel
Source of Variation
df
SS
MS
(Variance)
Among Groups
SSA
MSA =
Within Groups
n - c
SSW
MSW =
Total
n - 1
SST =
SSA+SSW
c - 1
MSA
MSW
F ratio
c = number of groups
n = sum of the sample sizes from all groups
df = degrees of freedom
SSA
c - 1
SSW
n - c
F =
Basic Business Statistics, 10e © 2006 Prentice-Hall, Inc.
Basic Business Statistics, 10e © 2006 Prentice-Hall, Inc.
Chap 11-*
ANOVA
F 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)
H0: μ1= μ2 = … = μc
H1: At least two population means are different
Basic Business Statistics, 10e © 2006 Prentice-Hall, Inc.
Basic Business Statistics, 10e © 2006 Prentice-Hall, Inc.
Chap 11-*
Interpreting 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 F > FU, otherwise do not reject H0
0
= .05
Reject H0
Do not
reject H0
FU
Basic Business Statistics, 10e © 2006 Prentice-Hall, Inc.
Basic Business Statistics, 10e © 2006 Prentice-Hall, Inc.
Chap 11-*
ANOVA
F Test Example
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 0.05 significance level, is there a difference in mean distance?
Club 1 Club 2 Club 3
254 234 200
263 218 222
241 235 197
237 227 206
251 216 204
Basic Business Statistics, 10e © 2006 Prentice-Hall, Inc.
Basic Business Statistics, 10e © 2006 Prentice-Hall, Inc.
Chap 11-*
•
•
•
•
•
ANOVA Example: Scatter Diagram
270
260
250
240
230
220
210
200
190
•
•
•
•
•
•
•
•
•
•
Distance
Club 1 Club 2 Club 3
254 234 200
263 218 222
241 235 197
237 227 206
251 216 204
Club
1 2 3
Basic Business Statistics, 10e © 2006 Prentice-Hall, Inc.
Basic Business Statistics, 10e © 2006 Prentice-Hall, Inc.
Chap 11-*
ANOVA Example Computations
Club 1 Club 2 Club 3
254 234 200
263 218 222
241 235 197
237 227 206
251 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 = 4716.4
SSW = (254 – 249.2)2 + (263 – 249.2)2 +…+ (204 – 205.8)2 = 1119.6
MSA = 4716.4 / (3-1) = 2358.2
MSW = 1119.6 / (15-3) = 93.3
Basic Business Statistics, 10e © 2006 Prentice-Hall, Inc.
Basic Business Statistics, 10e © 2006 Prentice-Hall, Inc.
Chap 11-*
F = 25.275
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
FU = 3.89
Reject H0
Do not
reject H0
Critical Value:
FU = 3.89
Basic Business Statistics, 10e © 2006 Prentice-Hall, Inc.
Basic Business Statistics, 10e © 2006 Prentice-Hall, Inc.
Chap 11-*
ANOVA
Excel Output
EXCEL: tools | data analysis | ANOVA: 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 | |||
| Total | 5836.0 | 14 |
Basic Business Statistics, 10e © 2006 Prentice-Hall, Inc.
Basic Business Statistics, 10e © 2006 Prentice-Hall, Inc.
Chap 11-*
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
μ
1
=
μ
2
μ
3
Basic Business Statistics, 10e © 2006 Prentice-Hall, Inc.
Basic Business Statistics, 10e © 2006 Prentice-Hall, Inc.
Chap 11-*
Tukey-Kramer Critical Range
where:
QU = 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
nj and nj’ = Sample sizes from groups j and j’
Basic Business Statistics, 10e © 2006 Prentice-Hall, Inc.
Basic Business Statistics, 10e © 2006 Prentice-Hall, Inc.
Chap 11-*
The Tukey-Kramer Procedure: Example
1. Compute absolute mean differences:
Club 1 Club 2 Club 3
254 234 200
263 218 222
241 235 197
237 227 206
251 216 204
2. Find the QU value from the table in appendix E.10 with
c = 3 and (n – c) = (15 – 3) = 12 degrees of freedom for the desired level of ( = 0.05 used here):
Basic Business Statistics, 10e © 2006 Prentice-Hall, Inc.
Basic Business Statistics, 10e © 2006 Prentice-Hall, Inc.
Chap 11-*
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.
3. Compute Critical Range:
4. Compare:
(continued)
Basic Business Statistics, 10e © 2006 Prentice-Hall, Inc.
c
3
2
1
0
ì
ì
ì
ì
:
H
=
=
=
=
L
same
the
are
means
population
the
of
all
Not
:
H
1
c
3
2
1
0
ì
ì
ì
ì
:
H
=
=
=
=
L
same
the
are
ì
all
Not
:
H
j
1
3
2
1
ì
ì
ì
=
=
c
3
2
1
0
ì
ì
ì
ì
:
H
=
=
=
=
L
same
the
are
ì
all
Not
:
H
j
1
3
2
1
ì
ì
ì
¹
=
3
2
1
ì
ì
ì
¹
¹
å
å
=
=
-
=
c
1
j
n
1
i
2
ij
j
)
X
X
(
SST
Group 1Group 2Group 3
Response, X
X
2
cn
2
12
2
11
)
X
X
(
...
)
X
X
(
)
X
X
(
SST
c
-
+
+
-
+
-
=
2
j
c
1
j
j
)
X
X
(
n
SSA
-
=
å
=
i
m
j
m
2
j
c
1
j
j
)
X
X
(
n
SSA
-
=
å
=
1
c
SSA
MSA
-
=
Group 1Group 2Group 3
Response, X
1
X
2
X
3
X
2
2
2
2
2
1
1
)
x
x
(
n
...
)
x
x
(
n
)
x
x
(
n
SSA
c
c
-
+
+
-
+
-
=
2
j
ij
n
1
i
c
1
j
)
X
X
(
SSW
j
-
=
å
å
=
=
c
n
SSW
MSW
-
=
j
ì
Group 1Group 2Group 3
Response, X
3
X
2
c
cn
2
2
12
2
1
11
)
X
X
(
...
)
X
X
(
)
X
x
(
SSW
c
-
+
+
-
+
-
=
c
n
SSW
MSW
-
=
1
c
SSA
MSA
-
=
1
n
SST
MST
-
=
MSW
MSA
F
=
227.0
x
205.8
x
226.0
x
249.2
x
3
2
1
=
=
=
=
25.275
93.3
2358.2
F
=
=
25.275
93.3
2358.2
MSW
MSA
F
=
=
=
÷
÷
ø
ö
ç
ç
è
æ
+
=
j'
j
U
n
1
n
1
2
MSW
Q
Range
Critical
20.2
205.8
226.0
x
x
43.4
205.8
249.2
x
x
23.2
226.0
249.2
x
x
3
2
3
1
2
1
=
-
=
-
=
-
=
-
=
-
=
-
3.77
Q
U
=
16.285
5
1
5
1
2
93.3
3.77
n
1
n
1
2
MSW
Q
Range
Critical
j'
j
U
=
÷
ø
ö
ç
è
æ
+
=
÷
÷
ø
ö
ç
ç
è
æ
+
=
20.2
x
x
43.4
x
x
23.2
x
x
3
2
3
1
2
1
=
-
=
-
=
-