model car display case

Download Report

Transcript model car display case

Chapter 11
Experimental Design and Analysis
of Variance
McGraw-Hill/Irwin
Copyright © 2009 by The McGraw-Hill Companies, Inc. All Rights Reserved.
Experimental Design and Analysis
of Variance
11.1 Basic Concepts of Experimental
Design
11.2 One-Way Analysis of Variance
11.3 The Randomized Block Design
11.4 Two-Way Analysis of Variance
11-2
Basic Concepts of Experimental Design
• Up until now, we have considered only
two ways of collecting and comparing
data:
– Using independent random samples
– Using paired (or matched) samples
• Often data is collected as the result of
an experiment
– To systematically study how one or more
factors (variables) influence the variable
that is being studied
11-3
Experimental Design #2
• In an experiment, there is strict control over
the factors contributing to the experiment
– The values or levels of the factors are called
treatments
• For example, in testing a medical drug, the
experimenters decide which participants in the test get
the drug and which ones get the placebo, instead of
leaving the choice to the subjects
• The object is to compare and estimate the
effects of different treatments on the
response variable
11-4
Experimental Design #3
• The different treatments are assigned to
objects (the test subjects) called
experimental units
– When a treatment is applied to more than one
experimental unit, the treatment is being
“replicated”
• A designed experiment is an experiment
where the analyst controls which treatments
are used and how they are applied to the
experimental units
11-5
Experimental Design #4
• In a completely randomized experimental
design, independent random samples are
assigned to each of the treatments
– For example, suppose three experimental units
are to be assigned to five treatments
– For completely randomized experimental design,
randomly pick three experimental units for one
treatment, randomly pick three different
experimental units from those remaining for the
next treatment, and so on
11-6
Experimental Design #5
• Once the experimental units are
assigned and the experiment is
performed, a value of the response
variable is observed for each
experimental unit
– Obtain a sample of values for the
response variable for each treatment
11-7
Experimental Design #6
• In a completely randomized experimental
design, it is presumed that each sample is a
random sample from the population of all
possible values of the response variable
– That could possibly be observed when using the
specific treatment
– The samples are independent of each other
• Reasonable because the completely randomized design
ensures that each sample results from different
measurements being taken on different experimental
units
• Can also say that an independent samples experiment is
being performed
11-8
Example 11.1: Gasoline Mileage Case
• Compare the effects of three types of
gasoline (Types A, B, and C) on the
gasoline mileage of a particular make
and model midsized automobile
– The response variable is gasoline mileage,
in miles per gallon (mpg)
– The gasoline types (A, B, or C) are the
treatments
11-9
Example 11.1: Gasoline Mileage Case #2
• Use a completely randomized experimental design
– Have available 1,000 cars for testing
– Need samples of size five for each gasoline type
– Randomly select five cars from the 1,000 cars; assign these
five to get gasoline type A
– Randomly select five cars from the 995 remaining cars;
these five are assigned to get gasoline type B
– Randomly select five cars from the 990 remaining cars;
these five are assigned to get gasoline type C
• Each randomly selected car is test driven using the
appropriate gasoline type and driving conditions
11-10
Example 11.1: Gasoline Mileage Case #3
• The mileage data is listed on the next
slide (Table 11.1)
– Let xij denote the mileage x of the jth car (j
= 1,2, … , 5) using gasoline type i (i = A, B,
or C)
– Assume that the mileage data for a
particular gasoline type is a random
sample of all possible mileages using that
type
11-11
Example 11.1: Gasoline Mileage Case #4
Type A
xA1=34.0
xA2=35.0
xA3=34.3
xA4=35.5
xA5=35.8
Type B
xB1=35.3
xB2=36.5
xB3=36.4
xB4=37.0
xB5=37.6
Type C
xC1=33.3
xC2=34.0
xC3=34.7
xC4=33.0
xC5=34.9
11-12
Example 11.1: Gasoline Mileage Case #5
Looking at the box plots below, we could get the idea that
type B gives the highest gasoline mileage
11-13
One-Way Analysis of Variance
• Want to study the effects of all p treatments
on a response variable
– For each treatment, find the mean and standard
deviation of all possible values of the response
variable when using that treatment
– For treatment i, find treatment mean µi
• One-way analysis of variance estimates and
compares the effects of the different
treatments on the response variable
– By estimating and comparing the treatment means
µ1, µ2, …, µp
– One-way analysis of variance, or one-way ANOVA
11-14
Example 11.4: Gasoline Mileage Case
• The mean of a sample is the point
estimate for the corresponding
treatment mean
xA = 34.92 mpg estimates mA
xB = 36.56 mpg estimates mB
xC = 33.98 mpg estimates mC
11-15
Example 11.4: Gasoline Mileage Case
Continued
• The standard deviation of a sample is
the point estimate for the corresponding
treatment standard estimates
sA = 0.7662 mpg estimates σA
sB = 0.8503 mpg estimates σB
sC = 0.8349 mpg estimates σC
11-16
ANOVA Notation
• ni denotes the size of the sample randomly
selected for treatment i
• xij is the jth value of the response variable
using treatment i
• xi is average of the sample of ni values for
treatment i
– xi is the point estimate of the treatment mean µi
• si is the standard deviation of the sample of ni
values for treatment i
– si is the point estimate for the treatment
(population) standard deviation σi
11-17
One-Way ANOVA Assumptions
• Completely randomized experimental
design
– Assume that a sample has been selected
randomly for each of the p treatments on
the response variable using a completely
randomized experimental design
• Constant variance
– The p populations of values of the
response variable (associated with the p
treatments) all have the same variance
11-18
One-Way ANOVA Assumptions
Continued
• Normality
– The p populations of values of the
response variable all have normal
distributions
• Independence
– The samples of experimental units are
randomly selected, independent samples
11-19
Notes on Assumptions
• One-way ANOVA is not very sensitive to
violations of the equal variances
assumption
– Especially when all the samples are about
the same size
– All of the sample standard deviations
should be reasonably equal to each other
11-20
Notes on Assumptions
Continued
• Normality is not crucial
– ANOVA results are approximately valid for
mound-shaped distributions
• If the sample distributions are reasonably
symmetric and if there are no outliers, then
ANOVA results are valid for even small
samples
• For gasoline mileages, the assumptions
are roughly satisfied
11-21
Testing for Significant Differences
Between Treatment Means
• Are there any statistically significant
differences between the sample (treatment)
means?
• The null hypothesis is that the mean of all p
treatments are the same
– H0: µ1 = µ2 = … = µp
• The alternative is that some (or all, but at
least two) of the p treatments have different
effects on the mean response
– Ha: at least two of µ1, µ2 , …, µp differ
11-22
Testing for Significant Differences
Between Treatment Means
Continued
• Compare the between-treatment
variability to the within-treatment
variability
– Between-treatment variability is the
variability of the sample means from
sample to sample
– Within-treatment variability is the variability
of the treatments (that is, the values) within
each sample
11-23
Example 11.5: The Gasoline Mileage
Case
• In Figure 11.1(a), (next slide) the betweentreatment variability is not large compared to
the within-treatment variability
– The between-treatment variability could be the
result of sampling variability
– Do not have enough evidence to reject
H0: μA = μB = μC
• In figure 11.1(b), between-treatment
variability is large compared to the withintreatment variability
– May have enough evidence to reject H0 in favor of
Ha: at least two of μA, μB, μC differ
11-24
Example 11.5: The Gasoline Mileage
Case #2
11-25
MINITAB and Excel Output of an ANOVA
of Gasoline Mileage Data in Table 11.1
11-26
Partitioning the Total Variability in the
Response
Total
Variability
= Between
+ Within
Treatment
Treatment
Variability
Variability
Total Sum = Treatment Sum + Error Sum
of Squares
of Squares
of Squares
SSTO
p ni

  xij  x
