Professional Documents
Culture Documents
Anova and Design of Experiments
Anova and Design of Experiments
1
General Experimental Setting
• Investigator Controls One or More Independent
Variables
– Called treatment variables or factors
– Each treatment factor contains two or more groups (or
levels)
• Observe Effects on Dependent Variable
– Response to groups (or levels) of independent variable
• Experimental Design: The Plan Used to Test
Hypothesis
2
Design of Experiments
• Completely randomized design (one way ANOVA)
3
Completely Randomized Design
• Experimental Units (Subjects) are Assigned
Randomly to Groups
– Subjects are assumed homogeneous
• Only One Factor or Independent Variable
– With 2 or more groups (or levels)
• Analyzed by One-way Analysis of Variance
(ANOVA)
4
ANOVA: Assumptions
ANOVA is a parametric statistic. So, it makes
assumptions about particular parameters of the
population:
– the treatment groups are independent
– samples are selected at random
– the populations from which the groups were
sampled are normally distributed
– the variances of each sample are roughly equal, or
homogeneous.
5
Randomized Design Example
Training example
7
Example
• H 0 : 1 2 c
• All population means are equal
– No treatment effect (no variation in means among
groups)
• H1 : Not all i are the same
– 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
9
One-way ANOVA
(No Treatment Effect)
H 0 : 1 2 c
H1 : Not all i are the same
The Null
Hypothesis is
True
1 2 3
10
One-way ANOVA
(Treatment Effect Present)
H 0 : 1 2 c
H1 : Not all i are the same The Null
Hypothesis is
NOT True
1 2 3 1 2 3
11
One-way ANOVA
(Partition of Total Variation)
Total Variation SST
SST ( X ij X ) 2
j 1 i 1
X
j 1 i 1
ij
X
2 2 2
SST X 11 X 21 X X nc c X
Response, X
c
SSA
SSA n j ( X j X ) 2
MSA
j 1 c 1
15
Among-Group Variation
(continued)
2 2 2
SSA n1 X 1 X n2 X 2 X nc X c X
Response, X
X3
X
X2
X1
SSW X 11 X 1 X 21 X 1 X nc c X c
2 2 2
Response, X
X3
X
X2
X1
j 19
One-way ANOVA
Summary Table
Degrees
Source Mean
of Sum of F
of Squares
Freedo Squares Statistic
Variation (Variance)
m
Among MSA =
c–1 SSA MSF/MSE
(Factor) SSA/(c – 1 )
Within MSE =
n–c SSW
(Error) SSE/(n – c )
SST =
Total n–1
SSA+ SSW
20
One-way Analysis of Variance
F Test
• Evaluate the Difference among the Mean Responses of 2 or
More (c ) Populations
– E.g. Several types of tires, oven temperature settings
• Assumptions
– Samples are randomly and independently drawn
• This condition must be met
– Populations are normally distributed
• F Test is robust to moderate departure from normality
– Populations have equal variances
• Less sensitive to this requirement when samples are
of equal size from each population
21
One-way ANOVA
F Test Statistic
• Test Statistic
MSA
– F = MSA/MSE
MSW
• MSA is mean squares among
• MSW is mean squares within
• Degrees of Freedom
– df1 c 1
– df 2 n c
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
23
Features of One-way ANOVA
F Statistic (continued)
24
Training example
Units
21 hrs 17 hrs 31 hrs
Dependent
Variable 27 hrs 25 hrs 28 hrs
(Response)
29 hrs 20 hrs 22 hrs
25
One-way ANOVA F Test
Example
As production manager, you want Machine1 Machine2 Machine3
to see if 3 machines have different 25.40 23.40 20.00
mean running times. You assign 26.31 21.80 22.20
15 similarly trained and 24.10 23.50 19.75
experienced workers, 5 per
23.74 22.75 20.60
machine, to the machines. At
the .05 significance level, is there 25.10 21.60 20.40
a difference in mean running
times?
26
One-way ANOVA Example: Scatter
Diagram
Machine1 Machine2 Machine3 Time in Seconds
27
25.40 23.40 20.00 26 •
26.31 21.80 22.20 ••
24.10 23.50 19.75
25 X1
24 •
23.74 22.75 20.60 • ••
25.10 21.60 20.40 23
• X2 •
X
22 ••
21
X 1 24.93 X 2 22.61 •• X3
20 ••
X 3 20.59 X 22.71 19
27
One-way ANOVA Example
Computations
Machine1 Machine2 Machine3 X 1 24.93 nj 5
25.40 23.40 20.00
26.31 21.80 22.20 X 2 22.61 c3
24.10 23.50 19.75 X 3 20.59 n 15
23.74 22.75 20.60
25.10 21.60 20.40 X 22.71
Degrees Mean
Source of Sum of F
of Squares
Variation Squares Statistic
Freedom (Variance)
Among MSA/MSW
3-1=2 47.1640 23.5820
(Factor) =25.60
Within
15-3=12 11.0532 .9211
(Error)
Total 15-1=14 58.2172
29
One-way ANOVA Example Solution
Test Statistic:
H0: 1 = 2 = 3
H1: Not All Equal MSA 23.5820
Ftest 25.6
= .05 MSE .9211
df1= 2 df2 = 12
Decision:
Critical Value(s): Reject at = 0.05
= 0.05 Conclusion:
There is evidence that at least
one i differs from the rest.
0 3.89 F
30
Multiple Comparison Procedures
• If H0 is rejected, we conclude that the means
are different
• We would like to know exactly where the
means differ
• This is where Multiple Comparison Procedures
come into play.
31
Post hoc tests (such as Tukey’s HSD test and
Scheffe’s tests) are used to make pair-by-pair
comparisons to pinpoint significant
differences.
– A priori comparisons: Similar to post hoc
tests, but used only when you planned the
comparison between groups before collecting
the data.
32
TUKEY’S HSD TEST
• Tukey’s Honestly Significant Difference test:
Limitation- it requires equal sample sizes.
• HSD n
• HSD = q,c,N-c MSE
n
q,c,N-c =critical value of the studentised range
distribution (Page no.783)
33
The Tukey-Kramer Procedure
• Tells which Population Means are Significantly Different
– e.g., 1 = 2 3
– 2 groups whose means f(X)
may be significantly
different
• Post Hoc (a posteriori) Procedure
1= 2 3 X
– Done after rejection of equal means in ANOVA
34
The Tukey-Kramer Procedure: Example
1. Compute absolute mean
Machine1 Machine2 Machine3 differences:
25.40 23.40 20.00
X 1 X 2 24.93 22.61 2.32
26.31 21.80 22.20
24.10 23.50 19.75 X 1 X 3 24.93 20.59 4.34
23.74 22.75 20.60
25.10 21.60 20.40 X 2 X 3 22.61 20.59 2.02
2. Compute Critical Range:
MSW 1 1
Critical Range QU ( c ,n c ) 1.618
2 nj nj'
3. All of the absolute mean differences are greater than
the critical range. There is a significance difference
between each pair of means at the 5% level of 35
significance.