Вы находитесь на странице: 1из 57

Chapter 11

Analysis of Variance

Business Statistics: A Decision-Making Approach, 6e 2005 Prentice-Hall, Inc.

Chap 11-1

Chapter Goals
After completing this chapter, you should be able
to:

Recognize situations in which to use analysis of variance

Understand different analysis of variance designs

Perform a single-factor hypothesis test and interpret results

Conduct and interpret post-analysis of variance pairwise


comparisons procedures

Set up and perform randomized blocks analysis

Analyze two-factor analysis of variance test with replications


results

Business Statistics: A Decision-Making Approach, 6e 2005 Prentice-Hall, Inc.

Chap 11-2

Chapter Overview
Analysis of Variance (ANOVA)
One-Way
ANOVA

Randomized
Complete
Block ANOVA

Two-factor
ANOVA
with replication

F-test
F-test
TukeyKramer
test
Business Statistics: A Decision-Making Approach, 6e 2005 Prentice-Hall, Inc.

Fishers Least
Significant
Difference test
Chap 11-3

General ANOVA Setting

Investigator controls one or more independent


variables

Observe effects on dependent variable

Called factors (or treatment variables)


Each factor contains two or more levels (or
categories/classifications)
Response to levels of independent variable

Experimental design: the plan used to test


hypothesis

Business Statistics: A Decision-Making Approach, 6e 2005 Prentice-Hall, Inc.

Chap 11-4

One-Way Analysis of Variance

Evaluate the difference among the means of three


or more populations
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

Business Statistics: A Decision-Making Approach, 6e 2005 Prentice-Hall, Inc.

Chap 11-5

Completely Randomized Design

Experimental units (subjects) are assigned


randomly to treatments
Only one factor or independent variable

Analyzed by

With two or more treatment levels


One-factor analysis of variance (one-way ANOVA)

Called a Balanced Design if all factor levels


have equal sample size

Business Statistics: A Decision-Making Approach, 6e 2005 Prentice-Hall, Inc.

Chap 11-6

Hypotheses of One-Way ANOVA

H0 : 1 2 3 k

All population means are equal

i.e., no treatment effect (no variation in means among


groups)

HA : Not all of the population means are the same

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)

Business Statistics: A Decision-Making Approach, 6e 2005 Prentice-Hall, Inc.

Chap 11-7

One-Factor ANOVA
H0 : 1 2 3 k
HA : Not all i are the same
All Means are the same:
The Null Hypothesis is True
(No Treatment Effect)

1 2 3
Business Statistics: A Decision-Making Approach, 6e 2005 Prentice-Hall, Inc.

Chap 11-8

One-Factor ANOVA
H0 : 1 2 3 k

(continued)

HA : Not all i are the same


At least one mean is different:
The Null Hypothesis is NOT true
(Treatment Effect is present)

or

1 2 3
Business Statistics: A Decision-Making Approach, 6e 2005 Prentice-Hall, Inc.

1 2 3
Chap 11-9

Partitioning the Variation

Total variation can be split into two parts:

SST = SSB + SSW


SST = Total Sum of Squares
SSB = Sum of Squares Between
SSW = Sum of Squares Within

Business Statistics: A Decision-Making Approach, 6e 2005 Prentice-Hall, Inc.

Chap 11-10

Partitioning the Variation


(continued)

SST = SSB + SSW


Total Variation = the aggregate dispersion of the individual
data values across the various factor levels (SST)
Between-Sample Variation = dispersion among the factor
sample means (SSB)

Within-Sample Variation = dispersion that exists among


the data values within a particular factor level (SSW)

Business Statistics: A Decision-Making Approach, 6e 2005 Prentice-Hall, Inc.

Chap 11-11

Partition of Total Variation


Total Variation (SST)

Variation Due to
Factor (SSB)

Variation Due to Random


Sampling (SSW)

Commonly referred to as:


Sum of Squares Between
Sum of Squares Among
Sum of Squares Explained
Among Groups Variation

Business Statistics: A Decision-Making Approach, 6e 2005 Prentice-Hall, Inc.

Commonly referred to as:


Sum of Squares Within
Sum of Squares Error
Sum of Squares Unexplained
Within Groups Variation

Chap 11-12

Total Sum of Squares


SST = SSB + SSW
k

ni

SST ( xij x)
Where:

i1 j1

SST = Total sum of squares


k = number of populations (levels or treatments)
ni = sample size from population i
xij = jth measurement from population i
x = grand mean (mean of all data values)
Business Statistics: A Decision-Making Approach, 6e 2005 Prentice-Hall, Inc.

