Chapter 11 Student Lecture Notes 11-1Statistics for Managers Using Microsoft Excel, 2/e © 1999...

28
Statistics for Managers Using Microsoft Excel, 2/e © 1999 Prentice-Hall, Inc. Chapter 11 Student Lecture Notes 11-1 © 2004 Prentice-Hall, Inc. Chap 11-1 Basic Business Statistics (9 th Edition) Chapter 11 Analysis of Variance © 2004 Prentice-Hall, Inc. Chap 11-2 The Completely Randomized Design: One-Way Analysis of Variance ANOVA Assumptions F Test for Differences in More than Two Means The Tukey-Kramer Procedure Levene’s Test for Homogeneity of Variance The Randomized Block Design F Test for the Difference in More than Two Means The Tukey Procedure Chapter Topics © 2004 Prentice-Hall, Inc. Chap 11-3 Chapter Topics The Factorial Design: Two-Way Analysis of Variance Examine Effects of Factors and Interaction Kruskal-Wallis Rank Test: Nonparametric Analysis for the Completely Randomized Design Friedman Rank Test: Nonparametric Analysis for the Randomized Block Design (continued)

Transcript of Chapter 11 Student Lecture Notes 11-1Statistics for Managers Using Microsoft Excel, 2/e © 1999...

Page 1: Chapter 11 Student Lecture Notes 11-1Statistics for Managers Using Microsoft Excel, 2/e © 1999 Prentice-Hall, Inc. Chapter 11 Student Lecture Notes 11-1 © 2004 Prentice-Hall, Inc.

Statistics for Managers Using Microsoft Excel, 2/e © 1999 Prentice-Hall, Inc.

Chapter 11 Student Lecture Notes 11-1

© 2004 Prentice-Hall, Inc. Chap 11-1

Basic Business Statistics(9th Edition)

Chapter 11Analysis of Variance

© 2004 Prentice-Hall, Inc. Chap 11-2

The Completely Randomized Design:One-Way Analysis of Variance

ANOVA AssumptionsF Test for Differences in More than Two MeansThe Tukey-Kramer ProcedureLevene’s Test for Homogeneity of Variance

The Randomized Block DesignF Test for the Difference in More than Two MeansThe Tukey Procedure

Chapter Topics

© 2004 Prentice-Hall, Inc. Chap 11-3

Chapter Topics

The Factorial Design: Two-Way Analysis of Variance

Examine Effects of Factors and Interaction

Kruskal-Wallis Rank Test: Nonparametric Analysis for the Completely Randomized Design

Friedman Rank Test: Nonparametric Analysis for the Randomized Block Design

(continued)

Page 2: Chapter 11 Student Lecture Notes 11-1Statistics for Managers Using Microsoft Excel, 2/e © 1999 Prentice-Hall, Inc. Chapter 11 Student Lecture Notes 11-1 © 2004 Prentice-Hall, Inc.

Statistics for Managers Using Microsoft Excel, 2/e © 1999 Prentice-Hall, Inc.

Chapter 11 Student Lecture Notes 11-2

© 2004 Prentice-Hall, Inc. Chap 11-4

General Experimental Setting

Investigator Controls One or More Independent Variables

Called treatment variables or factorsEach treatment factor contains two or more groups (or levels)

Observe Effects on Dependent VariableResponse to groups (or levels) of independent variable

Experimental Design: The Plan Used to Test Hypothesis

© 2004 Prentice-Hall, Inc. Chap 11-5

Completely Randomized Design

Experimental Units (Subjects) are Assigned Randomly to Groups

Subjects are assumed to be homogeneous

Only One Factor or Independent VariableWith 2 or more groups (or levels)

Analyzed by One-Way Analysis of Variance (ANOVA)

© 2004 Prentice-Hall, Inc. Chap 11-6

22 hrs20 hrs29 hrs

28 hrs25 hrs27 hrs

31 hrs17 hrs21 hrsDependent

Variable(Response)

Randomly Assigned

Units

Factor Levels(Groups)

Factor (Training Method)

Completely Randomized Design Example

Page 3: Chapter 11 Student Lecture Notes 11-1Statistics for Managers Using Microsoft Excel, 2/e © 1999 Prentice-Hall, Inc. Chapter 11 Student Lecture Notes 11-1 © 2004 Prentice-Hall, Inc.

Statistics for Managers Using Microsoft Excel, 2/e © 1999 Prentice-Hall, Inc.

Chapter 11 Student Lecture Notes 11-3

© 2004 Prentice-Hall, Inc. Chap 11-7

One-Way Analysis of VarianceF Test

Evaluate the Difference Among the Mean Responses of 2 or More (c ) Populations

E.g., Several types of tires, oven temperature settings

AssumptionsSamples are randomly and independently drawn

This condition must be metPopulations are normally distributed

F Test is robust to moderate departure from normality

Populations have equal variancesLess sensitive to this requirement when samples are of equal size from each population

© 2004 Prentice-Hall, Inc. Chap 11-8

Why ANOVA?Could Compare the Means One Pair at a Time Using t Test for Difference of MeansEach t Test Contains Type I ErrorThe Total Type I Error with k Pairs of Means is 1- (1 - α) k

E.g., If there are 5 means and use α = .05 Must perform 10 comparisonsType I Error is 1 – (.95) 10 = .4040% of the time you will reject the null hypothesis of equal means in favor of the alternative when the null hypothesis is true!

© 2004 Prentice-Hall, Inc. Chap 11-9

Hypotheses of One-Way ANOVA

All population means are equal

No treatment effect (no variation in means among groups)

At least one population mean is different (others may be the same!)

There is a treatment effect

Does not mean that all population means are different

0 1 2: cH µ µ µ= = =L

1 : Not all are the samejH µ

