Você está na página 1de 47

Slides by

JOHN
LOUCKS
& Updated by
SPIROS
VELIANITIS

© 2008 Thomson South-Western. All Rights Reserved Slide


1
Chapter 13
Experimental Design and Analysis of Variance
 Introduction to Experimental Design
and Analysis of Variance
 Analysis of Variance
and the Completely Randomized Design
 Multiple Comparison Procedures

© 2008 Thomson South-Western. All Rights Reserved Slide


2
An Introduction to Experimental Design
and Analysis of Variance
 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.
 Analysis of variance (ANOVA) can be used to analyze
the data obtained from experimental or observational
studies.

© 2008 Thomson South-Western. All Rights Reserved Slide


3
An Introduction to Experimental Design
and Analysis of Variance
 In this chapter three types of experimental designs
are introduced.
• a completely randomized design
• a randomized block design
• a factorial experiment

© 2008 Thomson South-Western. All Rights Reserved Slide


4
An Introduction to Experimental Design
and Analysis of Variance
 A factor is a variable that the experimenter has
selected for investigation (the independent variable).
 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.

© 2008 Thomson South-Western. All Rights Reserved Slide


5
Analysis of Variance: A Conceptual Overview

Analysis
Analysis of
of Variance
Variance (ANOVA)
(ANOVA) cancan be
be used
used to
to test
test
for
for the
the equality
equality of
of three
three or
or more
more population
population means.
means.

Data
Data obtained
obtained from
from observational
observational or
or experimental
experimental
studies
studies can
can be
be used
used for
for the
the analysis.
analysis.

We
We want
want to
to use
use the
the sample
sample results
results to
to test
test the
the
following
following hypotheses:
hypotheses:

H0: 1=2=3=. . .=


k

Ha: Not all population means are equal

© 2008 Thomson South-Western. All Rights Reserved Slide


6
Analysis of Variance: A Conceptual Overview

H0: 1=2=3=. . .=


k

Ha: Not all population means are equal

If H00 is
If H is rejected,
rejected, we
we cannot
cannot conclude
conclude that
that all
all
population
population means
means are
are different.
different.

Rejecting H00 means


Rejecting H means that
that at
at least
least two
two population
population
means
means have
have different
different values.
values.

© 2008 Thomson South-Western. All Rights Reserved Slide


7
Analysis of Variance: A Conceptual Overview

 Assumptions for Analysis of Variance

For
For each
each population,
population, the
the response
response (dependent)
(dependent)
variable
variable is
is normally
normally distributed.
distributed.

The
The variance
variance of
of the
the response
response variable, denoted 
variable, denoted 22,,
is
is the
the same
same for
for all
all of
of the
the populations.
populations.

The
The observations
observations must
must be
be independent.
independent.

© 2008 Thomson South-Western. All Rights Reserved Slide


8
Analysis of Variance: A Conceptual Overview

 Sampling Distribution of x Given H0 is True

Sample means are close together


because there is only
one sampling distribution
when H0 is true.
2
 x2 
n

x2  x1 x3

© 2008 Thomson South-Western. All Rights Reserved Slide


9
Analysis of Variance: A Conceptual Overview

 Sampling Distribution of x Given H0 is False

Sample means come from


different sampling distributions
and are not as close together
when H0 is false.

x3 3 x1 1 2 x2

© 2008 Thomson South-Western. All Rights Reserved Slide


10
Analysis of Variance

 Between-Treatments Estimate of Population Variance


 Within-Treatments Estimate of Population Variance
 Comparing the Variance Estimates: The F Test
 ANOVA Table

© 2008 Thomson South-Western. All Rights Reserved Slide


11
Between-Treatments Estimate
of Population Variance 2
 The estimate of 2 based on the variation of the
sample means is called the mean square due to
treatments and is denoted by MSTR.
k

 j j
n (
j 1
x  x ) 2

MSTR 
k1

Denominator is the Numerator is called


degrees of freedom the sum of squares due
associated with SSTR to treatments (SSTR)

© 2008 Thomson South-Western. All Rights Reserved Slide


12
Within-Treatments Estimate
of Population Variance 2
 The estimate of 2 based on the variation of the
sample observations within each sample is called the
mean square error and is denoted by MSE.

k
2
 (n j  1) s 2j
j1
MSE 
nT  k

Numerator is called
Denominator is the the sum of squares
degrees of freedom due to error (SSE)
associated with SSE