i 1 j 1
= SST

2
p
+ SSE
  ni xi  x 
i 1
2
p ni

   xij  xi
i 1 j 1

2
11-27
Note
• The overall mean x is
1 p ni
x
  xij
n i 1 j 1
where n = n1 + n2 + … + ni + …. np
• Also
1 p
x   xi
p i 1
11-28
Mean Squares
• The treatment mean-squares is
SST
MST 
p 1
• The error mean-squares is
SSE
MSE 
n p
11-29
F Test for Difference Between Treatment
Means
• Suppose that we want to compare p
treatment means
• The null hypothesis is that all treatment
means are the same:
– H0: µ1 = µ2 = … = µp
• The alternative hypothesis is that they
are not all the same:
– Ha: at least two of µ1, µ2 , …, µp differ
11-30
F Test for Difference Between Treatment
Means #2
• Define the F statistic:
SST
MST

p  1
F=

MSE SSE
n  p 
• The p-value is the area under the F
curve to the right of F, where the F
curve has p – 1 numerator and n – p
denominator degrees of freedom
11-31
F Test for Difference Between Treatment
Means #3
Reject H0 in favor of Ha at the a level of
significance if
F > Fa , or if
p-value < a
Fa is based on p – 1
numerator and n – p
denominator degrees
of freedom
11-32
Gasoline Mileages Data
• For the p = 3 gasoline types and n = 15
observations (5 observations per type):
• The overall mean x is
34 .0  35 .0    34 .9 527 .3
x

 35 .153
