© 2005 thomson/south-western slide 1 · 1 © 2005 thomson/south-western slide 1 slides prepared by...
TRANSCRIPT
1
1Slide© 2005 Thomson/South-Western
Slides Prepared byJOHN S. LOUCKS
St. Edward’s University
2Slide© 2005 Thomson/South-Western
Chapter 13, Part BAnalysis of Variance and Experimental Design
Factorial Experiments
An Introduction to Experimental DesignCompletely Randomized DesignsRandomized Block Design
3Slide© 2005 Thomson/South-Western
An Introduction to Experimental Design
Statistical studies can be classified as being either experimental or observational.In an experimental study, one or more factors are controlled so that data can be obtained about how the factors influence the variables of interest.In an observational study, no attempt is made to control the factors.Cause-and-effect relationships are easier to establish in experimental studies than in observational studies.
2
4Slide© 2005 Thomson/South-Western
An Introduction to Experimental Design
A factor is a variable that the experimenter has selected for investigation.A treatment is a level of a factor.Experimental units are the objects of interest in the experiment.A completely randomized design is an experimental design in which the treatments are randomly assigned to the experimental units.If the experimental units are heterogeneous, blocking can be used to form homogeneous groups, resulting in a randomized block design.
5Slide© 2005 Thomson/South-Western
The between-samples estimate of σ 2 is referredto as the mean square due to treatments (MSTR).
2
1( )
MSTR1
k
j jj
n x x
k=
−=
−
∑ 2
1( )
MSTR1
k
j jj
n x x
k=
−=
−
∑
Between-Treatments Estimate of Population Variance
Completely Randomized Design
denominator is thedegrees of freedom
associated with SSTR
numerator is calledthe sum of squares due
to treatments (SSTR)
6Slide© 2005 Thomson/South-Western
The second estimate of σ 2, the within-samples estimate, is referred to as the mean square due to error (MSE).
Within-Treatments Estimate of Population Variance
Completely Randomized Design
denominator is thedegrees of freedomassociated with SSE
numerator is calledthe sum of squaresdue to error (SSE)
MSE =−∑
−=
( )n s
n k
j jj
k
T
1 2
1MSE =−∑
−=
( )n s
n k
j jj
k
T
1 2
1
3
7Slide© 2005 Thomson/South-Western
MSTR SSTR-
=k 1
MSTR SSTR-
=k 1
MSE SSE-
=n kT
MSE SSE-
=n kT
MSTRMSE
MSTRMSE
ANOVA Table
Completely Randomized Design
Source ofVariation
Sum ofSquares
Degrees ofFreedom
MeanSquares F
Treatments
Error
Total
k - 1
nT - 1
SSTR
SSE
SST
nT - k
8Slide© 2005 Thomson/South-Western
AutoShine, Inc. is considering marketing a long-lasting car wax. Three different waxes (Type 1, Type 2,and Type 3) have been developed.
Completely Randomized Design
Example: AutoShine, Inc.
In order to test the durabilityof these waxes, 5 new cars werewaxed with Type 1, 5 with Type2, and 5 with Type 3. Each car was thenrepeatedly run through an automatic carwash until thewax coating showed signs of deterioration.
9Slide© 2005 Thomson/South-Western
Completely Randomized Design
The number of times each car went through thecarwash is shown on the next slide. AutoShine, Inc.must decide which wax to market. Are the threewaxes equally effective?
Example: AutoShine, Inc.
4
10Slide© 2005 Thomson/South-Western
12345
2730292831
3328313030
2928303231
Sample MeanSample Variance
ObservationWax
Type 1Wax
Type 2Wax
Type 3
2.5 3.3 2.529.0 30.4 30.0
Completely Randomized Design
11Slide© 2005 Thomson/South-Western
Hypotheses
Completely Randomized Design
where: µ1 = mean number of washes for Type 1 waxµ2 = mean number of washes for Type 2 waxµ3 = mean number of washes for Type 3 wax
H0: µ1 = µ2 = µ3 Ha: Not all the means are equal
12Slide© 2005 Thomson/South-Western
Because the sample sizes are all equal:
Completely Randomized Design
MSE = 33.2/(15 - 3) = 2.77
MSTR = 5.2/(3 - 1) = 2.6
SSE = 4(2.5) + 4(3.3) + 4(2.5) = 33.2
SSTR = 5(29–29.8)2 + 5(30.4–29.8)2 + 5(30–29.8)2 = 5.2
Mean Square Error
Mean Square Between Treatments
= + +1 2 3( )/3x x x x= + +1 2 3( )/3x x x x = (29 + 30.4 + 30)/3 = 29.8
5
13Slide© 2005 Thomson/South-Western
Rejection Rule
Completely Randomized Design
where F.05 = 3.89 is based on an F distributionwith 2 numerator degrees of freedom and 12denominator degrees of freedom
p-Value Approach: Reject H0 if p-value < .05Critical Value Approach: Reject H0 if F > 3.89
14Slide© 2005 Thomson/South-Western
Test Statistic
Completely Randomized Design
There is insufficient evidence to conclude thatthe mean number of washes for the three waxtypes are not all the same.
Conclusion
F = MSTR/MSE = 2.6/2.77 = .939
The p-value is greater than .10, where F = 2.81.(Excel provides a p-value of .42.)
Therefore, we cannot reject H0.
15Slide© 2005 Thomson/South-Western
Source ofVariation
Sum ofSquares
Degrees ofFreedom
MeanSquares F
Treatments
Error
Total
2
14
5.2
33.2
38.4
12
Completely Randomized Design
2.60
2.77
.939
ANOVA Table
6
16Slide© 2005 Thomson/South-Western
• For a randomized block design the sum of squares total (SST) is partitioned into three groups: sum of squares due to treatments, sum of squares due to blocks, and sum of squares due to error.
ANOVA Procedure
Randomized Block Design
SST = SSTR + SSBL + SSE
• The total degrees of freedom, nT - 1, are partitioned such that k - 1 degrees of freedom go to treatments, b - 1 go to blocks, and (k - 1)(b - 1) go to the error term.
17Slide© 2005 Thomson/South-Western
MSTR SSTR-
=k 1
MSTR SSTR-
=k 1
MSTRMSE
MSTRMSE
Source ofVariation
Sum ofSquares
Degrees ofFreedom
MeanSquares F
Treatments
Error
Total
k - 1
nT - 1
SSTR
SSE
SST
Randomized Block Design
ANOVA Table
Blocks SSBL b - 1
(k – 1)(b – 1)
=SSBLMSBL
-1b=
SSBLMSBL-1b
MSE SSE=
− −( )( )k b1 1MSE SSE
=− −( )( )k b1 1
18Slide© 2005 Thomson/South-Western
Randomized Block Design
Example: Crescent Oil Co.Crescent Oil has developed three
new blends of gasoline and mustdecide which blend or blends toproduce and distribute. A studyof the miles per gallon ratings of thethree blends is being conducted to determine if themean ratings are the same for the three blends.
7
19Slide© 2005 Thomson/South-Western
Randomized Block Design
Example: Crescent Oil Co.Five automobiles have been
tested using each of the threegasoline blends and the milesper gallon ratings are shown onthe next slide.
20Slide© 2005 Thomson/South-Western
Randomized Block Design
29.8 28.8 28.4TreatmentMeans
12345
3130293326
3029293125
3029282926
30.33329.33328.66731.00025.667
Type of Gasoline (Treatment)BlockMeansBlend X Blend Y Blend Z
Automobile(Block)
21Slide© 2005 Thomson/South-Western
Mean Square Due to Error
Randomized Block Design
MSE = 5.47/[(3 - 1)(5 - 1)] = .68SSE = 62 - 5.2 - 51.33 = 5.47
MSBL = 51.33/(5 - 1) = 12.8SSBL = 3[(30.333 - 29)2 + . . . + (25.667 - 29)2] = 51.33
MSTR = 5.2/(3 - 1) = 2.6SSTR = 5[(29.8 - 29)2 + (28.8 - 29)2 + (28.4 - 29)2] = 5.2
The overall sample mean is 29. Thus,Mean Square Due to Treatments
Mean Square Due to Blocks
8
22Slide© 2005 Thomson/South-Western
Source ofVariation
Sum ofSquares
Degrees ofFreedom
MeanSquares F
Treatments
Error
Total
2
14
5.20
5.47
62.00
8
2.60
.68
3.82
ANOVA Table
Randomized Block Design
Blocks 51.33 12.804
23Slide© 2005 Thomson/South-Western
Rejection Rule
Randomized Block Design
For α = .05, F.05 = 4.46(2 d.f. numerator and 8 d.f. denominator)
p-Value Approach: Reject H0 if p-value < .05Critical Value Approach: Reject H0 if F > 4.46
24Slide© 2005 Thomson/South-Western
Conclusion
Randomized Block Design
There is insufficient evidence to conclude thatthe miles per gallon ratings differ for the threegasoline blends.
The p-value is greater than .05 (where F = 4.46) and less than .10 (where F = 3.11). (Excel provides a p-value of .07). Therefore, we cannot reject H0.
F = MSTR/MSE = 2.6/.68 = 3.82Test Statistic
9
25Slide© 2005 Thomson/South-Western
Factorial Experiments
In some experiments we want to draw conclusions about more than one variable or factor.Factorial experiments and their corresponding ANOVA computations are valuable designs when simultaneous conclusions about two or more factors are required.
For example, for a levels of factor A and b levels of factor B, the experiment will involve collecting data on ab treatment combinations.
The term factorial is used because the experimental conditions include all possible combinations of the factors.
26Slide© 2005 Thomson/South-Western
• The ANOVA procedure for the two-factor factorial experiment is similar to the completely randomized experiment and the randomized block experiment.
ANOVA Procedure
SST = SSA + SSB + SSAB + SSE
• The total degrees of freedom, nT - 1, are partitioned such that (a – 1) d.f go to Factor A, (b – 1) d.f go to Factor B, (a – 1)(b – 1) d.f. go to Interaction, and ab(r – 1) go to Error.
Two-Factor Factorial Experiment
• We again partition the sum of squares total (SST) into its sources.
27Slide© 2005 Thomson/South-Western
=SSAMSA
-1a=
SSAMSA-1a
MSAMSEMSAMSE
Source ofVariation
Sum ofSquares
Degrees ofFreedom
MeanSquares F
Factor A
Error
Total
a - 1
nT - 1
SSA
SSE
SST
Factor B SSB b - 1
ab(r – 1) =−
SSEMSE( 1)ab r
=−
SSEMSE( 1)ab r
Two-Factor Factorial Experiment
=SSBMSB
-1b=
SSBMSB-1b
Interaction SSAB (a – 1)(b – 1) =− −SSABMSAB
( 1)( 1)a b=
− −SSABMSAB
( 1)( 1)a b
MSBMSEMSBMSE
MSABMSE
MSABMSE
10
28Slide© 2005 Thomson/South-Western
Step 3 Compute the sum of squares for factor B
2
1 1 1SST = ( )
a b r
ijki j k
x x= = =
−∑∑∑ 2
1 1 1SST = ( )
a b r
ijki j k
x x= = =
−∑∑∑
2
1SSA = ( . )
a
ii
br x x=
−∑ 2
1SSA = ( . )
a
ii
br x x=
−∑
2
1SSB = ( . )
b
jj
ar x x=
−∑ 2
1SSB = ( . )
b
jj
ar x x=
−∑
Two-Factor Factorial Experiment
Step 1 Compute the total sum of squares
Step 2 Compute the sum of squares for factor A
29Slide© 2005 Thomson/South-Western
Step 4 Compute the sum of squares for interaction
2
1 1SSAB = ( . . )
a b
ij i ji j
r x x x x= =
− − +∑∑ 2
1 1SSAB = ( . . )
a b
ij i ji j
r x x x x= =
− − +∑∑
Two-Factor Factorial Experiment
SSE = SST – SSA – SSB - SSAB
Step 5 Compute the sum of squares due to error
30Slide© 2005 Thomson/South-Western
A survey was conducted of hourly wagesfor a sample of workers in two industriesat three locations in Ohio. Part of thepurpose of the survey was todetermine if differences existin both industry type and
location. The sample data are shownon the next slide.
Example: State of Ohio Wage Survey
Two-Factor Factorial Experiment
11
31Slide© 2005 Thomson/South-Western
Example: State of Ohio Wage Survey
Two-Factor Factorial Experiment
12.7012.5012.00II12.1012.0012.50II13.0012.6012.40II12.2012.0012.10I12.7011.2011.80I12.9011.8012.10I
ColumbusClevelandCincinnatiIndustry
32Slide© 2005 Thomson/South-Western
Factors
Two-Factor Factorial Experiment
•Each experimental condition is repeated 3 times
•Factor B: Location (3 levels)•Factor A: Industry Type (2 levels)
Replications
33Slide© 2005 Thomson/South-Western
Source ofVariation
Sum ofSquares
Degrees ofFreedom
MeanSquares F
Factor A
Error
Total
1
17
.50
1.43
3.42
12
.50
.12
4.19
ANOVA Table
Factor B 1.12 .562
Two-Factor Factorial Experiment
Interaction .37 .1924.691.55
12
34Slide© 2005 Thomson/South-Western
Conclusions Using the p-Value Approach
Two-Factor Factorial Experiment
(p-values were found using Excel)
Interaction is not significant.•Interaction: p-value = .25 > α = .05
Mean wages differ by location.•Locations: p-value = .03 < α = .05
Mean wages do not differ by industry type.•Industries: p-value = .06 > α = .05
35Slide© 2005 Thomson/South-Western
Conclusions Using the Critical Value Approach
Two-Factor Factorial Experiment
Interaction is not significant.•Interaction: F = 1.55 < Fα = 3.89
Mean wages differ by location.•Locations: F = 4.69 > Fα = 3.89
Mean wages do not differ by industry type.•Industries: F = 4.19 < Fα = 4.75
36Slide© 2005 Thomson/South-Western
End of Chapter 13, Part B