© 2008 Thomson South-Western. All Rights Reserved Slide


13
Comparing the Variance Estimates: The F Test

 If the null hypothesis is true and the ANOVA


assumptions are valid, the sampling distribution of
MSTR/MSE is an F distribution with MSTR d.f.
equal to k - 1 and MSE d.f. equal to nT - k.
 If the means of the k populations are not equal, the
value of MSTR/MSE will be inflated because MSTR
overestimates 2.
 Hence, we will reject H0 if the resulting value of
MSTR/MSE appears to be too large to have been
selected at random from the appropriate F
distribution.

© 2008 Thomson South-Western. All Rights Reserved Slide


14
Comparing the Variance Estimates: The F Test

 Sampling Distribution of MSTR/MSE

Sampling Distribution
of MSTR/MSE

Reject H0
Do Not Reject H0 
MSTR/MSE
F
Critical Value

© 2008 Thomson South-Western. All Rights Reserved Slide


15
Test for the Equality of k Population Means

 Hypotheses

H0: 1=2=3=. . .=


k 
Ha: Not all population means are equal
 Test Statistic

F = MSTR/MSE

© 2008 Thomson South-Western. All Rights Reserved Slide


16
Test for the Equality of k Population Means

 Rejection Rule

p-value Approach: Reject H0 if p-value < 

Critical Value Approach: Reject H0 if F > F

where the value of F is based on an


F distribution with k - 1 numerator d.f.
and nT - k denominator d.f.

© 2008 Thomson South-Western. All Rights Reserved Slide


17
ANOVA Table
 The ANOVA table decomposes the variance into two
components (sources): a between-group component
(treatments) and a within-group component (error). The F-
ratio, which in this case equals 15.6234, is a ratio of the
between-group estimate to the within-group estimate. Since
the P-value of the F-test is less than 0.05, there is a statistically
significant difference between the means from one level to
another at the 95.0% confidence level.

© 2008 Thomson South-Western. All Rights Reserved Slide


18
Testing for the Equality of k Population Means:
A Completely Randomized Experimental Design
 Example: AutoShine, Inc.
AutoShine, Inc. is considering marketing a long-
lasting car wax. Three different waxes (Type 1, Type 2,
and Type 3) have been developed.
In order to test the durability
of these waxes, 5 new cars were
waxed with Type 1, 5 with Type
2, and 5 with Type 3. Each car was then
repeatedly run through an automatic carwash until the
wax coating showed signs of deterioration.

© 2008 Thomson South-Western. All Rights Reserved Slide


19
Testing for the Equality of k Population Means:
A Completely Randomized Experimental Design
 Example: AutoShine, Inc.
The number of times each car went through the
carwash before its wax deteriorated is shown on the
next slide. AutoShine, Inc. must decide which wax
to market. Are the three waxes
equally effective?

Factor . . . Car wax


Treatments . . . Type I, Type 2, Type 3
Experimental units . . . Cars
Response variable . . . Number of washes

© 2008 Thomson South-Western. All Rights Reserved Slide


20
Testing for the Equality of k Population Means:
A Completely Randomized Experimental Design

Wax Wax Wax


Observation Type 1 Type 2 Type 3
1 27 33 29
2 30 28 28
3 29 31 30
4 28 30 32
5 31 30 31

Sample Mean 29.0 30.4 30.0


Sample Variance 2.5 3.3 2.5

© 2008 Thomson South-Western. All Rights Reserved Slide


21
Testing for the Equality of k Population Means:
A Completely Randomized Experimental Design
 Hypotheses
H0: 1=2=3
Ha: Not all the means are equal
where:
1 = mean number of washes using Type 1 wax
2 = mean number of washes using Type 2 wax
3 = mean number of washes using Type 3 wax

© 2008 Thomson South-Western. All Rights Reserved Slide


22
Testing for the Equality of k Population Means:
A Completely Randomized Experimental Design
 Test Statistic
F = MSTR/MSE
 Conclusion
The p-value of 0.42 is greater than 0.10, where F = 2.81.

Therefore, we cannot reject H0.


There is insufficient evidence to conclude that
the mean number of washes for the three wax
types are not all the same (waxes are the same).

© 2008 Thomson South-Western. All Rights Reserved Slide


23
Testing for the Equality of k Population Means:
A Completely Randomized Experimental Design
 ANOVA Table

Source of Sum of Degrees of Mean


