Post-ANOVA Compariso..

advertisement
IE 340/440
PROCESS IMPROVEMENT
THROUGH PLANNED EXPERIMENTATION
Analysis of Variance
&
Post-ANOVA ANALYSIS
Dr. Xueping Li
University of Tennessee
© 2003 Prentice-Hall, Inc.
Chap 11-1
What If There Are More Than
Two Factor Levels?





The t-test does not directly apply
There are lots of practical situations where there are
either more than two levels of interest, or there are
several factors of simultaneous interest
The analysis of variance (ANOVA) is the appropriate
analysis “engine” for these types of experiments –
Chapter 3, textbook
The ANOVA was developed by Fisher in the early
1920s, and initially applied to agricultural experiments
Used extensively today for industrial experiments
© 2003 Prentice-Hall, Inc.
Chap 11-2
Figure 3.1 (p. 61)
A single-wafer plasma etching tool.
© 2003 Prentice-Hall, Inc.
Chap 11-3
Table 3.1 (p. 62)
Etch Rate Data (in Å/min) from the Plasma Etching Experiment)
© 2003 Prentice-Hall, Inc.
Chap 11-4
The Analysis of Variance (Sec. 3-3, pg. 65)




In general, there will be a levels of the factor, or a treatments,
and n replicates of the experiment, run in random order…a
completely randomized design (CRD)
N = an total runs
We consider the fixed effects case…the random effects case will
be discussed later
Objective is to test hypotheses about the equality of the a
treatment means
© 2003 Prentice-Hall, Inc.
Chap 11-5
Models for the Data
There are several ways to write a model for
the data:
yij     i   ij is called the effects model
Let i     i , then
yij  i   ij is called the means model
Regression models can also be employed
© 2003 Prentice-Hall, Inc.
Chap 11-6
The Analysis of Variance


The name “analysis of variance” stems from a
partitioning of the total variability in the response
variable into components that are consistent with a
model for the experiment
The basic single-factor ANOVA model is
 i  1, 2,..., a
yij     i   ij , 
 j  1, 2,..., n
  an overall mean,  i  ith treatment effect,
 ij  experimental error, NID(0,  2 )
© 2003 Prentice-Hall, Inc.
Chap 11-7
The Analysis of Variance

Total variability is measured by the total sum of
squares:
a
n
SST   ( yij  y.. )2
i 1 j 1

The basic ANOVA partitioning is:
a
n
a
n
2
(
y

y
)

[(
y

y
)

(
y

y
)]
 ij ..  i. .. ij i.
2
i 1 j 1
i 1 j 1
a
a
n
 n ( yi.  y.. )   ( yij  yi. ) 2
2
i 1
i 1 j 1
SST  SSTreatments  SS E
© 2003 Prentice-Hall, Inc.
Chap 11-8
The Analysis of Variance
SST  SSTreatments  SSE



A large value of SSTreatments reflects large differences in
treatment means
A small value of SSTreatments likely indicates no differences in
treatment means
Formal statistical hypotheses are:
H 0 : 1  2 
 a
H1 : At least one mean is different
© 2003 Prentice-Hall, Inc.
Chap 11-9
The Analysis of Variance


While sums of squares cannot be directly compared to test
the hypothesis of equal means, mean squares can be
compared.
A mean square is a sum of squares divided by its degrees of
freedom:
dfTotal  dfTreatments  df Error
an  1  a  1  a(n  1)
SS
SS E
MSTreatments  Treatments , MS E 
a 1
a(n  1)


If the treatment means are equal, the treatment and error
mean squares will be (theoretically) equal.
If treatment means differ, the treatment mean square will be
larger than the error mean square.
Chap 11-10
The Analysis of Variance is
Summarized in a Table



Computing…see text, pp 70 – 73
The reference distribution for F0 is the Fa-1, a(n-1) distribution
Reject the null hypothesis (equal treatment means) if
F0  F ,a1,a( n1)
© 2003 Prentice-Hall, Inc.
Chap 11-11
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 positive
df1 = a -1 will typically be small
df2 = N - c will typically be large
The Ratio Should Be Close to 1 if the Null is
True
© 2003 Prentice-Hall, Inc.
Chap 11-12
Features of One-Way ANOVA
F Statistic
(continued)

If the Null Hypothesis is False


The numerator should be greater than the
denominator
The ratio should be larger than 1
© 2003 Prentice-Hall, Inc.
Chap 11-13
The Reference Distribution:
© 2003 Prentice-Hall, Inc.
Chap 11-14
Table 3.1 (p. 62)
Etch Rate Data (in Å/min) from the Plasma Etching Experiment)
© 2003 Prentice-Hall, Inc.
Chap 11-15
Table 3.4 (p. 71)
ANOVA for the Plasma Etching Experiment
© 2003 Prentice-Hall, Inc.
Chap 11-16
Coding the observations