Page 4: Chapter 11 Student Lecture Notes 11-1Statistics for Managers Using Microsoft Excel, 2/e © 1999 Prentice-Hall, Inc. Chapter 11 Student Lecture Notes 11-1 © 2004 Prentice-Hall, Inc.

Statistics for Managers Using Microsoft Excel, 2/e © 1999 Prentice-Hall, Inc.

Chapter 11 Student Lecture Notes 11-4

© 2004 Prentice-Hall, Inc. Chap 11-10

One-Way ANOVA (No Treatment Effect)

The Null Hypothesis is True

0 1 2: cH µ µ µ= = =L

1 : Not all are the samejH µ

1 2 3µ µ µ= =

© 2004 Prentice-Hall, Inc. Chap 11-11

One-Way ANOVA (Treatment Effect Present)

The Null Hypothesis is

NOT True

0 1 2: cH µ µ µ= = =L

1 : Not all are the samejH µ

1 2 3µ µ µ= ≠1 2 3µ µ µ≠ ≠

© 2004 Prentice-Hall, Inc. Chap 11-12

One-Way ANOVA(Partition of Total Variation)

Variation Due to Group SSA

Variation Due to Random Sampling SSW

Total Variation SST

Commonly referred to as:Within Group VariationSum of Squares WithinSum of Squares ErrorSum of Squares Unexplained

Commonly referred to as:Among Group Variation Sum of Squares AmongSum of Squares BetweenSum of Squares ModelSum of Squares ExplainedSum of Squares Treatment

= +

Page 5: Chapter 11 Student Lecture Notes 11-1Statistics for Managers Using Microsoft Excel, 2/e © 1999 Prentice-Hall, Inc. Chapter 11 Student Lecture Notes 11-1 © 2004 Prentice-Hall, Inc.

Statistics for Managers Using Microsoft Excel, 2/e © 1999 Prentice-Hall, Inc.

Chapter 11 Student Lecture Notes 11-5

© 2004 Prentice-Hall, Inc. Chap 11-13

Total Variation2

1 1

1 1

( )

: the -th observation in group : the number of observations in group

: the total number of observations in all groups: the number of groups

the over

j

j

nc

ijj i

ij

j

nc

ijj i

SST X X

X i jn jnc

XX

n

= =

= =

= −

=

∑∑

∑∑all or grand mean

© 2004 Prentice-Hall, Inc. Chap 11-14

Total Variation(continued)

( ) ( ) ( )2 2 2

11 21 cn cSST X X X X X X= − + − + + −L

X

Response, X

Group 1 Group 2 Group 3

© 2004 Prentice-Hall, Inc. Chap 11-15

2

1

( )c

j jj

SSA n X X=

= −∑

Among-Group Variation

Variation Due to Differences Among Groups

1SSAMSAc

=−

jµ 'jµ

: The sample mean of group

: The overall or grand mean

jX j

X

Page 6: Chapter 11 Student Lecture Notes 11-1Statistics for Managers Using Microsoft Excel, 2/e © 1999 Prentice-Hall, Inc. Chapter 11 Student Lecture Notes 11-1 © 2004 Prentice-Hall, Inc.

Statistics for Managers Using Microsoft Excel, 2/e © 1999 Prentice-Hall, Inc.

Chapter 11 Student Lecture Notes 11-6

© 2004 Prentice-Hall, Inc. Chap 11-16

Among-Group Variation(continued)

( ) ( ) ( )2 2 2

1 1 2 2 c cSSA n X X n X X n X X= − + − + + −L

X1X

2X 3X

Response, X

Group 1 Group 2 Group 3

© 2004 Prentice-Hall, Inc. Chap 11-17

Summing the variation within each group and then adding over all groups

: The sample mean of group : The -th observation in group

j

ij

X jX i j

Within-Group Variation

2

1 1

( )jnc

ij jj i

SSW X X= =

= −∑ ∑ SSWMSWn c

=−

© 2004 Prentice-Hall, Inc. Chap 11-18

Within-Group Variation(continued)

( ) ( ) ( )22 211 1 21 1 cn c cSSW X X X X X X= − + − + + −L

1X

2X 3XX

Response, X

Group 1 Group 2 Group 3

Page 7: Chapter 11 Student Lecture Notes 11-1Statistics for Managers Using Microsoft Excel, 2/e © 1999 Prentice-Hall, Inc. Chapter 11 Student Lecture Notes 11-1 © 2004 Prentice-Hall, Inc.

Statistics for Managers Using Microsoft Excel, 2/e © 1999 Prentice-Hall, Inc.

Chapter 11 Student Lecture Notes 11-7

© 2004 Prentice-Hall, Inc. Chap 11-19

Within-Group Variation(continued)

2 2 21 1 2 2

1 2

( 1) ( 1) ( 1)( 1) ( 1) ( 1)

c c

c

SSWMSWn c

n S n S n Sn n n

=−

− + − +•••+ −=

− + − +•••+ −

For c = 2, this is the pooled-variance in the t test.

•If more than 2 groups, use F Test.

•For 2 groups, use t test. F Test more limited.

© 2004 Prentice-Hall, Inc. Chap 11-20

One-Way ANOVAF Test Statistic

Test Statistic

MSA is mean squares amongMSW is mean squares within

Degrees of Freedom

MSAFMSW

=

1 1df c= −2df n c= −

© 2004 Prentice-Hall, Inc. Chap 11-21

One-Way ANOVA Summary Table

MSA/MSW

FStatistic

SST =SSA + SSWn – 1Total

MSW =SSW/(n – c )

SSWn – cWithin(Error)

MSA = SSA/(c – 1 )SSAc – 1Among

(Factor)

Mean Squares

(Variance)

Sum ofSquares

Degrees of

Freedom

Source ofVariation

Page 8: Chapter 11 Student Lecture Notes 11-1Statistics for Managers Using Microsoft Excel, 2/e © 1999 Prentice-Hall, Inc. Chapter 11 Student Lecture Notes 11-1 © 2004 Prentice-Hall, Inc.