Variation Squares Freedom Squares F p-Value

Treatments 5.2 2 2.60 .939 .42


Error 33.2 12 2.77

Total 38.4 14

© 2008 Thomson South-Western. All Rights Reserved Slide


24
Testing for the Equality of k Population Means:
An Observational Study
 Example: Reed Manufacturing
Janet Reed would like to know if
there is any significant difference in
the mean number of hours worked per
week for the department managers
at her three manufacturing plants
(in Buffalo, Pittsburgh, and Detroit).
An F test will be conducted using
 = .05.

© 2008 Thomson South-Western. All Rights Reserved Slide


25
Testing for the Equality of k Population Means:
An Observational Study
 Example: Reed Manufacturing
A simple random sample of five
managers from each of the three plants
was taken and the number of hours
worked by each manager in the
previous week is shown on the next
slide.
Factor . . . Manufacturing plant
Treatments . . . Buffalo, Pittsburgh, Detroit
Experimental units . . . Managers
Response variable . . . Number of hours worked

© 2008 Thomson South-Western. All Rights Reserved Slide


26
Testing for the Equality of k Population Means:
An Observational Study

Plant 1 Plant 2 Plant 3


Observation Buffalo Pittsburgh Detroit
1 48 73 51
2 54 63 63
3 57 66 61
4 54 64 54
5 62 74 56
Sample Mean 55 68 57
Sample Variance 26.0 26.5 24.5

© 2008 Thomson South-Western. All Rights Reserved Slide


27
Testing for the Equality of k Population Means:
An Observational Study
 p -Value and Critical Value Approaches

Develop the hypotheses.


H0: 1=2=3
Ha: Not all the means are equal
where:
1 = mean number of hours worked per
week by the managers at Plant 1
2 = mean number of hours worked per
week by the managers at Plant 2
3 = mean number of hours worked per
week by the managers at Plant 3

© 2008 Thomson South-Western. All Rights Reserved Slide


28
Testing for the Equality of k Population Means:
An Observational Study
 ANOVA Table

Source of Sum of Degrees of Mean


Variation Squares Freedom Square F p-Value
Treatment 490 2 245 9.55 .0033
Error 308 12 25.667

Total 798 14
The p-value < .05, so we reject H0.
We have sufficient evidence to conclude that the
mean number of hours worked per week by
department managers is not the same at all 3 plant.
© 2008 Thomson South-Western. All Rights Reserved Slide
29
Multiple Comparison Procedures

 Suppose that analysis of variance has provided


statistical evidence to reject the null hypothesis of
equal population means.
 Fisher’s least significant difference (LSD) procedure
can be used to determine where the differences
occur.

© 2008 Thomson South-Western. All Rights Reserved Slide


30
Fisher’s LSD Procedure

 Hypotheses
H 0 : i   j
H a : i   j

 Test Statistic
xi  x j
t
MSE( 1 n  1 n )
i j

© 2008 Thomson South-Western. All Rights Reserved Slide


31
Fisher’s LSD Procedure

 Rejection Rule
p-value Approach:
Reject H0 if p-value < 

Critical Value Approach:

Reject H0 if t < -ta/2 or t > ta/2

where the value of ta/2 is based on a


t distribution with nT - k degrees of freedom.

© 2008 Thomson South-Western. All Rights Reserved Slide


32
Fisher’s LSD Procedure
Based on the Test Statistic xi - xj
 Example: Reed Manufacturing
Recall that Janet Reed wants to know
if there is any significant difference in
the mean number of hours worked per
week for the department managers
at her three manufacturing plants.
Analysis of variance has provided
statistical evidence to reject the null
hypothesis of equal population means.
Fisher’s least significant difference (LSD) procedure
can be used to determine where the differences occur.

© 2008 Thomson South-Western. All Rights Reserved Slide


33
Fisher’s LSD Procedure
Based on the Test Statistic xi - xj
 LSD for Plants 1 and 2
• Hypotheses (A) H 0 : 1   2
H a : 1   2
• Rejection Rule
Reject H0 if x1  x2 > 6.98
• Test Statistic
x1  x2 = |55  68| = 13
• Conclusion
The mean number of hours worked at Plant 1 is
not equal to the mean number worked at Plant 2.

© 2008 Thomson South-Western. All Rights Reserved Slide


34
Fisher’s LSD Procedure
Based on the Test Statistic xi - xj
 LSD for Plants 1 and 3