15
15
• The treatment sum of squares is
SST 
 ni xi  x   nA xA  x   nB xB  x   nC xC  x 
2
2
2
2
i  A , B ,C
 534.92  35.153  536.56  35.153  533.98  35.153
 17.0493
2
2
2
11-33
Gasoline Mileages Data Continued
• The error sum of squares is
nA

SSE   x Aj  x A
j 1

2
nB

  x Bj  x B

 35 .3  36 .56 
 33 .3  33 .98 
j 1

2
nB

  x Bj  x B
j 1
2

   37 .6  36 .56  
   34 .9  33 .98  
 34 .0  34 .92 2    35 .8  34 .92 2
2
2
2
2
 8.028
• The total sum of squares is
SSTO = SST + SSE = 17.0493 + 8.028 = 25.0773
11-34
Example 11.5: Gasoline Mileages Case
• The treatment mean squares is
MST 
SST 17 .0493

 8.525
p 1
3 1
• The error mean squares is
SSE
8.023
MSE 

 0.669
n  p 15  3
• The F statistic is
MST 8.525
F

 12 .74
MSE 0.669
11-35
Example 11.5: Gasoline Mileages Case
#2
• At a = 0.05 significance level, use F0.05 with p
- 1 = 3 - 1 = 2 numerator and n – p = 15 – 3 =
12 denominator degrees of freedom
• From Table A.6, F0.05 = 3.89
• F = 12.74 > F0.05 = 3.89
• Therefore reject H0 at 0.05 significance level
– There is strong evidence at least two of the
treatment means differ
– So at least two of the three different gasoline
types have an effect on gasoline mileage
• But which ones?
• Do pairwise comparisons (next topic)
11-36
Example 11.5: Gasoline Mileages Case
#3
Source
Degrees
of Freedom
Sum of
Squares
Mean
Squares
F
Statistic
Treatments
p-1
SST
MST = SST
p-1
F = MST
MSE
Error
n-p
SSE
MSE = SSE
n-p
Total
n-1
SSTO
Example 11.5 The Gasoline Mileage Case (Excel Output)
Source of Variation
Between Groups
Within Groups
Total
SS df
MS
F P-value F crit
17.0493 2 8.5247 12.7424 0.0011 3.8853
8.0280 12 0.6690
25.0773 14
11-37
Pairwise Comparisons, Individual
Intervals
• Individual 100(1 - a)% confidence
interval for µi – µh:
xi  xh   tα/ 2
1 1
MSE   
 ni nh 