More about manual
calculation p.70-71
Table 3.5 (p. 72)
Coded Etch Rate Data for Example 3.2
© 2003 Prentice-Hall, Inc.
Chap 11-17
Graphical View of the Results
DESIGN-EXPERT Plot
Strength
One Factor Plot
25
X = A: Cotton Weight %
Design Points
20.5
2
Strength
2
2
2
16
2
11.5
7
2
2
15
20
25
30
A: Cotton Weight %
35
Chap 11-18
Model Adequacy Checking in the ANOVA
Text reference, Section 3-4, pg. 76






Checking assumptions is important
Normality
Constant variance
Independence
Have we fit the right model?
Later we will talk about what to do if some
of these assumptions are violated
© 2003 Prentice-Hall, Inc.
Chap 11-19
Model Adequacy Checking in the ANOVA
Res idual

Examination of residuals
(see text, Sec. 3-4, pg.
76)
-3.8
-1.55
0.7
2.95
5.2
eij  yij  yˆij



Design-Expert generates
the residuals
Residual plots are very
useful
Normal probability plot
of residuals
yt i l i b a b or p % l a mr o N
 yij  yi.
1
5
10
20
30
50
70
80
90
95
99
© 2003 Prentice-Hall, Inc.
Strength
DESIGN-EXPERT Plot
Normal plot of residuals
Chap 11-20
Table 3.6 (p. 76)
Etch Rate Data and Residuals from Example 3.1a.
© 2003 Prentice-Hall, Inc.
Chap 11-21
Figure 3.4 (p. 77)
Normal probability plot of
residuals for Example 3-1.
© 2003 Prentice-Hall, Inc.
Chap 11-22
Figure 3.5 (p. 78)
Plot of residuals versus run
order or time.
© 2003 Prentice-Hall, Inc.
Chap 11-23
Figure 3.6 (p. 79)
Plot of residuals versus fitted
values.
© 2003 Prentice-Hall, Inc.
Chap 11-24
Other
Important
Residual
ResidualsPlots
vs. Run
Residuals vs.
Predicted
DESIGN-EXPERT Plot
Strength
PERT Plot
5.2
5.2
2.95
2.95
2
Res iduals
Res iduals
2
0.7
2
2
0.7
-1.55
-1.55
2
2
2
-3.8
-3.8
9.80
12.75
15.70
Predicted
© 2003 Prentice-Hall, Inc.
18.65
21.60
1
4
7
10
13
16
19
22
25
Run Num ber
Chap 11-25
Post-ANOVA Comparison of Means






The analysis of variance tests the hypothesis of equal treatment
means
Assume that residual analysis is satisfactory
If that hypothesis is rejected, we don’t know which specific
means are different
Determining which specific means differ following an ANOVA is
called the multiple comparisons problem
There are lots of ways to do this…see text, Section 3-5, pg. 86
We will use pairwise t-tests on means…sometimes called Fisher’s
Least Significant Difference (or Fisher’s LSD) Method
© 2003 Prentice-Hall, Inc.
Chap 11-26
Tukey’s Test


H0: Mu_i = Mu_j ; H1: Mu_i <> Mu_j
T statistic
 Whether
y i.  y j .  T

Where


f is the DF of MSE
a is the number of groups
MSE
T  q (a, f )
n
© 2003 Prentice-Hall, Inc.
Chap 11-27
The Tukey-Kramer Procedure

Tells which Population Means are Significantly
Different



f(X)
1= 2
Post Hoc (A Posteriori) Procedure


E.g., 1 = 2  3
2 groups whose means
may be significantly
different
3
X
Done after rejection of equal means in ANOVA
Pairwise Comparisons

Compare absolute mean differences with critical
range
© 2003 Prentice-Hall, Inc.
Chap 11-28
The Tukey-Kramer Procedure:
Example
Machine1 Machine2 Machine3
25.40
23.40
20.00
26.31
21.80
22.20
24.10
23.50
19.75
23.74
22.75
20.60
25.10
21.60
20.40
2. Compute critical range:
Critical Range  QU ( c,nc )
1. Compute absolute mean
differences:
X 1  X 2  24.93  22.61  2.32
X 1  X 3  24.93  20.59  4.34
X 2  X 3  22.61  20.59  2.02
MSW  1 1 
    1.618
2  nj nj' 
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.
© 2003 Prentice-Hall, Inc.
Chap 11-29
Fisher’s LSD


H0: Mu_i = Mu_j
Least Significant Difference
 Whether y  y
i.
j .  LSD

