Vous êtes sur la page 1sur 74

Statistics for Business and

Economics

Chapter 8
Design of Experiments and
Analysis of Variance
Learning Objectives
1. Describe Analysis of Variance (ANOVA)
2. Explain the Rationale of ANOVA
3. Compare Experimental Designs
4. Test the Equality of 2 or More Means
• Completely Randomized Design
• Factorial Design
Experiments
Experiment

• Investigator controls one or more independent


variables
– Called treatment variables or factors
– Contain two or more levels (subcategories)
• Observes effect on dependent variable
– Response to levels of independent variable
• Experimental design: plan used to test
hypotheses
Examples of Experiments

1. Thirty stores are randomly assigned 1


of 4 (levels) store displays (independent
variable) to see the effect on sales
(dependent variable).
2. Two hundred consumers are randomly
assigned 1 of 3 (levels) brands of juice
(independent variable) to study reaction
(dependent variable).
Experimental Designs

Experimental
Designs

Completely Factorial
Randomized

One-Way Two-Way
ANOVA ANOVA
Completely Randomized
Design
Experimental Designs

Experimental
Designs

Completely Factorial
Randomized

One-Way Two-Way
ANOVA ANOVA
Completely Randomized
Design
• Experimental units (subjects) are assigned
randomly to treatments
– Subjects are assumed homogeneous
• One factor or independent variable
– Two or more treatment levels or
classifications
• Analyzed by one-way ANOVA
Randomized Design Example

Factor (Training Method)


Factor levels Level 1 Level 2 Level 3
(Treatments)
Experimental
units   
Dependent 21 hrs. 17 hrs. 31 hrs.
variable 27 hrs. 25 hrs. 28 hrs.
(Response) 29 hrs. 20 hrs. 22 hrs.
One-Way ANOVA F-Test
Experimental Designs

Experimental
Designs

Completely Factorial
Randomized

One-Way Two-Way
ANOVA ANOVA
One-Way ANOVA F-Test

• Tests the equality of two or more (k)


population means
• Variables
– One nominal scaled independent variable
 Two or more (k) treatment levels or
classifications
– One interval or ratio scaled dependent
variable
• Used to analyze completely randomized
experimental designs
Conditions Required for a Valid
ANOVA F-test:
Completely Randomized Design
1. Randomness and independence of errors
• Independent random samples are drawn
2. Normality
• Populations are approximately normally
distributed
3. Homogeneity of variance
• Populations have equal variances
One-Way ANOVA F-Test
Hypotheses
• H0: 1 = 2 = 3 = ... = k
— All population means f(X)
are equal
— No treatment effect

• Ha: Not All i Are Equal 1 = 2 = 3


X
— At least 2 pop. means
are different
f(X)
— Treatment effect
— 1  2  ...  k is
Wrong
X
1 =  2  3
Why Variances?
• Same treatment variation Different treatment variation
• Different random variation Same random variation

A Pop 1 Pop 2 Pop 3 B Pop 1 Pop 2 Pop 3

Pop 5 Pop 5
Pop 4 Pop 6 Pop 4 Pop 6

Variances WITHIN differ Variances AMONG differ


Possible to conclude means are equal!
One-Way ANOVA
Basic Idea
1. Compares two types of variation to test
equality of means
2. Comparison basis is ratio of variances
3. If treatment variation is significantly greater
than random variation then means are not
equal
4. Variation measures are obtained by
‘partitioning’ total variation
One-Way ANOVA
Partitions Total Variation

Total variation

Variation due to Variation due to


treatment random sampling

• Sum of Squares Among • Sum of Squares Within


• Sum of Squares Between • Sum of Squares Error
• Sum of Squares Treatment • Within Groups Variation
• Among Groups Variation
Total Variation

SS Total    X11  X    X 21  X     X kj  X 
2 2 2

Response, X

Group 1 Group 2 Group 3