Statistics for Managers Using Microsoft Excel, 2/e © 1999 Prentice-Hall, Inc.

Chapter 11 Student Lecture Notes 11-8

© 2004 Prentice-Hall, Inc. Chap 11-22

Features of 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 positivedf1 = c -1 will typically be smalldf2 = n - c will typically be large

The Ratio Should Be Close to 1 if the Null is True

© 2004 Prentice-Hall, Inc. Chap 11-23

Features of One-Way ANOVA F Statistic

If the Null Hypothesis is FalseThe numerator should be greater than the denominatorThe ratio should be larger than 1

(continued)

© 2004 Prentice-Hall, Inc. Chap 11-24

One-Way ANOVA F TestExample

As production manager, you want to see if 3 filling machines have different mean filling times. You assign 15 similarly trained & experienced workers, 5 per machine, to the machines. At the .05 significance level, is there a difference in mean filling times?

Machine1 Machine2 Machine325.40 23.40 20.0026.31 21.80 22.2024.10 23.50 19.7523.74 22.75 20.6025.10 21.60 20.40

Page 9: Chapter 11 Student Lecture Notes 11-1Statistics for Managers Using Microsoft Excel, 2/e © 1999 Prentice-Hall, Inc. Chapter 11 Student Lecture Notes 11-1 © 2004 Prentice-Hall, Inc.

Statistics for Managers Using Microsoft Excel, 2/e © 1999 Prentice-Hall, Inc.

Chapter 11 Student Lecture Notes 11-9

© 2004 Prentice-Hall, Inc. Chap 11-25

One-Way ANOVA Example: Scatter Diagram

27

26

25

24

23

22

21

20

19

•••••

•••••

••••

Time in SecondsMachine1 Machine2 Machine325.40 23.40 20.0026.31 21.80 22.2024.10 23.50 19.7523.74 22.75 20.6025.10 21.60 20.40

1 2

3

24.93 22.61

20.59 22.71

X X

X X

= =

= =

1X

2X

3X

X

© 2004 Prentice-Hall, Inc. Chap 11-26

One-Way ANOVA Example Computations

Machine1 Machine2 Machine325.40 23.40 20.0026.31 21.80 22.2024.10 23.50 19.7523.74 22.75 20.6025.10 21.60 20.40

( ) ( ) ( )2 2 25 24.93 22.71 22.61 22.71 20.59 22.71

47.1644.2592 3.112 3.682 11.0532

/( -1) 47.1640 / 2 23.5820 /( - ) 11.0532 /12 .9211

SSA

SSWMSA SSA cMSW SSW n c

⎡ ⎤= − + − + −⎣ ⎦== + + == = == = =

1

2

3

24.9322.6120.59

22.71

XXX

X

=

=

=

=

5

315

jn

cn

=

==

© 2004 Prentice-Hall, Inc. Chap 11-27

Summary Table

MSA/MSW=25.60

FStatistic

58.217215-1=14Total

.921111.053215-3=12Within(Error)

23.582047.16403-1=2Among(Factor)

Mean Squares

(Variance)

Sum ofSquares

Degrees of

Freedom

Source ofVariation

Page 10: Chapter 11 Student Lecture Notes 11-1Statistics for Managers Using Microsoft Excel, 2/e © 1999 Prentice-Hall, Inc. Chapter 11 Student Lecture Notes 11-1 © 2004 Prentice-Hall, Inc.

Statistics for Managers Using Microsoft Excel, 2/e © 1999 Prentice-Hall, Inc.

Chapter 11 Student Lecture Notes 11-10

© 2004 Prentice-Hall, Inc. Chap 11-28

One-Way ANOVA Example Solution

F0 3.89

H0: µ1 = µ2 = µ3

H1: Not All Equalα = .05df1= 2 df2 = 12

Critical Value(s):

Test Statistic:

Decision:

Conclusion:Reject at α = 0.05.

There is evidence that atleast one µ j differs fromthe rest.

α = 0.05

FMSAMSW

= = =23 5820

921125 6

..

.

© 2004 Prentice-Hall, Inc. Chap 11-29

Solution in Excel

Use Tools | Data Analysis | ANOVA: Single Factor Excel Worksheet that Performs the One-Factor ANOVA of the Example

Microsoft Excel Worksheet

© 2004 Prentice-Hall, Inc. Chap 11-30

The Tukey-Kramer Procedure

Tells which Population Means are Significantly Different

E.g., µ1 = µ2 ≠ µ32 groups whose means may be significantly different

Post Hoc (A Posteriori) ProcedureDone after rejection of equal means in ANOVA

Pairwise ComparisonsCompare absolute mean differences with critical range

X

f(X)

µ 1 = µ 2 µ 3

Page 11: Chapter 11 Student Lecture Notes 11-1Statistics for Managers Using Microsoft Excel, 2/e © 1999 Prentice-Hall, Inc. Chapter 11 Student Lecture Notes 11-1 © 2004 Prentice-Hall, Inc.

Statistics for Managers Using Microsoft Excel, 2/e © 1999 Prentice-Hall, Inc.

Chapter 11 Student Lecture Notes 11-11

© 2004 Prentice-Hall, Inc. Chap 11-31

The Tukey-Kramer Procedure: Example

1. Compute absolute mean differences:Machine1 Machine2 Machine3

25.40 23.40 20.0026.31 21.80 22.2024.10 23.50 19.7523.74 22.75 20.6025.10 21.60 20.40

1 2

1 3

2 3

24.93 22.61 2.32

24.93 20.59 4.34

22.61 20.59 2.02

X X

X X

X X

− = − =

− = − =

− = − =2. Compute critical range:

3. All of the absolute mean differences are greater than the critical range. There is a significant difference between each pair of means at the 5% level of significance.

( , )'

1 1Critical Range 1.6182U c n c