Where
© 2003 Prentice-Hall, Inc.
LSD  t / 2, N a
2MSE
n
LSD  t / 2, N  a
1 1
(  ) MS E
ni n j
Chap 11-30
Design-Expert Output
Treatment Means (Adjusted, If Necessary)
Estimated
Standard
Mean
Error
1-15
9.80
1.27
2-20
15.40
1.27
3-25
17.60
1.27
4-30
21.60
1.27
5-35
10.80
1.27
Mean
Treatment Difference
1 vs 2
-5.60
1 vs 3
-7.80
1 vs 4
-11.80
1 vs 5
-1.00
2 vs 3
-2.20
2 vs 4
-6.20
2 vs 5
4.60
3 vs 4
-4.00
3 vs 5
6.80
4 vs 5
10.80
© 2003 Prentice-Hall, Inc.
DF
1
1
1
1
1
1
1
1
1
1
Standard
Error
1.80
1.80
1.80
1.80
1.80
1.80
1.80
1.80
1.80
1.80
t for H0
Coeff=0
-3.12
-4.34
-6.57
-0.56
-1.23
-3.45
2.56
-2.23
3.79
6.01
Prob > |t|
0.0054
0.0003
< 0.0001
0.5838
0.2347
0.0025
0.0186
0.0375
0.0012
< 0.0001
Chap 11-31
Figure 3.12 (p. 99)
Design-Expert computer output for
Example 3-1.
© 2003 Prentice-Hall, Inc.
Chap 11-32
Figure 3.13 (p. 100)
Minitab computer output for
Example 3-1.
© 2003 Prentice-Hall, Inc.
Chap 11-33
© 2003 Prentice-Hall, Inc.
Chap 11-34
Graphical Comparison of Means
Text, pg. 89
© 2003 Prentice-Hall, Inc.
Chap 11-35
For the Case of Quantitative Factors, a
Regression Model is often Useful
Response:Strength
ANOVA for Response Surface Cubic Model
Analysis of variance table [Partial sum of squares]
Sum of
Mean
F
Source Squares
DF Square Value Prob > F
Model
441.81
3 147.27
15.85 < 0.0001
A
90.84
1
90.84
9.78
0.0051
A2
343.21
1 343.21
36.93 < 0.0001
A3
64.98
1
64.98
6.99
0.0152
Residual 195.15
21
9.29
Lack of Fit 33.95
1
33.95
4.21 0.0535
Pure Error 161.20
20
8.06
Cor Total 636.96
24
Coefficient
Factor Estimate
Intercept 19.47
A-Cotton % 8.10
A2
-8.86
A3
-7.60
© 2003 Prentice-Hall, Inc.
Standard 95% CI 95% CI
DF Error
Low
High
1
0.95
17.49 21.44
1
2.59
2.71 13.49
1
1.46 -11.89
-5.83
1
2.87 -13.58
-1.62
VIF
9.03
1.00
9.03
Chap 11-36
The Regression Model
DESIGN-EXPERT Plot
Strength
25
X = A:in
Cotton
Weight %
Final Equation
Terms
of Actual Factors:
Design Points
20.5
2
2
Strength
Strength = +62.61143
-9.01143* Cotton Weight
% +0.48143 * Cotton
Weight %^2 -7.60000E003 * Cotton Weight %^3
One Factor Plot
2
2
16
2
11.5
2
This is an empirical model
of the experimental results
7
2
15.00
20.00
25.00
30.00
A: Cotton Weight %
35.00
Chap 11-37
Figure 3.7 (p. 83)
Plot of residuals versus ŷij for Example 3-5.
© 2003 Prentice-Hall, Inc.
Chap 11-38
Table 3.9 (p. 83)
Variance-Stabilizing Transformations
© 2003 Prentice-Hall, Inc.
Chap 11-39
Figure 3.8 (p. 84)
Plot of log Si versus y
log.
i
for the peak discharge data
from Example 3.5.
© 2003 Prentice-Hall, Inc.
Chap 11-40
Figure 3.12 (p. 99)
Design-Expert computer output for
Example 3-1.
© 2003 Prentice-Hall, Inc.
Chap 11-41
Figure 3.13 (p. 100)
Minitab computer output for
Example 3-1.
© 2003 Prentice-Hall, Inc.
Chap 11-42
Display on page 103
© 2003 Prentice-Hall, Inc.
y
Chap 11-43