Treatment Variation
SST  n1 X 1  X   n2 X 2  X     nk X k  X 
2 2 2

Response, X

X3
X
X2
X1

Group 1 Group 2 Group 3


Random (Error) Variation
SSE   X11  X1    X 21  X 2     X kj  X k 
2 2 2

Response, X

X3
X2
X1

Group 1 Group 2 Group 3


One-Way ANOVA F-Test
Test Statistic
1. Test Statistic
• F = MST / MSE
— MST is Mean Square for Treatment
— MSE is Mean Square for Error

2. Degrees of Freedom
• 1 = k - 1
• 2 = n - k
— k = Number of groups
— n = Total sample size
One-Way ANOVA
Summary Table

Degrees Mean
Source of Sum of
of Square F
Variation Squares
Freedom (Variance)
Treatment k-1 SST MST = MST
SST/(k - 1) MSE
Error n-k SSE MSE =
SSE/(n - k)
Total n-1 SS(Total) =
SST+SSE
One-Way ANOVA F-Test
Critical Value
If means are equal, F
= MST / MSE  1.
Only reject large F! Reject H 0

Do Not 
Reject H 0

0 F
F(α; k – 1, n – k)

Always One-Tail!
© 1984-1994 T/Maker Co.
One-Way ANOVA F-Test
Example
As production manager, you
want to see if three filling Mach1 Mach2 Mach3
machines have different mean 25.40 23.40 20.00
filling times. You assign 15 26.31 21.80 22.20
similarly trained and 24.10 23.50 19.75
experienced workers, 5 per 23.74 22.75 20.60
machine, to the machines. At 25.10 21.60 20.40
the .05 level of significance,
is there a difference in mean
filling times?
One-Way ANOVA F-Test
Solution
• H0: 1 = 2 = 3
Test Statistic:
• Ha: Not all equal
•  = .05
• 1 = 2 2 = 12
• Critical Value(s):
Decision:
 = .05
Conclusion:

0 3.89 F
Summary Table
Solution
From Computer
Degrees Mean
Source of Sum of
of Square F
Variation Squares (Variance)
Freedom

Treatment 3-1=2 47.1640 23.5820 25.60


(Machines)
Error 15 - 3 = 12 11.0532 .9211

Total 15 - 1 = 14 58.2172
One-Way ANOVA F-Test
Solution
• H0: 1 = 2 = 3
Test Statistic:
• Ha: Not All Equal
MST 23 .5820
•  = .05 F   25.6
• 1 = 2 2 = 12 MSE .9211
• Critical Value(s):
Decision:
Reject at  = .05
 = .05
Conclusion:
There is evidence population
0 3.89 F means are different
One-Way ANOVA F-Test
Thinking Challenge
You’re a trainer for Microsoft
Corp. Is there a difference in
mean learning times of 12 people
using 4 different training methods
( =.05)?
© 1984-1994 T/Maker Co.
M1 M2 M3 M4
10 11 13 18
9 16 8 23
5 9 9 25
Use the following table.
Summary Table
(Partially Completed)

Degrees Mean
Source of Sum of
of Square F
Variation Squares (Variance)
Freedom
Treatment 348
(Methods)
Error 80

Total
One-Way ANOVA F-Test
Solution*
• H0: 1 = 2 = 3 = 4
Test Statistic:
• Ha: Not all equal
•  = .05
• 1 = 3 2 = 8
• Critical Value(s):
Decision:
 = .05
Conclusion:

0 4.07 F
Summary Table
Solution*
Degrees Mean
Source of Sum of
of Square F
Variation Squares (Variance)
Freedom
Treatment 4-1=3 348 116 11.6
(Methods)
Error 12 - 4 = 8 80 10

Total 12 - 1 = 11 428
One-Way ANOVA F-Test
Solution*
• H0: 1 = 2 = 3 = 4
Test Statistic:
• Ha: Not All Equal
MST 116
•  = .05 F   11.6
• 1 = 3 2 = 8 MSE 10
• Critical Value(s):
Decision:
Reject at  = .05
 = .05