j j

MSWQn n−

⎛ ⎞= + =⎜ ⎟⎜ ⎟

⎝ ⎠

© 2004 Prentice-Hall, Inc. Chap 11-32

Solution in PHStat

Use PHStat | c-Sample Tests | Tukey-Kramer Procedure …Excel Worksheet that Performs the Tukey-Kramer Procedure for the Previous Example

Microsoft Excel Worksheet

© 2004 Prentice-Hall, Inc. Chap 11-33

Levene’s Test for Homogeneity of Variance

The Null Hypothesis

The c population variances are all equal

The Alternative Hypothesis

Not all the c population variances are equal

2 2 20 1 2: cH σ σ σ= = =L

21 : Not all are equal ( 1, 2, , )jH j cσ = L

Page 12: Chapter 11 Student Lecture Notes 11-1Statistics for Managers Using Microsoft Excel, 2/e © 1999 Prentice-Hall, Inc. Chapter 11 Student Lecture Notes 11-1 © 2004 Prentice-Hall, Inc.

Statistics for Managers Using Microsoft Excel, 2/e © 1999 Prentice-Hall, Inc.

Chapter 11 Student Lecture Notes 11-12

© 2004 Prentice-Hall, Inc. Chap 11-34

Levene’s Test for Homogeneity of Variance: Procedure

1. For each observation in each group, obtain the absolute value of the difference between each observation and the median of the group.

2. Perform a one-way analysis of variance on these absolute differences.

© 2004 Prentice-Hall, Inc. Chap 11-35

Levene’s Test for Homogeneity of Variances: Example

As production manager, you want to see if 3 filling machines have different variance in filling times. You assign 15 similarly trained & experienced workers, 5 per machine, to the machines. At the .05 significance level, is there a difference in the variance in filling times?

Machine1 Machine2 Machine325.40 23.40 20.0026.31 21.80 22.2024.10 23.50 19.7523.74 22.75 20.6025.10 21.60 20.40

© 2004 Prentice-Hall, Inc. Chap 11-36

Levene’s Test: Absolute Difference from the Median

Machine1 Machine2 Machine3 Machine1 Machine2 Machine325.4 23.4 20 0.3 0.65 0.4

26.31 21.8 22.2 1.21 0.95 1.824.1 23.5 19.75 1 0.75 0.65

23.74 22.75 20.6 1.36 0 0.225.1 21.6 20.4 0 1.15 0

median 25.1 22.75 20.4

abs(Time - median(Time))Time

Page 13: Chapter 11 Student Lecture Notes 11-1Statistics for Managers Using Microsoft Excel, 2/e © 1999 Prentice-Hall, Inc. Chapter 11 Student Lecture Notes 11-1 © 2004 Prentice-Hall, Inc.

Statistics for Managers Using Microsoft Excel, 2/e © 1999 Prentice-Hall, Inc.

Chapter 11 Student Lecture Notes 11-13

© 2004 Prentice-Hall, Inc. Chap 11-37

Summary Table

SUMMARYGroups Count Sum Average Variance

Machine1 5 3.87 0.774 0.35208Machine2 5 3.5 0.7 0.19Machine3 5 3.05 0.61 0.5005

ANOVASource of Variation SS df MS F P-value F crit

Between Groups 0.067453 2 0.033727 0.097048 0.908218 3.88529Within Groups 4.17032 12 0.347527

Total 4.237773 14

© 2004 Prentice-Hall, Inc. Chap 11-38

Levene’s Test Example:Solution

F0 3.89

H0: H1: Not All Equalα = .05df1= 2 df2 = 12

Critical Value(s):

Test Statistic:

Decision:

Conclusion:Do not reject at α = 0.05.

There is no evidence that at least one differs from the rest.

α = 0.05

2 2 21 2 3σ σ σ= =

0.0337 0.09700.3475

MSAFMSW

= = =

2jσ

© 2004 Prentice-Hall, Inc. Chap 11-39

Randomized Blocked DesignItems are Divided into Blocks

Individual items in different samples are matched, or repeated measurements are takenReduced within group variation (i.e., remove the effect of block before testing)

Response of Each Treatment Group is ObtainedAssumptions

Same as completely randomized designNo interaction effect between treatments and blocks

Page 14: Chapter 11 Student Lecture Notes 11-1Statistics for Managers Using Microsoft Excel, 2/e © 1999 Prentice-Hall, Inc. Chapter 11 Student Lecture Notes 11-1 © 2004 Prentice-Hall, Inc.

Statistics for Managers Using Microsoft Excel, 2/e © 1999 Prentice-Hall, Inc.

Chapter 11 Student Lecture Notes 11-14

© 2004 Prentice-Hall, Inc. Chap 11-40

Randomized Blocked Design(Example)

22 hrs20 hrs29 hrs

28 hrs25 hrs27 hrs

31 hrs17 hrs21 hrsDependent

Variable(Response)

BlockedExperiment

Units

Factor Levels(Groups)

Factor (Training Method)

© 2004 Prentice-Hall, Inc. Chap 11-41

Randomized Block Design(Partition of Total Variation)

Variation Due to Group

SSA

Variation Among BlocksSSBL

Variation Among All

Observations SST

Commonly referred to as:Sum of Squares ErrorSum of Squares Unexplained

Commonly referred to as:Sum of Squares AmongAmong Groups Variation

=

+

+Variation Due

to Random Sampling

SSW

Commonly referred to as:Sum of Squares Among Blocks

© 2004 Prentice-Hall, Inc. Chap 11-42

Total Variation

( )

( )

2

1 1

the number of blocks the number of groups or levels the total number of observations

the value in the -th block for the -th treatment level

the mean of all va

c r

ijj i

ij

i

SST X X

rcn n rcX i j

X

= =

= −

==

= =

=

=

∑∑

lues in block the mean of all values for treatment level

1j

iX jdf n