Example 3-1 p70
EX3-1 p112
© 2003 Prentice-Hall, Inc.
Chap 11-44
© 2003 Prentice-Hall, Inc.
Chap 11-45
One-Way ANOVA F Test
Example
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?
© 2003 Prentice-Hall, Inc.
Machine1 Machine2
Machine3
25.40
26.31
24.10
23.74
25.10
23.40
21.80
23.50
22.75
21.60
20.00
22.20
19.75
20.60
20.40
Chap 11-46
One-Way ANOVA Example:
Scatter Diagram
Machine1 Machine2
Machine3
25.40
26.31
24.10
23.74
25.10
23.40
21.80
23.50
22.75
21.60
27
20.00
22.20
19.75
20.60
20.40
X 1  24.93
X 2  22.61
X 3  20.59
X  22.71
© 2003 Prentice-Hall, Inc.
26
25
24
23
22
21
20
•
••
•
•
X1
••
•
••
X2
•
••
••
X
X3
19
Chap 11-47
One-Way ANOVA Example
Computations
Machine1 Machine2 Machine3
25.40
26.31
24.10
23.74
25.10
23.40
21.80
23.50
22.75
21.60
20.00
22.20
19.75
20.60
20.40
X 1  24.93
nj  5
X 2  22.61
c3
n  15
X 3  20.59
X  22.71
2
2
2

SSA  5  24.93  22.71   22.61  22.71   20.59  22.71 


 47.164
SSW  4.2592  3.112  3.682  11.0532
MSA  SSA /(c -1)  47.16 / 2  23.5820
MSW  SSW /(n - c)  11.0532 /12  .9211
© 2003 Prentice-Hall, Inc.
Chap 11-48
Summary Table
Degrees
Source of
of
Variation
Freedom
Sum of
Squares
Mean
Squares
(Variance)
F
Statistic
MSA/MSW
=25.60
Among
(Factor)
3-1=2
47.1640
23.5820
Within
(Error)
15-3=12
11.0532
.9211
Total
15-1=14
58.2172
© 2003 Prentice-Hall, Inc.
Chap 11-49
One-Way ANOVA Example
Solution
Test Statistic:
H0: 1 = 2 = 3
H1: Not All Equal
 = .05
df1= 2
MSA
23.5820
 25.6
F

MSW
.9211
df2 = 12
Decision:
Reject at  = 0.05.
Critical Value(s):
 = 0.05
0
© 2003 Prentice-Hall, Inc.
3.89
F
Conclusion:
There is evidence that at
least one  i differs from
the rest.
Chap 11-50
Solution in Excel


Use Tools | Data Analysis | ANOVA: Single
Factor
Excel Worksheet that Performs the One-Factor
ANOVA of the Example
© 2003 Prentice-Hall, Inc.
Chap 11-51
The Tukey-Kramer Procedure

Tells which Population Means are Significantly
Different



f(X)
1= 2
Post Hoc (A Posteriori) Procedure


E.g., 1 = 2  3
2 groups whose means
may be significantly
different
3
X
Done after rejection of equal means in ANOVA
Pairwise Comparisons

Compare absolute mean differences with critical
range
© 2003 Prentice-Hall, Inc.
Chap 11-52
The Tukey-Kramer Procedure:
Example
Machine1 Machine2 Machine3
25.40
23.40
20.00
26.31
21.80
22.20
24.10
23.50
19.75
23.74
22.75
20.60
25.10
21.60
20.40
2. Compute critical range:
Critical Range  QU ( c,nc )
1. Compute absolute mean
differences:
X 1  X 2  24.93  22.61  2.32
X 1  X 3  24.93  20.59  4.34
X 2  X 3  22.61  20.59  2.02
MSW  1 1 
    1.618
2  nj nj' 
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.
© 2003 Prentice-Hall, Inc.
Chap 11-53
Solution in PHStat


Use PHStat | c-Sample Tests | Tukey-Kramer
Procedure …
Excel Worksheet that Performs the TukeyKramer Procedure for the Previous Example
© 2003 Prentice-Hall, Inc.
Chap 11-54
Levene’s Test for
Homogeneity of Variance

The Null Hypothesis

H0 : 12   22    c2


The c population variances are all equal
The Alternative Hypothesis
2
 H : Not all 