• Hypotheses (B) H 0 : 1   3
H a : 1   3
• Rejection Rule
Reject H0 if x1  x3 > 6.98
• Test Statistic
x1  x3 = |55  57| = 2
• Conclusion
There is no significant difference between the mean
number of hours worked at Plant 1 and the mean
number of hours worked at Plant 3.

© 2008 Thomson South-Western. All Rights Reserved Slide


35
Fisher’s LSD Procedure
Based on the Test Statistic xi - xj
 LSD for Plants 2 and 3
• Hypotheses (C) H 0 : 2  3
H a : 2  3
• Rejection Rule
Reject H0 if x2  x3 > 6.98
• Test Statistic
x2  x3 = |68  57| = 11
• Conclusion
The mean number of hours worked at Plant 2 is
not equal to the mean number worked at Plant 3.

© 2008 Thomson South-Western. All Rights Reserved Slide


36
Type I Error Rates

 The comparison-wise Type I error rate  indicates


the level of significance associated with a single
pairwise comparison.
 The experiment-wise Type I error rate EW is the
probability of making a Type I error on at least one of
the (k – 1)! pairwise comparisons.

EW = 1 – (1 – )(k – 1)!

 The experiment-wise Type I error rate gets larger for


problems with more populations (larger k).

© 2008 Thomson South-Western. All Rights Reserved Slide


37
Chapter 13, Part B
Experimental Design and Analysis of Variance

 Randomized Block Design


 Factorial Experiments

© 2008 Thomson South-Western. All Rights Reserved Slide


38
Randomized Block Design

 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 (single sample, each
block(element) is used in all treatments).

© 2008 Thomson South-Western. All Rights Reserved Slide


39
Randomized Block Design

 ANOVA Procedure
• 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.

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.

© 2008 Thomson South-Western. All Rights Reserved Slide


40
Randomized Block Design
 ANOVA Table

Source of Sum of Degrees of Mean p-


Variation Squares Freedom Square F Value

SSTR MSTR
Treatments SSTR k-1 MSTR 
k-1 MSE
SSBL
Blocks SSBL b-1 MSBL 
b -1
SSE
Error SSE (k – 1)(b – 1) MSE 
( k  1)(b  1)

Total SST nT - 1

© 2008 Thomson South-Western. All Rights Reserved Slide


41
Randomized Block Design

 Example: Crescent Oil Co.


Crescent Oil has developed three
new blends of gasoline and must
decide which blend or blends to
produce and distribute. A study
of the miles per gallon ratings of the
three blends is being conducted to determine if the
mean ratings are the same for the three blends.

© 2008 Thomson South-Western. All Rights Reserved Slide


42
Randomized Block Design

 Example: Crescent Oil Co.


Five automobiles have been
tested using each of the three
gasoline blends and the miles
per gallon ratings are shown on
the next slide.

Factor . . . Gasoline blend


Treatments . . . Blend X, Blend Y, Blend Z
Blocks . . . Automobiles
Response variable . . . Miles per gallon

© 2008 Thomson South-Western. All Rights Reserved Slide


43
Randomized Block Design

Type of Gasoline (Treatment)


Automobile Block
(Block) Blend X Blend Y Blend Z Means

1 31 30 30 30.333
2 30 29 29 29.333
3 29 29 28 28.667
4 33 31 29 31.000
5 26 25 26 25.667
Treatment
Means 29.8 28.8 28.4

© 2008 Thomson South-Western. All Rights Reserved Slide


44
Randomized Block Design

 ANOVA Table

Source of Sum of Degrees of Mean


Variation Squares Freedom Square F p-Value

Treatments 5.20 2 2.60 3.82 .07


Blocks 51.33 4 12.80
Error 5.47 8 .68

Total 62.00 14

© 2008 Thomson South-Western. All Rights Reserved Slide


45
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.
 The term factorial is used because the experimental
conditions include all possible combinations of the
factors.
 For example, for a levels of factor A and b levels of
factor B, the experiment will involve collecting data
on ab treatment combinations.

© 2008 Thomson South-Western. All Rights Reserved Slide


46
Chapter 13
Experimental Design and Analysis of Variance
 Introduction to Experimental Design
and Analysis of Variance
 Analysis of Variance
and the Completely Randomized Design
 Multiple Comparison Procedures

© 2008 Thomson South-Western. All Rights Reserved Slide


47

Você também pode gostar