• =

= −

Page 15: Chapter 11 Student Lecture Notes 11-1Statistics for Managers Using Microsoft Excel, 2/e © 1999 Prentice-Hall, Inc. Chapter 11 Student Lecture Notes 11-1 © 2004 Prentice-Hall, Inc.

Statistics for Managers Using Microsoft Excel, 2/e © 1999 Prentice-Hall, Inc.

Chapter 11 Student Lecture Notes 11-15

© 2004 Prentice-Hall, Inc. Chap 11-43

Among-Group Variation

( )2

1

1 (treatment group means)

1

1

c

jj

r

iji

j

SSA r X X

XX

rdf c

SSAMSAc

•=

=•

= −

=

= −

=−

© 2004 Prentice-Hall, Inc. Chap 11-44

Among-Block Variation

( )2

1

1 (block means)

1

1

r

ii

c

ijj

i

SSBL c X X

XX

cdf r

SSBLMSBLr

•=

=•

= −

=

= −

=−

© 2004 Prentice-Hall, Inc. Chap 11-45

Random Error

( )( )( )

( )( )

2

1 1

1 1

1 1

c r

ij i jj i

SSE X X X X

df r cSSEMSE

r c

• •= =

= − − +

= − −

=− −

∑∑

Page 16: Chapter 11 Student Lecture Notes 11-1Statistics for Managers Using Microsoft Excel, 2/e © 1999 Prentice-Hall, Inc. Chapter 11 Student Lecture Notes 11-1 © 2004 Prentice-Hall, Inc.

Statistics for Managers Using Microsoft Excel, 2/e © 1999 Prentice-Hall, Inc.

Chapter 11 Student Lecture Notes 11-16

© 2004 Prentice-Hall, Inc. Chap 11-46

Randomized Block F Test for Differences in c Means

No treatment effect

Test Statistic

Degrees of Freedom

0 1 2: cH µ µ µ• • •= = ••• =

1 : Not all are equaljH µ•

MSAFMSE

=

1 1df c= −( )( )2 1 1df r c= − −

0

α

UF F

Reject

© 2004 Prentice-Hall, Inc. Chap 11-47

Summary Table

SSTrc – 1Total

MSE = SSE/[(r – 1)•(c– 1)]

SSE(r – 1) •(c – 1)Error

MSBL/MSE

MSA/MSE

FStatistic

MSBL =SSBL/(r – 1)

SSBLr – 1AmongBlocks

MSA = SSA/(c – 1)SSAc – 1Among

Groups

Mean Squares

Sum ofSquares

Degrees of Freedom

Source ofVariation

© 2004 Prentice-Hall, Inc. Chap 11-48

Randomized Block Design: Example

As production manager, you want to see if 3 filling machines have different mean filling times. You assign 15 workers with varied experience into 5 groups of 3 based on similarity of their experience, and assigned each group of 3 workers with similar experience to the machines. At the .05 significance level, is there a difference in mean filling times?

Machine1 Machine2 Machine325.40 23.40 20.0026.31 21.80 22.2024.10 23.50 19.7523.74 22.75 20.6025.10 21.60 20.40

Page 17: Chapter 11 Student Lecture Notes 11-1Statistics for Managers Using Microsoft Excel, 2/e © 1999 Prentice-Hall, Inc. Chapter 11 Student Lecture Notes 11-1 © 2004 Prentice-Hall, Inc.

Statistics for Managers Using Microsoft Excel, 2/e © 1999 Prentice-Hall, Inc.

Chapter 11 Student Lecture Notes 11-17

© 2004 Prentice-Hall, Inc. Chap 11-49

Randomized Block Design Example Computation

Machine1 Machine2 Machine325.40 23.40 20.0026.31 21.80 22.2024.10 23.50 19.7523.74 22.75 20.6025.10 21.60 20.40

( ) ( ) ( )

( )

2 2 25 24.93 22.71 22.61 22.71 20.59 22.71

47.164 8.4025

/( -1) 47.16 / 2 23.5820

/ ( -1) 1 8.4025 / 8 1.0503

SSA

SSEMSA SSA c

MSE SSE r c

⎡ ⎤= − + − + −⎣ ⎦=== = =

= − = =⎡ ⎤⎣ ⎦

1

2

3

24.9322.6120.59

22.71

XXX

X

=

=

=

=

5315

rcn

===

© 2004 Prentice-Hall, Inc. Chap 11-50

Randomized Block Design Example: Summary Table

SST=58.217214Total

MSE = 1.0503

SSE=8.40258Error

.6627/1.0503=.6039

23.582/1.0503=22.452

FStatistic

MSBL =.6627

SSBL=2.65074Among

Blocks

MSA = 23.582

SSA=47.1642Among

Groups

Mean Squares

Sum ofSquares

Degrees of Freedom

Source ofVariation

© 2004 Prentice-Hall, Inc. Chap 11-51

Randomized Block Design Example: Solution

F0 4.46

H0: µ1 = µ2 = µ3

H1: Not All Equalα = .05df1= 2 df2 = 8

Critical Value(s):

Test Statistic:

Decision:

Conclusion:Reject at α = 0.05.

There is evidence that atleast one µ j differs fromthe rest.

α = 0.05

FMSAMSE

= = =23 5821.0503

22.45.

Page 18: Chapter 11 Student Lecture Notes 11-1Statistics for Managers Using Microsoft Excel, 2/e © 1999 Prentice-Hall, Inc. Chapter 11 Student Lecture Notes 11-1 © 2004 Prentice-Hall, Inc.

Statistics for Managers Using Microsoft Excel, 2/e © 1999 Prentice-Hall, Inc.

Chapter 11 Student Lecture Notes 11-18

© 2004 Prentice-Hall, Inc. Chap 11-52

Randomized Block Designin Excel

Tools | Data Analysis | ANOVA: Two Factor Without ReplicationExample Solution in Excel Spreadsheet