1
j are equal ( j  1, 2,

, c)
Not all the c population variances are equal
© 2003 Prentice-Hall, Inc.
Chap 11-55
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.
© 2003 Prentice-Hall, Inc.
Chap 11-56
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?
© 2003 Prentice-Hall, Inc.
Machine1 Machine2
Machine3
25.40
26.31
24.10
23.74
25.10
23.40
21.80
23.50
22.75
21.60
20.00
22.20
19.75
20.60
20.40
Chap 11-57
Levene’s Test:
Absolute Difference from the Median
median
Machine1
25.4
26.31
24.1
23.74
25.1
25.1
© 2003 Prentice-Hall, Inc.
Time
Machine2 Machine3
23.4
20
21.8
22.2
23.5
19.75
22.75
20.6
21.6
20.4
22.75
20.4
abs(Time - median(Time))
Machine1 Machine2 Machine3
0.3
0.65
0.4
1.21
0.95
1.8
1
0.75
0.65
1.36
0
0.2
0
1.15
0
Chap 11-58
Summary Table
SUMMARY
Groups
Machine1
Machine2
Machine3
Count
5
5
5
ANOVA
Source of Variation
SS
Between Groups
0.067453
Within Groups
4.17032
Total
© 2003 Prentice-Hall, Inc.
4.237773
Sum
Average Variance
3.87
0.774 0.35208
3.5
0.7
0.19
3.05
0.61 0.5005
df
MS
F
P-value
F crit
2 0.033727 0.097048 0.908218 3.88529
12 0.347527
14
Chap 11-59
Levene’s Test Example:
Solution
Test Statistic:
H0: 12   22   32
H1: Not All Equal
 = .05
df1= 2
MSA 0.0337
F

 0.0970
MSW 0.3475
df2 = 12
Decision:
Critical Value(s):
Do not reject at  = 0.05.
 = 0.05
0
© 2003 Prentice-Hall, Inc.
3.89
F
Conclusion:
There is no evidence that
2
at least one  j differs
from the rest.
Chap 11-60
Randomized Blocked Design

Items are Divided into Blocks




Individual items in different samples are matched,
or repeated measurements are taken
Reduced within group variation (i.e., remove the
effect of block before testing)
Response of Each Treatment Group is
Obtained
Assumptions


© 2003 Prentice-Hall, Inc.
Same as completely randomized design
No interaction effect between treatments and
blocks
Chap 11-61
Randomized Blocked Design
(Example)
Factor (Training Method)
Factor Levels
(Groups)
Blocked
Experiment
Units
Dependent
Variable
(Response)
© 2003 Prentice-Hall, Inc.









21 hrs
17 hrs
31 hrs
27 hrs
25 hrs
28 hrs
29 hrs
20 hrs
22 hrs
Chap 11-62
Randomized Block Design
(Partition of Total Variation)
Variation Due
to Group
SSA
Commonly referred to as:
 Sum of Squares Among
 Among Groups Variation
+
Variation
Among All
Observations
SST
=
Variation
Among
Blocks
SSBL
+
Variation Due
to Random
Sampling
SSW
© 2003 Prentice-Hall, Inc.
Commonly referred to as:
 Sum of Squares Among
Block
Commonly referred to as:
 Sum of Squares Error
 Sum of Squares
Unexplained
Chap 11-63
Total Variation
c
r

SST   X ij  X
j 1 i 

2
r  the number of blocks
c  the number of groups or levels
n  the total number of observations  n  rc 
X ij  the value in the i -th block for the j -th treatment level
X i  the mean of all values in block i
X  j  the mean of all values for treatment level j
df  n  1
© 2003 Prentice-Hall, Inc.
Chap 11-64
Among-Group Variation
c

SSA  r  X  j  X
j 1

2
r
X j 
X
i 1
ij
r
df  c  1
(treatment group means)
SSA
MSA 
c 1
© 2003 Prentice-Hall, Inc.
Chap 11-65
Among-Block Variation
r

SSBL  c  X i  X
i 1

2
c
X i 
X
j 1
c
df  r  1
ij
(block means)
SSBL
MSBL 
r 1
© 2003 Prentice-Hall, Inc.
Chap 11-66
Random Error
c
r

SSE   X ij  X i  X  j  X
j 1 i 1

2
df   r  1 c  1
SSE
MSE 
 r  1 c  1
© 2003 Prentice-Hall, Inc.
Chap 11-67
Randomized Block F Test for
Differences in c Means

H0 : 1  2    c



H1 : Not all  j are equal
Reject
Test Statistic


No treatment effect
MSA
F
MSE

Degrees of Freedom


df1  c  1
df2   r 1 c 1
© 2003 Prentice-Hall, Inc.
0
FU
F
Chap 11-68
Summary Table
Source of
Variation
Among
Group
Among
Block
Degrees of Sum of
Freedom Squares
c–1
r–1
Mean
Squares
F
Statistic
SSA
MSA =
SSA/(c – 1)
MSA/
MSE
SSBL
MSBL =
SSBL/(r – 1)
MSBL/
MSE
MSE =
SSE/[(r – 1)(c– 1)]
Error
(r – 1) c – 1)
SSE
Total
rc – 1
SST
© 2003 Prentice-Hall, Inc.
Chap 11-69
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?
© 2003 Prentice-Hall, Inc.
Machine1 Machine2
Machine3
25.40
26.31
24.10
23.74
25.10
23.40
21.80
23.50
22.75
21.60
20.00
22.20
19.75
20.60
20.40
Chap 11-70
Randomized Block Design
Example Computation
Machine1 Machine2 Machine3
25.40
26.31
24.10
23.74
25.10
23.40
21.80
23.50
22.75
21.60
20.00
22.20
19.75
20.60
20.40
X 1  24.93
X 2  22.61
X 3  20.59
r 5
c3
n  15
X  22.71
2
2
2