Chap 11-13

Total Variation
(continued)

SST (x11 x) ( x12 x) ... ( xkn k x)


2

Response, X

X
Group 1

Group 2

Business Statistics: A Decision-Making Approach, 6e 2005 Prentice-Hall, Inc.

Group 3
Chap 11-14

Sum of Squares Between


SST = SSB + SSW
k

SSB ni ( x i x )
Where:

i1

SSB = Sum of squares between


k = number of populations
ni = sample size from population i
xi = sample mean from population i
x = grand mean (mean of all data values)
Business Statistics: A Decision-Making Approach, 6e 2005 Prentice-Hall, Inc.

Chap 11-15

Between-Group Variation
k

SSB ni ( x i x )

i1

Variation Due to
Differences Among Groups

SSB
MSB
k 1
Mean Square Between =
SSB/degrees of freedom

Business Statistics: A Decision-Making Approach, 6e 2005 Prentice-Hall, Inc.

Chap 11-16

Between-Group Variation
(continued)

SSB n1 ( x1 x ) n2 ( x 2 x ) ... nk ( x k x )
2

Response, X

X3
X1
Group 1

Group 2

Business Statistics: A Decision-Making Approach, 6e 2005 Prentice-Hall, Inc.

X2

Group 3
Chap 11-17

Sum of Squares Within


SST = SSB + SSW
k

SSW
i1

nj

j1

( xij xi )

Where:

SSW = Sum of squares within


k = number of populations

ni = sample size from population i


xi = sample mean from population i
xij = jth measurement from population i
Business Statistics: A Decision-Making Approach, 6e 2005 Prentice-Hall, Inc.

Chap 11-18

Within-Group Variation
k

SSW
i1

nj

j1

( xij xi )2

Summing the variation


within each group and then
adding over all groups

SSW
MSW
Nk
Mean Square Within =
SSW/degrees of freedom

i
Business Statistics: A Decision-Making Approach, 6e 2005 Prentice-Hall, Inc.

Chap 11-19

Within-Group Variation
(continued)

SSW (x11 x1 ) (x12 x2 ) ... (xkn k xk )


2

Response, X

X3

X1
Group 1

Group 2

Business Statistics: A Decision-Making Approach, 6e 2005 Prentice-Hall, Inc.

X2
Group 3
Chap 11-20

One-Way ANOVA Table


Source of
Variation

Between
Samples
Within
Samples
Total

SS

df

MS

F ratio

k-1

SSB
MSB =
k-1

MSB
F=
MSW

SSW

N-k

SSW
MSW =
N-k

SST =
SSB+SSW

N-1

SSB

k = number of populations
N = sum of the sample sizes from all populations
df = degrees of freedom
Business Statistics: A Decision-Making Approach, 6e 2005 Prentice-Hall, Inc.

Chap 11-21

One-Factor ANOVA
F Test Statistic
H0: 1= 2 = = k

HA: At least two population means are different

Test statistic

MSB
F
MSW

MSB is mean squares between variances


MSW is mean squares within variances

Degrees of freedom

df1 = k 1
df2 = N k

(k = number of populations)
(N = sum of sample sizes from all populations)

Business Statistics: A Decision-Making Approach, 6e 2005 Prentice-Hall, Inc.

Chap 11-22

Interpreting One-Factor ANOVA


F Statistic

The F statistic is the ratio of the between


estimate of variance and the within estimate
of variance

The ratio must always be positive


df1 = k -1 will typically be small
df2 = N - k will typically be large

The ratio should be close to 1 if


H0: 1= 2 = = k is true
The ratio will be larger than 1 if
H0: 1= 2 = = k is false
Business Statistics: A Decision-Making Approach, 6e 2005 Prentice-Hall, Inc.

Chap 11-23

One-Factor 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
.05 significance level, is there
a difference in mean
distance?

Business Statistics: A Decision-Making Approach, 6e 2005 Prentice-Hall, Inc.

Club 1
254
263
241
237
251

Club 2
234
218
235
227
216

Club 3
200
222
197
206
204

Chap 11-24

One-Factor ANOVA Example:


Scatter Diagram
Club 1
254
263
241
237
251

Club 2
234
218
235
227
216

Club 3
200
222
197
206
204

Distance
270
260
250
240

230
220

X1

X2

210

x1 249.2 x 2 226.0 x 3 205.8

200

x 227.0

190