Conclusion:
There is evidence population
0 4.07 F means are different
Tukey Procedure
• Tells which population
means are significantly
different
– Example: μ1 = μ 2 ≠ μ 3 f(X)

• Post hoc procedure


– Done after rejection of 1 = 2 3 X
equal means in ANOVA
• Output from many 2 Groupings
statistical computer
programs
Randomized Block Design
• Reduces sampling variability (MSE)
• Matched sets of experimental units (blocks)
• One experimental unit from each block is
randomly assigned to each treatment
Randomized Block Design
Total Variation Partitioning
Total Variation
SS(Total)

Variation Due Variation Due


to Treatment to Blocks
SST SSB

Variation Due to
Random Sampling
SSE
Conditions Required for a Valid
ANOVA F-test:
Randomized Block Design
1. The blocks are randomly selected, and all
treatments are applied (in random order) to
each block
2. The distributions of observations
corresponding to all block-treatment
combinations are approximately normal
3. All block-treatment distributions have equal
variances
Randomized Block Design
F-Test Test Statistic
1. Test Statistic
• F = MST / MSE
— MST is Mean Square for Treatment
— MSE is Mean Square for Error
2. Degrees of Freedom
• 1 = k – 1 2 = n – k – b + 1
— k = Number of groups
— n = Total sample size
— b = Number of blocks
Randomized Block Design
Example
A production manager wants to see if three assembly
methods have different mean assembly times (in
minutes). Five employees were selected at random and
assigned to use each assembly method. At the .05 level
of significance, is there a difference in mean assembly
times?
Employee Method 1 Method 2 Method 3
1 5.4 3.6 4.0
2 4.1 3.8 2.9
3 6.1 5.6 4.3
4 3.6 2.3 2.6
5 5.3 4.7 3.4
Random Block Design F-Test
Solution*
• H0: 1 = 2 = 3
Test Statistic:
• Ha: Not all equal
•  = .05
• 1 = 2 2 = 8
• Critical Value(s):
Decision:
 = .05
Conclusion:

0 4.46 F
Summary Table
Solution*
Degrees Mean
Source of Sum of
of Square F
Variation Squares (Variance)
Freedom
Treatment 3-1=2 5.43 2.71 12.9
(Methods)
Block 5-1=4 10.69 2.67 12.7
(Employee)

Error 15 - 3 - 5 + 1 1.68 .21


=8
Total 15 - 1 = 14 17.8
Random Block Design F-Test
Solution*
• H0: 1 = 2 = 3
Test Statistic:
• Ha: Not all equal
MST 2.71
•  = .05 F   12.9
• 1 = 2 2 = 8 MSE .21
• Critical Value(s):
Decision:
Reject at  = .05
 = .05
Conclusion:
There is evidence population
0 4.46 F means are different
Factorial Experiments
Experimental Designs

Experimental
Designs

Completely Factorial
Randomized

One-Way Two-Way
ANOVA ANOVA
Factorial Design
• Experimental units (subjects) are assigned
randomly to treatments
– Subjects are assumed homogeneous
• Two or more factors or independent
variables
– Each has two or more treatments (levels)
• Analyzed by two-way ANOVA
Two-Way ANOVA
Data Table
Factor Factor B
A 1 2 ... b Observation k
1 X111 X121 ... X1b1
X112 X122 ... X1b2 Xijk
2 X211 X221 ... X2b1
X212 X222 ... X2b2 Level i Level j
: : : : : Factor Factor
a Xa11 Xa21 ... Xab1 A B

Xa12 Xa22 ... Xab2


Treatment
Factorial Design
Example
Factor 2 (Training Method)
Factor Level 1 Level 2 Level 3
Levels

Level 1 15 hr.  10 hr.  22 hr. 