Microsoft Excel Worksheet

© 2004 Prentice-Hall, Inc. Chap 11-53

The Tukey Procedure

Similar to the Tukey Procedure for the Completely Randomized Design Case

Critical Range

( )( )( , 1 1 )Critical Range U c r cMSEQ

r− −=

© 2004 Prentice-Hall, Inc. Chap 11-54

The Tukey Procedure: Example1. Compute absolute mean

differences:Machine1 Machine2 Machine325.40 23.40 20.0026.31 21.80 22.2024.10 23.50 19.7523.74 22.75 20.6025.10 21.60 20.40

1 2

1 3

2 3

24.93 22.61 2.32

24.93 20.59 4.34

22.61 20.59 2.02

X X

X X

X X

• •

• •

• •

− = − =

− = − =

− = − =2. Compute critical range:

3. All of the absolute mean differences are greater. There is a significance difference between each pair of means at 5% level of significance.

( )( )( , 1 1 )1.0503Critical Range 4.04 1.8516

5U c r cMSEQ

r− −= = =

Page 19: Chapter 11 Student Lecture Notes 11-1Statistics for Managers Using Microsoft Excel, 2/e © 1999 Prentice-Hall, Inc. Chapter 11 Student Lecture Notes 11-1 © 2004 Prentice-Hall, Inc.

Statistics for Managers Using Microsoft Excel, 2/e © 1999 Prentice-Hall, Inc.

Chapter 11 Student Lecture Notes 11-19

© 2004 Prentice-Hall, Inc. Chap 11-55

Two-Way ANOVA

Examines the Effect of:Two factors 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?

© 2004 Prentice-Hall, Inc. Chap 11-56

Two-Way ANOVA

AssumptionsNormality

Populations are normally distributed

Homogeneity of Variance

Populations have equal variances

Independence of Errors

Independent random samples are drawn

(continued)

© 2004 Prentice-Hall, Inc. Chap 11-57

SSE

Two-Way ANOVA Total Variation Partitioning

Variation Due to Factor A

Variation Due to Random Sampling

Variation Due to Interaction

SSA

SSABSST

Variation Due to Factor B

SSB

Total Variation

d.f.= n-1

d.f.= r-1

=

+

+d.f.= c-1

+d.f.= (r-1)(c-1)

d.f.= rc(n’-1)

Page 20: Chapter 11 Student Lecture Notes 11-1Statistics for Managers Using Microsoft Excel, 2/e © 1999 Prentice-Hall, Inc. Chapter 11 Student Lecture Notes 11-1 © 2004 Prentice-Hall, Inc.

Statistics for Managers Using Microsoft Excel, 2/e © 1999 Prentice-Hall, Inc.

Chapter 11 Student Lecture Notes 11-20

© 2004 Prentice-Hall, Inc. Chap 11-58

Two-Way ANOVA Total Variation Partitioning

'

the number of levels of factor Athe number of levels of factor Bthe number of values (replications) for each cellthe total number of observations in the experiment

the value of the -th oijk

rcnnX k

==

=== bservation for level of

factor A and level of factor Bi

j

© 2004 Prentice-Hall, Inc. Chap 11-59

Total Variation

( )

' '

' 2

1 1 1

1 1 1 1 1 1'

Sum of Squares Total = total variation among all observations around the grand mean

the overall or grand mean

r c n

ijki j k

r c n r c n

ijk ijki j k i j k

SST X X

X XX

rcn n

= = =

= = = = = =

= −

= =

=

∑∑∑

∑∑∑ ∑∑∑

© 2004 Prentice-Hall, Inc. Chap 11-60

Factor A Variation

( )2'

1

r

ii

SSA cn X X••

=

= −∑

Sum of Squares Due to Factor A = the difference among the means of the various levels of factor A and the grand mean

Page 21: Chapter 11 Student Lecture Notes 11-1Statistics for Managers Using Microsoft Excel, 2/e © 1999 Prentice-Hall, Inc. Chapter 11 Student Lecture Notes 11-1 © 2004 Prentice-Hall, Inc.

Statistics for Managers Using Microsoft Excel, 2/e © 1999 Prentice-Hall, Inc.

Chapter 11 Student Lecture Notes 11-21

© 2004 Prentice-Hall, Inc. Chap 11-61

Factor B Variation

( )2'

1

c

jj

SSB rn X X• •

=

= −∑

Sum of Squares Due to Factor B = the difference among the means of the various levels of factor B and the grand mean

© 2004 Prentice-Hall, Inc. Chap 11-62

Interaction Variation

( )2'

1 1

r c

ij i ji j

SSAB n X X X X• •• • •

= =

= − − +∑∑

Sum of Squares Due to Interaction between A and B = the effect of the combinations of factor A and

factor B

© 2004 Prentice-Hall, Inc. Chap 11-63

Random Error

Sum of Squares Error = the differences among the observations within

each cell and the corresponding cell means

( )' 2

1 1 1

r c n

ijijki j k

SSE X X •

= = =

= −∑∑∑

Page 22: Chapter 11 Student Lecture Notes 11-1Statistics for Managers Using Microsoft Excel, 2/e © 1999 Prentice-Hall, Inc. Chapter 11 Student Lecture Notes 11-1 © 2004 Prentice-Hall, Inc.

Statistics for Managers Using Microsoft Excel, 2/e © 1999 Prentice-Hall, Inc.

Chapter 11 Student Lecture Notes 11-22

© 2004 Prentice-Hall, Inc. Chap 11-64

Two-Way ANOVA:The F Test Statistic

F Test for Factor B Main Effect

F Test for Interaction Effect

H0: µ1 ..= µ2 .. = ••• = µr ..

H1: Not all µi .. are equal

H0: ΑΒij = 0 (for all i and j)

H1: ΑΒij ≠ 0

H0: µ.1. = µ.2. = ••• = µ.c.