Business Statistics: A Decision-Making Approach, 6e 2005 Prentice-Hall, Inc.

2
Club

X
X3

Chap 11-25

One-Factor ANOVA Example


Computations
Club 1
254
263
241
237
251

Club 2
234
218
235
227
216

Club 3
200
222
197
206
204

x1 = 249.2

n1 = 5

x2 = 226.0

n2 = 5

x3 = 205.8

n3 = 5

x = 227.0

N = 15

k=3

SSB = 5 [ (249.2 227)2 + (226 227)2 + (205.8 227)2 ] = 4716.4


SSW = (254 249.2)2 + (263 249.2)2 ++ (204 205.8)2 = 1119.6
MSB = 4716.4 / (3-1) = 2358.2
MSW = 1119.6 / (15-3) = 93.3
Business Statistics: A Decision-Making Approach, 6e 2005 Prentice-Hall, Inc.

2358.2
F
25.275
93.3
Chap 11-26

One-Factor ANOVA Example


Solution
H0: 1 = 2 = 3
HA: i not all equal
= .05
df1= 2
df2 = 12

Test Statistic:
MSB 2358.2
F

25.275
MSW
93.3

Critical
Value:
F = 3.885

= .05

Do not
reject H0

Reject H0

F.05 = 3.885

Decision:
Reject H0 at = 0.05
Conclusion:
There is evidence that
at least one i differs
F = 25.275
from the rest

Business Statistics: A Decision-Making Approach, 6e 2005 Prentice-Hall, Inc.

Chap 11-27

ANOVA -- Single Factor:


Excel Output
EXCEL: tools | data analysis | ANOVA: single factor
SUMMARY
Groups

Count

Sum

Average

Variance

Club 1

1246

249.2

108.2

Club 2

1130

226

77.5

Club 3

1029

205.8

94.2

ANOVA
Source of
Variation

SS

df

MS

Between
Groups

4716.4

2358.2

Within
Groups

1119.6

12

93.3

Total

5836.0

14

Business Statistics: A Decision-Making Approach, 6e 2005 Prentice-Hall, Inc.

F
25.275

P-value
4.99E-05

F crit
3.885

Chap 11-28

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

1= 2
Business Statistics: A Decision-Making Approach, 6e 2005 Prentice-Hall, Inc.

x
Chap 11-29

Tukey-Kramer Critical Range

CriticalRange q

MSW 1 1

2 ni n j

where:
q = Value from standardized range table
with k and N - k degrees of freedom for
the desired level of
MSW = Mean Square Within
ni and nj = Sample sizes from populations (levels) i and j
Business Statistics: A Decision-Making Approach, 6e 2005 Prentice-Hall, Inc.

Chap 11-30

The Tukey-Kramer Procedure:


Example
Club 1
254
263
241
237
251

Club 2
234
218
235
227
216

1. Compute absolute mean


differences:

Club 3
200
222
197
206
204

x1 x 2 249.2 226.0 23.2


x1 x 3 249.2 205.8 43.4
x 2 x 3 226.0 205.8 20.2

2. Find the q value from the table in appendix J with


k and N - k degrees of freedom for
the desired level of

q 3.77
Business Statistics: A Decision-Making Approach, 6e 2005 Prentice-Hall, Inc.

Chap 11-31

The Tukey-Kramer Procedure:


Example
3. Compute Critical Range:
CriticalRange q

MSW 1 1
93.3 1 1

3.77
16.285

2 ni n j
2 5 5

4. Compare:

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.

Business Statistics: A Decision-Making Approach, 6e 2005 Prentice-Hall, Inc.

x1 x 2 23.2
x1 x 3 43.4
x 2 x 3 20.2

Chap 11-32

Tukey-Kramer in PHStat

Business Statistics: A Decision-Making Approach, 6e 2005 Prentice-Hall, Inc.

Chap 11-33

Randomized Complete Block ANOVA

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)

Used when more than one factor may influence the


value of the dependent variable, but only one is of key
interest

Levels of the secondary factor are called blocks

Business Statistics: A Decision-Making Approach, 6e 2005 Prentice-Hall, Inc.

Chap 11-34

Partitioning the Variation

Total variation can now be split into three parts:

SST = SSB + SSBL + SSW


SST = Total sum of squares
SSB = Sum of squares between factor levels
SSBL = Sum of squares between blocks
SSW = Sum of squares within levels

Business Statistics: A Decision-Making Approach, 6e 2005 Prentice-Hall, Inc.

