Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 35

Chapter 11

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)

• Randomized block design

• Factorial design ( Two 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

Factor (Training Method)


Factor Levels
(Groups)
Randomly
Assigned
Units

  
  
 

21 hrs 17 hrs 31 hrs


Dependent
Variable 27 hrs 25 hrs 28 hrs
(Response)
29 hrs 20 hrs 22 hrs
6
Example
• Comparing magazine covers
• A magazine publisher wants to compare three
different styles of covers for a magazine that
will be offered for sale at supermarket
checkout lines. She assigns 60 stores at
random to the three styles of covers and
records the number of
magazines that are sold in a one-week period.

7
Example

• Design 2 had the highest average sales


• Purpose of ANOVA is to see if this observed
difference is statistically significant
8
Hypotheses of One-Way ANOVA

• 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

Variation Due to Variation Due to Random


= Treatment SSC + Sampling SSE
Commonly referred to as:
 Among Group Variation Commonly referred to as:
 Sum of Squares Among  Within Group Variation
 Sum of Squares Between  Sum of Squares Within
 Sum of Squares Factor  Sum of Squares Error
 Sum of Squares Explained  Sum of Squares Unexplained
 Sum of Squares Treatment 12
Total Variation
c nj

SST   ( X ij  X ) 2

j 1 i 1

X ij : the i -th observation in group j


n j : the number of observations in group j
n : the total number of observations in all groups
c : the number of groups
c nj

 X
j 1 i 1
ij

X  the overall or grand mean


n 13
Total Variation
(continued)

   X   
2 2 2
SST  X 11  X 21 X    X nc c  X
Response, X

Group 1 Group 2 Group 3


14
Among-Group Variation (Factor)

c
SSA
SSA   n j ( X j  X ) 2
MSA 
j 1 c 1

X j : The sample mean of group j


X : The overall or grand mean

i  j Variation Due to Differences Among Groups.

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

Group 1 Group 2 Group 3 16


Within-Group Variation (Error)
nj
c
SSW
SSW   ( X ij  X j ) 2
MSW 
j 1 i 1 nc
X j : The sample mean of group j
X ij : The i -th observation in group j

Summing the variation


within each group and then
adding over all groups.
j 17
Within-Group Variation
(continued)


SSW   X 11  X 1    X 21  X 1     X nc c  X c 
2 2 2

Response, X

X3
X
X2
X1

Group 1 Group 2 Group 3 18


Within-Group Variation
(continued)

SSW For c = 2, this is the


MSW  pooled-variance in the
nc t-Test.
(n1  1) S1  (n2  1) S2      (nc  1) Sc
2 2 2

(n1  1)  (n2  1)      (nc  1)
•If more than 2 groups,
use F Test.
•For 2 groups, use t-Test.
F Test more limited.

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

– The ratio must always be positive

23
Features of One-way ANOVA
F Statistic (continued)

• If the Null Hypothesis is True


– df1 = c -1 will typically be small
– df2 = n - c will typically be large
– The ratio should be close to 1.
• If the Null Hypothesis is False
– The numerator should be greater than the
denominator
– The ratio should be larger than 1

24
Training example

Factor (Training Method)


Factor Levels
(Groups)
Randomly
Assigned 
  
  
 

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 c3
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

SSA  5  24.93  22.71   22.61  22.71   20.59  22.71 


 2 2 2
 
 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 28
Summary Table

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

• Pair wise Comparisons


– Compare absolute mean differences with critical range

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.

You might also like