H1: Not all µ.j. are equal

Reject if F > FU

Reject if F > FU

Reject if F > FU

1

MSA SSAF MSAMSE r

= =−

F Test for Factor A Main Effect

1

MSB SSBF MSBMSE c

= =−

( )( )

1 1MSAB SSABF MSABMSE r c

= =− −

© 2004 Prentice-Hall, Inc. Chap 11-65

Two-Way ANOVASummary Table

SSTr•c •n’ – 1Total

MSE = SSE/[r•c •(n’ – 1)]

SSEr•c •(n’ – 1)Error

MSAB/MSE

MSB/MSE

MSA/MSE

FStatistic

MSAB =SSAB/ [(r – 1)(c – 1)]SSAB(r – 1)(c – 1)AB

(Interaction)

MSB =SSB/(c – 1)

SSBc – 1Factor B(Column)

MSA = SSA/(r – 1)SSAr – 1Factor A

(Row)

Mean Squares

Sum ofSquares

Degrees of Freedom

Source ofVariation

© 2004 Prentice-Hall, Inc. Chap 11-66

Features of Two-Way ANOVA F Test

Degrees of Freedom Always Add Uprcn’-1=rc(n’-1)+(c-1)+(r-1)+(c-1)(r-1)Total=Error+Column+Row+Interaction

The Denominator of the F Test is Always the Same but the Numerator is Different

The Sums of Squares Always Add UpTotal=Error+Column+Row+Interaction

Page 23: Chapter 11 Student Lecture Notes 11-1Statistics for Managers Using Microsoft Excel, 2/e © 1999 Prentice-Hall, Inc. Chapter 11 Student Lecture Notes 11-1 © 2004 Prentice-Hall, Inc.

Statistics for Managers Using Microsoft Excel, 2/e © 1999 Prentice-Hall, Inc.

Chapter 11 Student Lecture Notes 11-23

© 2004 Prentice-Hall, Inc. Chap 11-67

Kruskal-Wallis Rank Test

Used to Analyze Completely Randomized Experimental Designs Extension of Wilcoxon Rank Sum Test

Tests the equality of more than 2 population medians

Distribution-Free Test ProcedureUse χ2 Distribution to Approximate if Each Sample Group Size nj > 5

df = c – 1

© 2004 Prentice-Hall, Inc. Chap 11-68

Kruskal-Wallis Rank Test

AssumptionsIndependent random samples are drawnContinuous dependent variableData may be ranked both within and among samplesPopulations have same variabilityPopulations have same shape

Robust with Regard to Last 2 ConditionsUse F test in completely randomized designs and when the more stringent assumptions hold

© 2004 Prentice-Hall, Inc. Chap 11-69

Kruskal-Wallis Rank Test Procedure

Obtain RanksIn event of tie, each of the tied values gets their average rank

Add the Ranks for Data from Each of the c Groups

Square to obtain Tj2

2

1

12 3( 1)( 1)

cj

j j

TH n

n n n=

⎡ ⎤= − +⎢ ⎥

+⎢ ⎥⎣ ⎦∑

1 2 cn n n n= + + +L

Page 24: Chapter 11 Student Lecture Notes 11-1Statistics for Managers Using Microsoft Excel, 2/e © 1999 Prentice-Hall, Inc. Chapter 11 Student Lecture Notes 11-1 © 2004 Prentice-Hall, Inc.

Statistics for Managers Using Microsoft Excel, 2/e © 1999 Prentice-Hall, Inc.

Chapter 11 Student Lecture Notes 11-24

© 2004 Prentice-Hall, Inc. Chap 11-70

Kruskal-Wallis Rank Test Procedure

Compute Test Statistic

# of observation in the j –th sample ; ( j = 1, 2, …, c )

sum of the ranks assigned to the j –thsample

square of H may be approximated by chi-square distribution with df = c –1 when each nj >5

(continued)

2

1

12 3( 1)( 1)

cj

j j

TH n

n n n=

⎡ ⎤= − +⎢ ⎥

+⎢ ⎥⎣ ⎦∑

1 2 cn n n n= + + +L

jn =

jT =

2jT = jT

© 2004 Prentice-Hall, Inc. Chap 11-71

Kruskal-Wallis Rank Test Procedure

Critical Value for a Given αUpper tail

Decision RuleReject H0: M1 = M2 = ••• = Mc if test statistic H >Otherwise, do not reject H0

(continued)

2χU

2χU

© 2004 Prentice-Hall, Inc. Chap 11-72

Machine1 Machine2 Machine325.40 23.40 20.0026.31 21.80 22.2024.10 23.50 19.7523.74 22.75 20.6025.10 21.60 20.40

Kruskal-Wallis Rank Test: Example

As production manager, you want to see if 3 filling machines have different median filling times. You assign 15 similarly trained & experienced workers, 5 per machine, to the machines. At the .05 significance level, is there a difference in median filling times?

Page 25: Chapter 11 Student Lecture Notes 11-1Statistics for Managers Using Microsoft Excel, 2/e © 1999 Prentice-Hall, Inc. Chapter 11 Student Lecture Notes 11-1 © 2004 Prentice-Hall, Inc.

Statistics for Managers Using Microsoft Excel, 2/e © 1999 Prentice-Hall, Inc.

Chapter 11 Student Lecture Notes 11-25

© 2004 Prentice-Hall, Inc. Chap 11-73

Machine1 Machine2 Machine314 9 215 6 712 10 111 8 413 5 3

Example Solution: Step 1 Obtaining a Ranking

Raw Data Ranks

65 38 17

Machine1 Machine2 Machine325.40 23.40 20.0026.31 21.80 22.2024.10 23.50 19.7523.74 22.75 20.6025.10 21.60 20.40

© 2004 Prentice-Hall, Inc. Chap 11-74

Example Solution: Step 2 Test Statistic Computation