• t a/2 is based on n – p degrees of
freedom
11-38
Example 11.6: The Gasoline Mileage
Case
• Comparing three treatments
• Each sample size is five
• MSE is 0.669
• q0.05 = 3.77 for p = 3 and n-p = 12
• A Tukey simultaneous 95 percent
confidence interval for μA - μB
0.669
36.56 - 34.92  3.77
 1.64  1.379
5
 0.261,3.019
11-39
Pairwise Comparisons, Simultaneous
Intervals
• Tukey simultaneous 100(1 - a)%
confidence interval for µi – µh:
xi  xh   qα
MSE
m
• qa is the upper a percentage point of
the studentized range for p and (n – p)
from Table A.9
• m denotes common sample size
11-40
Example 11.6: The Gasoline Mileage
Case
0.669
36.56  2.179
 36.56  0.797
5
 35.763, 37.357
Groups
Type A
Type B
Type C
Count Average Variance MSE
5
34.92
0.587 0.669
5
36.56
0.723 n-p
5
33.98
0.697
12
11-41
The Randomized Block Design
• A randomized block design compares
p treatments (for example, production
methods) on each of b blocks (or
experimental units or sets of units; for
example, machine operators)
– Each block is used exactly once to
measure the effect of each and every
treatment
– The order in which each treatment is
assigned to a block should be random
11-42
The Randomized Block Design
Continued
• A generalization of the paired difference
design; this design controls for
variability in experimental units by
comparing each treatment on the same
(not independent) experimental units
– Differences in the treatments are not
hidden by differences in the experimental
units (the blocks)
11-43
Randomized Block Design
xij The value of the response variable when
block j uses treatment i
xi• The mean of the b response variable
observed when using treatment i (the
treatment i mean)
x•j The mean of the p values of the
response variable when using block j (the
block j mean)
x The mean of all the b•p values of the
response variable observed in the
experiment (the overall mean)
11-44
Randomized Block Design Continued
11-45
Example 11.7: Defective Cardboard
Box Case
p = 4 treatments (production methods)
b = 3 blocks (machine operators)
n = 12 observations
Treatment
Prod Meth
1
2
3
4
Blk Mean
Block
Machine Operator
1
2
3 Trt Mean
9
10
12 10.3333
8
11
12 10.3333
3
5
7
5.0000
4
5
5
4.6667
6.00
7.75
9.00
7.5833
11-46
The ANOVA Table, Randomized Blocks
Source
Degrees
of Freedom
Sum of
Squares
Mean
Squares
F
Statistic
Treatments
p-1
SST
MST = SST
p-1
F(trt) = MST
MSE
Blocks
b-1
SSB
MSB = SSB
b-1
F(blk) = MSB
MSE
Error
(p-1)(b-1)
SSE
MSE =
Total
(pb)-1
SSTO
SSE
(p-1)(b-1)
where SSTO = SST + SSB + SSE
11-47
Sum of Squares
• SST measures the amount of between-treatment
variability
p
2
SST  b  xi   x 
i 1
• SSB measures the amount of variability due to the
blocks
b
2

SSB  p  x j  x
i 1

• SSTO measures the total amount of variability
p
b

SSTO    xij  x
i 1 j 1
2
• SSE measures the amount of the variability due to
error (SSE = SSTO – SST – SSB)
11-48
F Test for Treatment Effects
• H0: No difference between treatment effects
Ha: At least two treatment effects differ
• Test statistic:
MST
SST/  p-1
F=

MSE SSE/  p-1b  1
• Reject H0 if
– F > Fa
or
– p-value < a
• Fa is based on p-1 numerator and (p-1)(b-1)
denominator degrees of freedom
11-49
F Test for Block Effects
• H0: No difference between block effects
Ha: At least two block effects differ
• Test statistic:
MSB
SSB/  p  1
F=