(High)
Factor 1 11 hr.  12 hr.  17 hr. 
(Motivation)
Level 2 27 hr.  15 hr.  31 hr. 
(Low)
29 hr.  17 hr.  49 hr. 
Treatment
Advantages
of Factorial Designs
• Saves time and effort
– e.g., Could use separate completely
randomized designs for each variable
• Controls confounding effects by putting
other variables into model
• Can explore interaction between variables
Two-Way ANOVA
Experimental Designs

Experimental
Designs

Completely Factorial
Randomized

One-Way Two-Way
ANOVA ANOVA
Two-Way ANOVA

• Tests the equality of two or more population


means when several independent variables
are used
• Same results as separate one-way ANOVA
on each variable
– No interaction can be tested
• Used to analyze factorial designs
Interaction
• Occurs when effects of one factor vary according to
levels of other factor
• When significant, interpretation of main effects (A
and B) is complicated
• Can be detected
– In data table, pattern of cell means in one row
differs from another row
– In graph of cell means, lines cross
Graphs of Interaction
Effects of motivation (high or low) and training
method (A, B, C) on mean learning time
Interaction No Interaction
Average Average
Response High Response High

Low Low

A B C A B C
Two-Way ANOVA
Total Variation Partitioning
Total Variation
SS(Total)

Variation Due Variation Due


to Treatment A to Treatment B
SSA SSB

Variation Due to Variation Due to


Interaction Random Sampling
SS(AB) SSE
Conditions Required for
Valid F-Tests in Factorial
Experiments
1. Normality
• Populations are approximately normally
distributed
2. Homogeneity of variance
• Populations have equal variances
3. Independence of errors
• Independent random samples are drawn
Two-Way ANOVA
Hypotheses
• Test for Treatment Means
H0: The ab treatment means are equal
Ha: At least two of the treatment means differ
• Test Statistic
F = MST / MSE
• Degrees of Freedom
1 = ab – 1 2 = n – ab
Two-Way ANOVA
Hypotheses
• Test for Factor Interaction
H0: The factors do not interact
Ha: The factors do interact
• Test Statistic
F = MS(AB) / MSE
• Degrees of Freedom
1 = (a – 1)(b – 1) 2 = n – ab
Two-Way ANOVA
Hypotheses
• Test for Main Effect of Factor A
H0: No difference among mean levels of factor A
Ha: At least two factor A mean levels differ
• Test Statistic
F = MS(A) / MSE
• Degrees of Freedom
1 = (a – 1) 2 = n – ab
Two-Way ANOVA
Hypotheses
• Test for Main Effect of Factor B
H0: No difference among mean levels of factor B
Ha: At least two factor B mean levels differ
• Test Statistic
F = MS(B) / MSE
• Degrees of Freedom
1 = (b – 1) 2 = n – ab
Two-Way ANOVA
Summary Table
Source of Degrees of Sum of Mean F
Variation Freedom Squares Square
A a-1 SS(A) MS(A) MS(A)
(Row) MSE
B b-1 SS(B) MS(B) MS(B)
(Column) MSE
AB (a - 1)(b - 1) SS(AB) MS(AB) MS(AB)
(Interaction) MSE
Error n - ab SSE MSE
Total n-1 SS(Total) Same as other
designs
Factorial Design
Example
Human Resources wants to determine if training time is
different based on motivation level and training method.
Conduct the appropriate ANOVA tests. Use α = .05 for
each test.
Training Method
Factor Self–
Levels paced Classroom Computer
15 hr. 10 hr. 22 hr.
High
11 hr. 12 hr. 17 hr.
Motivation
27 hr. 15 hr. 31 hr.
Low
29 hr. 17 hr. 49 hr.
Treatment Means F-Test
Solution
• H0: The 6 treatment
Test Statistic:
means are equal
• Ha: At least 2 differ
•  = .05
• 1 = 5 2 = 6
• Critical Value(s): Decision:

 = .05 Conclusion:

0 4.39 F
Two-Way ANOVA
Summary Table

Source of Degrees of Sum of Mean F


Variation Freedom Squares Square
Model 5 546.75 240.35 7.65

Error 6 188.5 31.42

Corrected
11 735.25
Total
Treatment Means F-Test
Solution
• H0: The 6 treatment
Test Statistic:
means are equal
• Ha: At least 2 differ F
MST
 7.65
•  = .05 MSE
• 1 = 5 2 = 6
• Critical Value(s): Decision:
Reject at  = .05
 = .05
Conclusion:
There is evidence population
0 4.39 F means are different
Interaction F-Test
Solution
• H0:The factors do not
Test Statistic:
interact
• Ha:The factors interact
•  = .05
• 1 = 2 2 = 6
• Critical Value(s): Decision:

 = .05
Conclusion:

0 5.14 F
Two-Way ANOVA
Summary Table
Source of Degrees of Sum of Mean F
Variation Freedom Squares Square
A 1 546.75 546.75 17.40
(Row)
B 2 531.5 265.75 8.46
(Column)
AB 2 123.5 61.76 1.97
(Interaction)
Error 6 188.5 31.42
Total 11 SS(Total) Same as other
designs
Interaction F-Test
Solution
• H0: The factors do not
Test Statistic:
interact
• Ha: The factors interact F  MS ( AB)  1.97
•  = .05 MSE
• 1 = 2 2 = 6
• Critical Value(s): Decision:
Do not reject at  = .05
 = .05
Conclusion:
There is no evidence the
0 5.14 F factors interact
Main Factor A F-Test
Solution
• H0: No difference between
Test Statistic:
motivation levels
• Ha: Motivation levels differ
•  = .05
• 1 = 1 2 = 6
• Critical Value(s): Decision:

 = .05
Conclusion:

0 5.99 F
Two-Way ANOVA
Summary Table
Source of Degrees of Sum of Mean F
Variation Freedom Squares Square
A 1 546.75 546.75 17.40
(Row)
B 2 531.5 265.75 8.46
(Column)
AB 2 123.5 61.76 1.97
(Interaction)
Error 6 188.5 31.42
Total 11 SS(Total) Same as other
designs
Main Factor A F-Test
Solution
• H0: No difference between
Test Statistic:
motivation levels
• Ha: Motivation levels differ F
MS ( A)
 17.4
•  = .05 MSE
• 1 = 1 2 = 6
• Critical Value(s): Decision:
Reject at  = .05
 = .05
Conclusion:
There is evidence
0 5.99 F motivation levels differ
Main Factor B F-Test
Solution
• H0: No difference between
Test Statistic:
training methods
• Ha: Training methods differ
•  = .05
• 1 = 2 2 = 6
• Critical Value(s): Decision:

 = .05
Conclusion:

0 5.14 F
Two-Way ANOVA
Summary Table
Source of Degrees of Sum of Mean F
Variation Freedom Squares Square
A 1 546.75 546.75 17.40
(Row)
B 2 531.5 265.75 8.46
(Column)
AB 2 123.5 61.76 1.97
(Interaction)
Error 6 188.5 31.42
Total 11 SS(Total) Same as other
designs
Main Factor B F-Test
Solution
• H0: No difference between
Test Statistic:
training methods
• Ha: Training methods differ F  MS ( B )  8.46
•  = .05 MSE
• 1 = 2 2 = 6
• Critical Value(s): Decision:
Reject at  = .05
 = .05
Conclusion:
There is evidence
0 5.14 F training methods differ
Conclusion

1. Described Analysis of Variance (ANOVA)


2. Explained the Rationale of ANOVA
3. Compared Experimental Designs
4. Tested the Equality of 2 or More Means
• Completely Randomized Design
• Factorial Design

Vous aimerez peut-être aussi