SSA  5  24.93  22.71   22.61  22.71   20.59  22.71 


 47.164
SSE  8.4025
MSA  SSA /(c -1)  47.16 / 2  23.5820
MSE  SSE / (r -1)  c  1   8.4025 / 8  1.0503
© 2003 Prentice-Hall, Inc.
Chap 11-71
Randomized Block Design
Example: Summary Table
Source of
Variation
Among
Group
Degrees of Sum of Mean
Freedom Squares Squares
F
Statistic
2
SSA=
47.164
MSA =
23.582
23.582/1.0503
=22.452
4
SSBL=
2.6507
MSBL =
.6627
.6627/1.0503
=.6039
Error
8
SSE=
8.4025
MSE =
1.0503
Total
14
SST=
58.2172
Among
Block
© 2003 Prentice-Hall, Inc.
Chap 11-72
Randomized Block Design
Example: Solution
Test Statistic:
H0: 1 = 2 = 3
H1: Not All Equal
 = .05
df1= 2
MSA
23.582
 22.45
F

MSE 1.0503
df2 = 8
Decision:
Reject at  = 0.05.
Critical Value(s):
 = 0.05
0
© 2003 Prentice-Hall, Inc.
4.46
F
Conclusion:
There is evidence that at
least one  i differs from
the rest.
Chap 11-73
Randomized Block Design
in Excel


Tools | Data Analysis | ANOVA: Two Factor
Without Replication
Example Solution in Excel Spreadsheet
© 2003 Prentice-Hall, Inc.
Chap 11-74
The Tukey-Kramer Procedure


Similar to the Tukey-Kramer Procedure for the
Completely Randomized Design Case
Critical Range

© 2003 Prentice-Hall, Inc.
Critical Range  QU ( c, r 1 c 1)
MSE
r
Chap 11-75
The Tukey-Kramer Procedure:
Example
Machine1 Machine2 Machine3
25.40
23.40
20.00
26.31
21.80
22.20
24.10
23.50
19.75
23.74
22.75
20.60
25.10
21.60
20.40
2. Compute critical range:
Critical Range  QU ( c, r 1 c 1)
1. Compute absolute mean
differences:
X 1  X 2  24.93  22.61  2.32
X 1  X 3  24.93  20.59  4.34
X 2  X 3  22.61  20.59  2.02
MSE
1.0503
 4.04
1.8516
r
5
3. All of the absolute mean differences are greater. There
is a significance difference between each pair of means at
5% level of significance.
© 2003 Prentice-Hall, Inc.
Chap 11-76
The Tukey-Kramer Procedure
in PHStat


PHStat | c-Sample Tests | Tukey-Kramer
Procedure …
Example in Excel Spreadsheet
© 2003 Prentice-Hall, Inc.
Chap 11-77
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

© 2003 Prentice-Hall, Inc.
E.g., Does the effect of one particular percentage of
carbonation depend on which level the line speed is
set?
Chap 11-78
Two-Way ANOVA

(continued)
Assumptions

Normality


Homogeneity of Variance


Populations are normally distributed
Populations have equal variances
Independence of Errors

© 2003 Prentice-Hall, Inc.
Independent random samples are drawn
Chap 11-79
Two-Way ANOVA
Total Variation Partitioning
Variation Due to
Factor A
Total Variation
SST
d.f.= n-1
=
Variation Due to
Factor B
Variation Due to
Interaction
Variation Due to
Random Sampling
© 2003 Prentice-Hall, Inc.
SSA
d.f.= r-1
SSB
d.f.= c-1
+
+
SSAB +
d.f.= (r-1)(c-1)
SSE
d.f.= rc(n’-1)
Chap 11-80
Two-Way ANOVA
Total Variation Partitioning
r  the number of levels of factor A
c  the number of levels of factor B
n  the number of values (replications) for each cell
'
n  the total number of observations in the experiment
X ijk  the value of the k -th observation for level i of
factor A and level j of factor B
© 2003 Prentice-Hall, Inc.
Chap 11-81
Total Variation
r
c
n'

SST   X ijk  X
i 1 j 1 k 1

2
Sum of Squares Total
= total variation among all
observations around the grand mean
r
X 
© 2003 Prentice-Hall, Inc.
c
n'
 X