MSE SSE/  p-1b-1
• Reject H0 if
– F > Fa
or
– p-value < a
• Fa is based on p-1 numerator and (p-1)(b-1)
denominator degrees of freedom
11-50
Example 11.7: Sum of Squares
• For p = 4 treatments (production methods),
b = 3 blocks (machine operators), and n = 12
observations
• SST = 90.9167
• SSB = 18.1667
• SSTO = 112.9167
• SSE = 3.8333
– See textbook (pages 457-458) for details of
calculations
• MST = SST/(p-1) = 90.9167/2 = 30.3056
• MSB = SSB/(b-1) = 18.1667/2 = 9.0834
11-51
Example 11.7: Treatment Effects
• H0: no differences between the treatment
effects vs
•
Ha: at least two treatment effects differ
• Test at the a = 0.05 level of significance
– Reject H0 if F(treatments) > F0.05 (based on p-1
numerator and (p-1)(b-1) denominator degrees of
freedom
• F(treatments) = MST/MSE = 30.306/0.639 =
47.43
• F0.05 based on p-1 = 3 numerator and (p-1)(b1) = 6 denominator degrees of freedom is
4.76 (Table A.6)
11-52
Example 11.7: Treatment Effects
Continued
• F(treatments) = 47.43 > F0.05 = 4.76
• So reject H0 at 5% significance level
• Therefore, we have strong evidence
that at least two production methods
(the treatments) have different effects
on the mean hourly production of
defective boxes
11-53
Example 11.7: Block Effects
• H0: no differences between block effects vs
Ha: at least two block effects differ
• Test at the a = 0.05 level of significance
– Reject H0 if F(blocks) > F0.05 (based on p-1
numerator and (p-1)(b-1) denominator degrees of
freedom
• F(blocks) = MSB/MSE = 9.083/0.639 = 14.22
• F0.05 based on b-1 = 2 numerator and (p-1)(b1) = 6 denominator degrees of freedom is
5.14 (Table A.6)
11-54
Example 11.7: Block Effects
Continued
• F(blocks) = 14.22 > F0.05 = 5.14
• So reject H0 at 5% significance level
• Therefore, we have strong evidence
that at least two machine operators (the
blocks) have different effects on the
mean hourly production of defective
boxes
11-55
Example 11.7: MINITAB Output of a
Randomized Block ANOVA
11-56
Estimation of Treatment Differences Under
Randomized Blocks, Individual Intervals
• Individual 100(1 - a)% confidence
interval for µi• - µh•
2
(x i  x h )  ta/2 s
b
• ta/2 is based on (p-1)(b-1) degrees of
freedom
11-57
Example 11.8 The Defective Cardboard
Box Case
2
(4.6667  10.3333)  2.447(0.7994)
 5.6666  1.5971
3
 [7.2637,  4.0695]
t.025 with (3-1)(4-1) = 6
degrees of freedom
Treatment
Prod Meth
1
2
3
4
Blk Mean
Block
Machine Operator
1
2
3 Trt Mean
9
10
12 10.3333
8
11
12 10.3333
3
5
7
5.0000
4
5
5
4.6667
6.00
7.75
9.00
7.5833
11-58
Estimation of Treatment Differences Under
Randomized Blocks, Simultaneous Intervals
• Tukey simultaneous 100(1 - a)%
confidence interval for µi• - µh•
s
(x i  x h )  qa
b
• qa is the upper a percentage point of
the studentized range for p and
(p-1)(b-1) from Table A.9
11-59
Example 11.8 The Defective Cardboard
Box Case
0.7994
(4.6667  10.3333)  4.90
 5.6666  2.2621
3
 [-7.9278, - 3.4054]
q.05 for 4 and 6
Treatment
Prod Meth
1
2
3
4
Blk Mean
Block
Machine Operator
1
2
3 Trt Mean
9
10
12 10.3333
8
11
12 10.3333
3
5
7
5.0000
4
5
5
4.6667
6.00
7.75
9.00
7.5833
11-60
Two-Way Analysis of Variance
• A two factor factorial design compares the
mean response for a levels of factor 1 (for
example, display height) and each of b levels
of factor 2 (for example, display width)
• A treatment is a combination of a level of
factor 1 and a level of factor 2
11-61
Example 11.9 The Shelf Display Case
•
Tastee Bakery wishes to study the effect of
two factors
1. Shelf display height
2. Shelf display width
•
Three setting are used for
height and two for width
•
A sample size of three
used for each combination
11-62
Example 11.9 The Shelf Display Case
Continued
Height
Bottom
Mean
Middle
Mean
Top
Mean
Mean
Width
Reg
Wide
58.2
55.7
53.7
52.5
55.8
58.9
55.9
55.7
73.0
76.2
78.1
78.4
75.4
82.1
75.5
78.9
52.4
54.0
49.7
52.1
50.9
49.9
51.0
52.0
60.8
62.2
Mean
55.8
77.2
51.5
61.5
11-63
Example 11.9: Plotting the Treatment
Means
11-64
Example 11.9: A MINITAB Output of the
Graphical Analysis
11-65
Possible Treatment Effects in Two-Way
ANOVA
11-66
Two-Way ANOVA Table
Source
Degrees
of Freedom
Sum of
Squares
Mean
Squares
F
Statistic
Factor 1
a-1
SS(1)
MS(1) = SS(1)
a-1
F(1) = MS(1)
MSE
Factor 1
b-1
SS(2)
MS(2) = SS(2)
b-1
F(2) = MS(2)
MSE
Interaction
(a-1)(b-1)
SS(int)
MS(int) = SS(int) F(int) = MS(int)
(a-1)(b-1)
MSE
Error
ab(m-1)
SSE
MSE =
Total
abm-1
SSTO
SSE
ab(m-1)
11-67
Example 11.9 The Shelf Display Case
11-68
F Tests for Treatment Effects
H0: No difference between treatment effects
Ha: At least two treatment effects differ
Test Statistics:
Main Effects
F(1) =
MS(1)
SS(1)/(a - 1)

MSE SSE/[(ab(m - 1)]
Fa is based on a-1 and ab(m-1)
degrees of freedom
F(2) =
MS(2)
SS(2)/(b - 1)

MSE SSE/[(ab(m - 1)]
Fa is based on b-1 and ab(m-1)
degrees of freedom
Interaction
F(int) =
MS(int) SS(int)/[( a - 1)(b - 1)] Fa is based on (a-1)(b-1) and

ab(m-1) degrees of freedom
MSE
SSE/[(ab(m - 1)]
Reject H0 if
F > Fa or p-value < a
11-69
Estimation of Treatment Differences
Under Two-Way ANOVA, Factor 1
• Individual 100(1 - a)% confidence interval for
µi• - µi’•
2
(x i  x i' )  ta/2


MSE 

 bm 
– ta/2 is based on ab(m-1) degrees of freedom
• Tukey simultaneous 100(1 - a)% confidence
interval for µi• - µi’•
 1 
(x i  x i' )  qa MSE 

 bm 
– qa is the upper a percentage point of the
studentized range for a and ab(m-1) from Table
A.9
11-70
Estimation of Treatment Differences
Under Two-Way ANOVA, Factor 2
• Individual 100(1 - a)% confidence interval for
µ•j - µ•j’
2
(x  j  x  j ' )  ta/2


MSE 

 am 
– ta/2 is based on ab(m-1) degrees of freedom
• Tukey simultaneous 100(1 - a)% confidence
interval for µ•j - µ•j’
 1 
(x  j  x  j ' )  qa MSE 

 am 
– qa is the upper a percentage point of the
studentized range for b and ab(m-1) from Table
A.9
11-71