Chap 11-35

Sum of Squares for Blocking


SST = SSB + SSBL + SSW
b

SSBL k( x j x )

j 1

Where:

k = number of levels for this factor


b = number of blocks
xj = sample mean from the jth block
x = grand mean (mean of all data values)
Business Statistics: A Decision-Making Approach, 6e 2005 Prentice-Hall, Inc.

Chap 11-36

Partitioning the Variation

Total variation can now be split into three parts:

SST = SSB + SSBL + SSW


SST and SSB are
computed as they were
in One-Way ANOVA

Business Statistics: A Decision-Making Approach, 6e 2005 Prentice-Hall, Inc.

SSW = SST (SSB + SSBL)

Chap 11-37

Mean Squares
SSBL
MSBL Mean squareblocking
b 1
MSB Mean square between

SSB
k 1

SSW
MSW Mean square within
(k 1)(b 1)
Business Statistics: A Decision-Making Approach, 6e 2005 Prentice-Hall, Inc.

Chap 11-38

Randomized Block ANOVA Table


Source of
Variation

SS

df

MS

F ratio

Between
Blocks

SSBL

b-1

MSBL

MSBL
MSW

Between
Samples

SSB

k-1

MSB

MSB
MSW

Within
Samples

SSW

(k1)(b-1)

MSW

SST

N-1

Total

k = number of populations
b = number of blocks

N = sum of the sample sizes from all populations


df = degrees of freedom

Business Statistics: A Decision-Making Approach, 6e 2005 Prentice-Hall, Inc.

Chap 11-39

Blocking Test
H0 : b1 b2 b3 ...
HA : Not all block means are equal
MSBL
F=
MSW

Blocking test:

df1 = b - 1
df2 = (k 1)(b 1)

Reject H0 if F > F

Business Statistics: A Decision-Making Approach, 6e 2005 Prentice-Hall, Inc.

Chap 11-40

Main Factor Test


H0 : 1 2 3 ... k
HA : Not all population means are equal

F=

MSB

Main Factor test:

MSW

df1 = k - 1
df2 = (k 1)(b 1)

Reject H0 if F > F

Business Statistics: A Decision-Making Approach, 6e 2005 Prentice-Hall, Inc.

Chap 11-41

Fishers
Least Significant Difference Test

To test which population means are significantly


different

e.g.: 1 = 2 3
Done after rejection of equal means in randomized
block ANOVA design

Allows pair-wise comparisons

Compare absolute mean differences with critical


range

1= 2
Business Statistics: A Decision-Making Approach, 6e 2005 Prentice-Hall, Inc.

x
Chap 11-42

Fishers Least Significant


Difference (LSD) Test
LSD t /2

2
MSW
b

where:
t/2 = Upper-tailed value from Students t-distribution
for /2 and (k -1)(n - 1) degrees of freedom
MSW = Mean square within from ANOVA table
b = number of blocks
k = number of levels of the main factor
Business Statistics: A Decision-Making Approach, 6e 2005 Prentice-Hall, Inc.

Chap 11-43

Fishers Least Significant


Difference (LSD) Test (continued)
LSD t /2

2
MSW
b
Compare:

Is xi x j LSD ?
If the absolute mean difference
is greater than LSD then there
is a significant difference
between that pair of means at
the chosen level of significance.
Business Statistics: A Decision-Making Approach, 6e 2005 Prentice-Hall, Inc.

x1 x 2
x1 x 3
x2 x3
etc...
Chap 11-44

Two-Way ANOVA

Examines the effect of

Two or more 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
percentage of carbonation depend on which
level the line speed is set?

Business Statistics: A Decision-Making Approach, 6e 2005 Prentice-Hall, Inc.

Chap 11-45

Two-Way ANOVA
(continued)

Assumptions

Populations are normally distributed

Populations have equal variances

Independent random samples are


drawn

Business Statistics: A Decision-Making Approach, 6e 2005 Prentice-Hall, Inc.

Chap 11-46

Two-Way ANOVA
Sources of Variation
Two Factors of interest: A and B
a = number of levels of factor A

b = number of levels of factor B


N = total number of observations in all cells

Business Statistics: A Decision-Making Approach, 6e 2005 Prentice-Hall, Inc.

Chap 11-47

Two-Way ANOVA
Sources of Variation
SST = SSA + SSB + SSAB + SSE
SSA
Variation due to factor A

SST
Total Variation

SSB
Variation due to factor B

SSAB
N-1

Variation due to interaction