i 1 j 1 k 1
'
r
ijk

c
n'
 X
i 1 j 1 k 1
rcn
n
 the overall or grand mean
ijk
Chap 11-82
Factor A Variation
r

SSA  cn  X i  X
'
i 1

2
Sum of Squares Due to Factor A
= the difference among the various
levels of factor A and the grand
mean
© 2003 Prentice-Hall, Inc.
Chap 11-83
Factor B Variation
c

SSB  rn  X  j   X
'
j 1

2
Sum of Squares Due to Factor B
= the difference among the various
levels of factor B and the grand mean
© 2003 Prentice-Hall, Inc.
Chap 11-84
Interaction Variation
r
c

SSAB  n  X ij   X i  X  j   X
'
i 1 j 1

2
Sum of Squares Due to Interaction between A and B
= the effect of the combinations of factor A and
factor B
© 2003 Prentice-Hall, Inc.
Chap 11-85
Random Error
r
c
n'

SSE   X ijk  X ij 
i 1 j 1 k 1

2
Sum of Squares Error
= the differences among the observations within
each cell and the corresponding cell means
© 2003 Prentice-Hall, Inc.
Chap 11-86
Two-Way ANOVA:
The F Test Statistic
H0: 1 .= 2 . = ••• = r .
F Test for Factor A Main Effect
MSA
H1: Not all i . are equal F  MSE
SSA
MSA 
r 1
Reject if
F > FU
H0:  1 = . 2 = ••• =  c F Test for Factor B Main Effect
MSB
H1: Not all . j are equal F  MSE
SSB
MSB 
c 1
Reject if
F > FU
H0: ij = 0 (for all i and j) F Test for Interaction Effect
H1: ij  0
© 2003 Prentice-Hall, Inc.
MSAB
F
MSE
SSAB
MSAB 
 r  1 c  1
Reject if
F > FU
Chap 11-87
Two-Way ANOVA
Summary Table
Source of
Variation
Degrees of
Freedom
Sum of
Squares
Mean
Squares
F
Statistic
Factor A
(Row)
r–1
SSA
MSA =
SSA/(r – 1)
MSA/
MSE
MSB/
MSE
MSAB/
MSE
Factor B
(Column)
c–1
SSB
MSB =
SSB/(c – 1)
AB
(Interaction)
(r – 1)(c – 1)
SSAB
MSAB =
SSAB/ [(r – 1)(c – 1)]
Error
n’
SSE
MSE =
SSE/[rc n’ – 1)]
Total
© 2003 Prentice-Hall, Inc.
rc
– 1)
rc n’ – 1
SST
Chap 11-88
Features of Two-Way ANOVA
F Test

Degrees of Freedom Always Add Up




rcn’-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 Up

Total=Error+Column+Row+Interaction
© 2003 Prentice-Hall, Inc.
Chap 11-89
Kruskal-Wallis Rank Test
for c Medians

Extension of Wilcoxon Rank Sum Test




Tests the equality of more than 2 (c)
population medians
Distribution-Free Test Procedure
Used to Analyze Completely Randomized
Experimental Designs
Use 2 Distribution to Approximate if Each
Sample Group Size nj > 5

© 2003 Prentice-Hall, Inc.
df = c – 1
Chap 11-90
Kruskal-Wallis Rank Test

Assumptions






Independent random samples are drawn
Continuous dependent variable
Data may be ranked both within and among
samples
Populations have same variability
Populations have same shape
Robust with Regard to Last 2 Conditions

Use F test in completely randomized designs and
when the more stringent assumptions hold
© 2003 Prentice-Hall, Inc.
Chap 11-91
Kruskal-Wallis Rank Test
Procedure

Obtain Ranks


In 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
c T2 
 12
j
H 
  3(n  1)

 n(n  1) j 1 n j 
n  n1  n2   nc
© 2003 Prentice-Hall, Inc.
Chap 11-92
Kruskal-Wallis Rank Test
Procedure
(continued)

Compute Test Statistic
c T2 
 12
j
H 
  3(n  1)

 n(n  1) j 1 n j 
n  n1  n2   nc




n j  # of observation in j –th sample
H may be approximated by chi-square distribution
with df = c –1 when each nj >5
© 2003 Prentice-Hall, Inc.
Chap 11-93
Kruskal-Wallis Rank Test
Procedure
(continued)

Critical Value for a Given 
Upper tail



2
U
Decision Rule