212 3( 1)

( 1) 1

2 2 212 65 38 17 3(15 1)15(15 1) 5 5 5

11.58

Tc jH nn n nj j

⎡ ⎤⎢ ⎥= − +∑⎢ ⎥+ =⎢ ⎥⎣ ⎦

⎡ ⎤⎛ ⎞⎢ ⎥⎜ ⎟= + + − +

⎜ ⎟+⎢ ⎥⎝ ⎠⎣ ⎦=

© 2004 Prentice-Hall, Inc. Chap 11-75

Kruskal-Wallis Test Example Solution

H0: M1 = M2 = M3

H1: Not all equalα = .05df = c - 1 = 3 - 1 = 2Critical Value(s): Reject at

Test Statistic:

Decision:

Conclusion:There is evidence that population medians are not all equal.

α = .05

α = .05.

H = 11.58

0 5.991

Page 26: Chapter 11 Student Lecture Notes 11-1Statistics for Managers Using Microsoft Excel, 2/e © 1999 Prentice-Hall, Inc. Chapter 11 Student Lecture Notes 11-1 © 2004 Prentice-Hall, Inc.

Statistics for Managers Using Microsoft Excel, 2/e © 1999 Prentice-Hall, Inc.

Chapter 11 Student Lecture Notes 11-26

© 2004 Prentice-Hall, Inc. Chap 11-76

Kruskal-Wallis Test in PHStat

PHStat | c-Sample Tests | Kruskal-Wallis Rank Sum Test …Example Solution in Excel Spreadsheet

Microsoft Excel Worksheet

© 2004 Prentice-Hall, Inc. Chap 11-77

Friedman Rank Test

Used to Analyze Randomized Block Experimental DesignsTests the equality of more than 2 population medians

Distribution-Free Test Procedure

Use χ2 Distribution to Approximate if the Number of Blocks r > 5

df = c – 1

© 2004 Prentice-Hall, Inc. Chap 11-78

Friedman Rank Test

AssumptionsThe r blocks are independentThe random variable is continuousThe data constitute at least an ordinal scale of measurementNo interaction between the r blocks and the ctreatment levelsThe c populations have the same variabilityThe c populations have the same shape

Page 27: Chapter 11 Student Lecture Notes 11-1Statistics for Managers Using Microsoft Excel, 2/e © 1999 Prentice-Hall, Inc. Chapter 11 Student Lecture Notes 11-1 © 2004 Prentice-Hall, Inc.

Statistics for Managers Using Microsoft Excel, 2/e © 1999 Prentice-Hall, Inc.

Chapter 11 Student Lecture Notes 11-27

© 2004 Prentice-Hall, Inc. Chap 11-79

Friedman Rank Test:Procedure

Replace the c observations by their ranks in each of the r blocks; assign average rank for tiesTest statistic:

R.j2 is the square of the rank total for group j

FR can be approximated by a chi-square distribution with (c –1) degrees of freedomThe rejection region is in the right tail

( ) ( )2

1

12 3 11

c

R jj

F R r crc c ⋅

=

= − ++ ∑

© 2004 Prentice-Hall, Inc. Chap 11-80

Friedman Rank Test: ExampleAs production manager, you want to see if 3 filling machines have different median filling times. You assign 15 workers with varied experience into 5 groups of 3 based on similarity of their experience, and assigned each group of 3 workers with similar experience to the machines. At the .05 significance level, is there a difference in median filling times?

Machine1 Machine2 Machine325.40 23.40 20.0026.31 21.80 22.2024.10 23.50 19.7523.74 22.75 20.6025.10 21.60 20.40

© 2004 Prentice-Hall, Inc. Chap 11-81

Timing RankMachine 1 Machine 2 Machine 3 Machine 1 Machine 2 Machine 3

25.4 23.4 20 3 2 126.31 21.8 22.2 3 1 224.1 23.5 19.75 3 2 1

23.74 22.75 20.6 3 2 125.1 21.6 20.4 3 2 1

15 9 6225 81 36

Friedman Rank Test: Computation Table

2. jR. jR

( ) ( )

( ) ( ) ( ) ( ) ( ) ( )

2

1

12 3 11

12 342 3 5 4 8.45 3 4

c

R jj

F R r crc c ⋅

=

= − ++

= − =

Page 28: Chapter 11 Student Lecture Notes 11-1Statistics for Managers Using Microsoft Excel, 2/e © 1999 Prentice-Hall, Inc. Chapter 11 Student Lecture Notes 11-1 © 2004 Prentice-Hall, Inc.

Statistics for Managers Using Microsoft Excel, 2/e © 1999 Prentice-Hall, Inc.

Chapter 11 Student Lecture Notes 11-28

© 2004 Prentice-Hall, Inc. Chap 11-82

Friedman Rank Test Example Solution

H0: M1 = M2 = M3

H1: Not all equalα = .05df = c - 1 = 3 - 1 = 2Critical Value: Reject at

Test Statistic:

Decision:

Conclusion:There is evidence that population medians are not all equal.

α = .05

α = .05

FR = 8.4

0 5.991

© 2004 Prentice-Hall, Inc. Chap 11-83

Chapter Summary

Described the Completely Randomized Design: One-Way Analysis of Variance

ANOVA AssumptionsF Test for Differences in More than Two MeansThe Tukey-Kramer ProcedureLevene’s Test for Homogeneity of Variance

Discussed the Randomized Block DesignF Test for the Difference in More than Two MeansThe Tukey Procedure

© 2004 Prentice-Hall, Inc. Chap 11-84

Chapter Summary

Described the Factorial Design: Two-Way Analysis of Variance

Examine effects of factors and interaction

Discussed Kruskal-Wallis Rank Test: Nonparametric Analysis for the Completely Randomized Design

Illustrated Friedman Rank Test: Nonparametric Analysis for the Randomized Block Design

(continued)