between A and B

SSE

(continued)
Degrees of
Freedom:
a1

b1

(a 1)(b 1)

N ab

Inherent variation (Error)


Business Statistics: A Decision-Making Approach, 6e 2005 Prentice-Hall, Inc.

Chap 11-48

Two Factor ANOVA Equations


Total Sum of Squares:

SST ( x ijk x )

i 1 j 1 k 1

Sum of Squares Factor A:

SS A bn ( x i x )
i1

Sum of Squares Factor B:

SSB an ( x j x )2
j 1

Business Statistics: A Decision-Making Approach, 6e 2005 Prentice-Hall, Inc.

Chap 11-49

Two Factor ANOVA Equations


(continued)

Sum of Squares
Interaction Between
A and B:
SS

AB

n ( x ij x i x j x )2
i 1 j1

Sum of Squares Error:

SSE ( x ijk x ij )

i1 j1 k 1

Business Statistics: A Decision-Making Approach, 6e 2005 Prentice-Hall, Inc.

Chap 11-50

Two Factor ANOVA Equations


a

where:
b

xi

j 1 k 1

x
i 1 j1 k 1

ijk

ab n

(continued)

Grand Mean

ijk

bn

Mean of each level of factor A


a

xj

x
i1 k 1

an

ijk

Mean of each level of factor B

x ijk
x ij
Mean of each cell
k 1 n
Business Statistics: A Decision-Making Approach, 6e 2005 Prentice-Hall, Inc.

a = number of levels of factor A


b = number of levels of factor B
n = number of replications in each cell
Chap 11-51

Mean Square Calculations


SS A
MS A Mean square factor A
a 1
SSB
MSB Mean square factor B
b 1
MS AB

SS AB
Mean square interactio n
(a 1)(b 1)

SSE
MSE Mean square error
N ab
Business Statistics: A Decision-Making Approach, 6e 2005 Prentice-Hall, Inc.

Chap 11-52

Two-Way ANOVA:
The F Test Statistic
H0: A1 = A2 = A3 =

HA: Not all Ai are equal

H0: B1 = B2 = B3 =
HA: Not all Bi are equal

H0: factors A and B do not interact


to affect the mean response
HA: factors A and B do interact
Business Statistics: A Decision-Making Approach, 6e 2005 Prentice-Hall, Inc.

F Test for Factor A Main Effect

MS A
F
MSE

Reject H0
if F > F

F Test for Factor B Main Effect

MSB
F
MSE

Reject H0
if F > F

F Test for Interaction Effect

MS AB
F
MSE

Reject H0
if F > F
Chap 11-53

Two-Way ANOVA
Summary Table
Source of
Variation

Sum of
Squares

Degrees of
Freedom

Mean
Squares

F
Statistic

Factor A

SSA

a1

MSA

MSA
MSE

Factor B

SSB

b1

AB
(Interaction)

SSAB

(a 1)(b 1)

Error

SSE

N ab

Total

SST

N1

Business Statistics: A Decision-Making Approach, 6e 2005 Prentice-Hall, Inc.

= SSA /(a 1)

MSB
= SSB /(b 1)

MSAB
= SSAB / [(a 1)(b 1)]

MSB
MSE
MSAB
MSE

MSE =
SSE/(N ab)

Chap 11-54

Features of Two-Way ANOVA


F Test

Degrees of freedom always add up

N-1 = (N-ab) + (a-1) + (b-1) + (a-1)(b-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

Total = error + factor A + factor B + interaction

Business Statistics: A Decision-Making Approach, 6e 2005 Prentice-Hall, Inc.

Chap 11-55

Examples:
Interaction vs. No Interaction
No interaction:

Interaction is
present:

Factor B Level 3
Factor B Level 2

Factor A Levels

Business Statistics: A Decision-Making Approach, 6e 2005 Prentice-Hall, Inc.

Mean Response

Factor B Level 1

Mean Response

Factor B Level 1
Factor B Level 2
Factor B Level 3

Factor A Levels

2
Chap 11-56

Chapter Summary

Described one-way analysis of variance

Described randomized complete block designs

The logic of ANOVA


ANOVA assumptions
F test for difference in k means
The Tukey-Kramer procedure for multiple comparisons
F test
Fishers least significant difference test for multiple
comparisons

Described two-way analysis of variance

Examined effects of multiple factors and interaction

Business Statistics: A Decision-Making Approach, 6e 2005 Prentice-Hall, Inc.

Chap 11-57

Вам также может понравиться