Reject H0: M1 = M2 = ••• = Mc if test statistic
2
H > U
Otherwise, do not reject H0
© 2003 Prentice-Hall, Inc.
Chap 11-94
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?
© 2003 Prentice-Hall, Inc.
Machine1 Machine2
Machine3
25.40
26.31
24.10
23.74
25.10
23.40
21.80
23.50
22.75
21.60
20.00
22.20
19.75
20.60
20.40
Chap 11-95
Example Solution: Step 1
Obtaining a Ranking
Raw Data
Machine1 Machine2
Machine3
25.40
26.31
24.10
23.74
25.10
© 2003 Prentice-Hall, Inc.
23.40
21.80
23.50
22.75
21.60
Ranks
Machine1 Machine2
Machine3
20.00
22.20
19.75
20.60
20.40
14
15
12
11
13
65
9
6
10
8
5
38
2
7
1
4
3
17
Chap 11-96
Example Solution: Step 2
Test Statistic Computation
2


T
c
j 
 12
H 
 3(n  1)


n(n  1) j  1 n

j


 12
 652 382 172  

   3(15  1)



5
5 
15(15  1)  5



 11.58
© 2003 Prentice-Hall, Inc.
Chap 11-97
Kruskal-Wallis Test Example
Solution
H0: M1 = M2 = M3
H1: Not all equal
 = .05
df = c - 1 = 3 - 1 = 2
Critical Value(s):
 = .05
0
© 2003 Prentice-Hall, Inc.
5.991
Test Statistic:
H = 11.58
Decision:
Reject at  = .05.
Conclusion:
There is evidence that
population medians are
not all equal.
Chap 11-98
Kruskal-Wallis Test in PHStat


PHStat | c-Sample Tests | Kruskal-Wallis Rank
Sum Test …
Example Solution in Excel Spreadsheet
© 2003 Prentice-Hall, Inc.
Chap 11-99
Friedman Rank Test for
Differences in c Medians




Tests the equality of more than 2 (c)
population medians
Distribution-Free Test Procedure
Used to Analyze Randomized Block
Experimental Designs
Use 2 Distribution to Approximate if the
Number of Blocks r > 5

© 2003 Prentice-Hall, Inc.
df = c – 1
Chap 11-100
Friedman Rank Test

Assumptions






The r blocks are independent
The random variable is continuous
The data constitute at least an ordinal scale of
measurement
No interaction between the r blocks and the c
treatment levels
The c populations have the same variability
The c populations have the same shape
© 2003 Prentice-Hall, Inc.
Chap 11-101
Friedman Rank Test:
Procedure


Replace the c observations by their ranks in
each of the r blocks; assign average rank
for ties
c
12
2
Test statistic: FR 
R

 j  3r  c  1
rc  c  1 j 1



© 2003 Prentice-Hall, Inc.
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 freedom
The rejection region is in the right tail
Chap 11-102
Friedman Rank Test: Example
As 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?
© 2003 Prentice-Hall, Inc.
Machine1 Machine2
Machine3
25.40
26.31
24.10
23.74
25.10
23.40
21.80
23.50
22.75
21.60
20.00
22.20
19.75
20.60
20.40
Chap 11-103
Friedman Rank Test:
Computation Table
Machine 1
25.4
26.31
24.1
23.74
25.1
Timing
Machine 2 Machine 3
23.4
20
21.8
22.2
23.5
19.75
22.75
20.6
21.6
20.4
Machine 1
3
3
3
3
3
R. j
15
R.2j
225
Rank
Machine 2 Machine 3
2
1
1
2
2
1
2
1
2
1
9
6
81
36
c
12
2
FR 
R

 j  3r  c  1
rc  c  1 j 1

© 2003 Prentice-Hall, Inc.
12
 342   3 5 4   8.4
 5 3 4 
Chap 11-104
Friedman Rank Test Example
Solution
H0: M1 = M2 = M3
H1: Not all equal
 = .05
df = c - 1 = 3 - 1 = 2
Critical Value:
 = .05
0
© 2003 Prentice-Hall, Inc.
5.991
Test Statistic:
FR = 8.4
Decision:
Reject at  = .05
Conclusion:
There is evidence that
population medians are
not all equal.
Chap 11-105
Chapter Summary

Described the Completely Randomized
Design: One-Way Analysis of Variance





ANOVA Assumptions
F Test for Difference in c Means
The Tukey-Kramer Procedure
Levene’s Test for Homogeneity of Variance
Discussed the Randomized Block Design

F Test for the Difference in c Means

The Tukey Procedure
© 2003 Prentice-Hall, Inc.
Chap 11-106
Chapter Summary

Described the Factorial Design: Two-Way
Analysis of Variance



(continued)
Examine effects of factors and interaction
Discussed Kruskal-Wallis Rank Test for
Differences in c Medians
Illustrated Friedman Rank Test for Differences
in c Medians
© 2003 Prentice-Hall, Inc.
Chap 11-107
Download