CHAPTER 12
Analysis of Variance Tests
to accompany
Introduction to Business Statistics
fourth edition,by Ronald M,Weiers
Presentation by Priscilla Chaffe-Stengel
Donald N,Stengel
? 2002 The Wadsworth Group
Chapter 12 - Learning Objectives
? Describe the relationship between analysis of
variance,the design of experiments,and the
types of applications to which the experiments
are applied.
? Differentiate one-way,randomized block,and
two-way analysis of variance techniques.
? Arrange data into a format that facilitates their
analysis by the appropriate analysis of variance
technique.
? Use the appropriate methods in testing
hypotheses relative to the experimental data.
? 2002 The Wadsworth Group
Chapter 12 - Key Terms
? Factor level,treatment,
block,interaction
? Within-group
variation
? Between-group
variation
? Completely
randomized design
? Randomized block
design
? Two-way analysis of
variance,factorial
experiment
? Sum of squares:
– Treatment
– Error
– Block
– Interaction
– Total
? 2002 The Wadsworth Group
Chapter 12 - Key Concepts
? Differences in outcomes on a
dependent variable may be explained
to some degree by differences in the
independent variables.
? Variation between treatment groups
captures the effect of the treatment,
Variation within treatment groups
represents random error not explained
by the experimental treatments.
? 2002 The Wadsworth Group
One-Way ANOVA
? Purpose,Examines two or more levels of an
independent variable to determine if their
population means could be equal.
? Hypotheses:
– H0,μ1 = μ2 =,.,= μt *
– H1,At least one of the treatment group
means differs from the rest,OR At least
two of the population means are not equal.
* where t = number of treatment groups or levels
? 2002 The Wadsworth Group
One-Way ANOVA,cont.
? Format for data,Data appear in separate columns
or rows,organized as treatment groups,Sample size of
each group may differ.
? Calculations:
– SST = SSTR + SSE (definitions follow)
– Sum of squares total (SST) = sum of squared
differences between each individual data value
(regardless of group membership) minus the grand
mean,,across all data..,total variation in the data
(not variance).
2)–(SST ??= xijx
x
? 2002 The Wadsworth Group
One-Way ANOVA,cont.
? Calculations,cont.:
– Sum of squares treatment (SSTR) = sum of
squared differences between each group mean and the
grand mean,balanced by sample size..,between-
groups variation (not variance).
– Sum of squares error (SSE) = sum of squared
differences between the individual data values and the
mean for the group to which each belongs..,within-
group variation (not variance).
2)–(SSTR xjxjn?=
SSE = (xij – x j)2??
? 2002 The Wadsworth Group
One-Way ANOVA,cont.
? Calculations,cont.:
– Mean square treatment (MSTR) = SSTR/(t – 1)
where t is the number of treatment groups..,between-
groups variance.
– Mean square error (MSE) = SSE/(N – t) where
N is the number of elements sampled and t is the
number of treatment groups..,within-groups
variance.
– F-Ratio = MSTR/MSE,where numerator degrees
of freedom are t – 1 and denominator degrees of
freedom are N – t.
? 2002 The Wadsworth Group
One-Way ANOVA - An Example
Problem 12.30,Safety researchers,interested in determining
if occupancy of a vehicle might be related to the speed at
which the vehicle is driven,have checked the following
speed (MPH) measurements for two random samples of
vehicles:
Driver alone,64 50 71 55 67 61 80 56 59 74
1+ rider(s),44 52 54 48 69 67 54 57 58 51 62 67
a,What are the null and alternative hypotheses?
H0,μ1 = μ2 where Group 1 = driver alone
H1,μ1 ? μ2 Group 2 = with rider(s)
? 2002 The Wadsworth Group
One-Way ANOVA - An Example
b,Use ANOVA and the 0.025 level of significance in testing
the appropriate null hypothesis.
SSTR = 10(63.7 – 60)2 + 12(56.917 – 60)2 = 250.983
SSE = (64 – 63.7 )2 + (50 – 63.7 )2 +,.,+ (74 – 63.7 )2
+ (44 – 56.917) 2 + (52 – 56.917) 2 +,.,+ (67 – 56.917) 2
= 1487.017
SSTotal = (64 – 60 )2 + (50 – 60 )2 +,.,+ (74 – 60 )2
+ (44 – 60) 2 + (52 – 60) 2 +,.,+ (67 – 60) 2
= 1738
x 1 = 63, 7,s 1 = 9, 35 77,n 1 = 10
x 2 = 56, 91 6,s 2 = 7, 80 6,n 2 = 12
x = 60, 0
? 2002 The Wadsworth Group
One-Way ANOVA - An Example
Organizing the information by table:
Source of Sum of Degrees of Mean
Variation Squares Freedom Square F-Ratio
Treatments 250.983 1 250.983 3.38
Error 1487.017 20 74.351
Total 1738,21
I,H0,μ1 = μ2 H1,μ1 ? μ2
II,Rejection Region:
a = 0.025
dfnum = 1 If F > 5.87,reject H0.
dfdenom = 20
??? ??0.9 75
Do Not R ej ec t H
0
Re je ct H
0
F= 5.8 7
? 2002 The Wadsworth Group
One-Way ANOVA - An Example
III,Test Statistic,F = 250.983 / 74.351 = 3.38
IV,Conclusion,Since the test statistic of F = 3.38 falls below
the critical value of F = 5.87,we do not reject H0 with at
most 2.5% error.
V,Implications,There is not enough evidence to conclude
that the speed at which a vehicle is driven changes
depending on whether the driver is alone or has at least
one passenger.
c,p-value:
To find the p-value,in a cell within a Microsoft Excel
spreadsheet,type,=FDIST(3.38,1,20)
The answer is,p-value = 0.0809 ? 2002 The Wadsworth Group
One-Way ANOVA - An Example
D,For each sample,construct the 95% confidence interval
for the population mean.
? Assuming each population is approximately normally
distributed,we will use s = for the t confidence
interval,Since MSE has 20 degrees of freedom,we will use
the t for df = 20,or t = 2.086.
? Sample for Driver Alone,
Lower bound = 58.012,Upper bound = 69.388
? Sample for One or More Riders,
Lower bound = 51.725,Upper bound = 62.109
688.5 7.63 10 351.74086.2 7.63 ?=??=?? nM S Etx
M S E
192.5 917.56 12 351.74086.2 917.56 ?=??=?? nMSEtx
? 2002 The Wadsworth Group
Randomized Block Design,or
One-Way ANOVA with Block
? Purpose,Reduces variance within treatment groups by
removing known fluctuation among different levels of a
second dimension,called a,block.”
? Two Sets of Hypotheses:
Treatment Effect:
H0,μ1 = μ2 =,.,= μt for treatment groups 1 through t
H1,At least one treatment mean differs from the rest.
Block Effect:
H0,μ1 = μ2 =,.,= μn for block groups 1 through n
H1,At least one block mean differs from the rest.
? 2002 The Wadsworth Group
One-Way ANOVA with Block
? Format for data,Data appear in a table,where location
in a specific row and a specific column is important.
? Calculations:
Variations - Sum of Squares:
– SST = SSTR + SSB + SSE
– Sum of squares total (SST) = sum of squared
differences between each individual data value
(regardless of group membership) minus the grand
mean,,across all data..,total variation in the data (not
variance).
x
SST = (xij – x?? )2
? 2002 The Wadsworth Group
One-Way ANOVA with Block
? Calculations,cont.:
– Sum of squares treatment (SSTR) = sum of
squared differences between each treatment group
mean and the grand mean,balanced by sample size..,
between-treatment-groups variation (not variance).
– Sum of squares block (SSB) = sum of squared
differences between each block group mean and the
grand mean,balanced by sample size..,between-block-
groups variation (not variance).
S S T R = ?? ?n x j x( ) 2
SSB = ?? ?t xi x( ) 2
? 2002 The Wadsworth Group
One-Way ANOVA with Block
? Calculations,cont.:
– Sum of squares error (SSE):
SSE = SST – SSTR – SSB
Variances - Mean Squares:
– Mean square treatment (MSTR) = SSTR/(t – 1)
where t is the number of treatment groups..,between-
treatment-groups variance.
– Mean square block (MSB) = SSB/(n – 1) where n
is the number of block groups..,between-block-groups
variance,Controls the size of SSE by removing variation
that is explained by the blocking categories.
? 2002 The Wadsworth Group
One-Way ANOVA with Block
? Calculations,cont.:
– Mean square error:
where t is the number of treatment groups and n is the
number of block groups..,within-groups variance
unexplained by either the treatment or the block group.
Test Statistics,F-Ratios:
– F-Ratio,Treatment = MSTR/MSE,where numerator
degrees of freedom are t – 1 and denominator degrees of
freedom are (t – 1)(n – 1), This F-ratio is the test statistic
for the hypothesis that the treatment group means are
equal,To reject the null hypothesis means that at least one
treatment group had a different effect than the rest.
M S E = S S E( t – 1 ) ?( n – 1 )
? 2002 The Wadsworth Group
One-Way ANOVA with Block
? Calculations -
Test Statistics,F-Ratios,cont.:
– F-Ratio,Block = MSB/MSE,where numerator degrees
of freedom are n – 1 and denominator degrees of freedom
are (t – 1)(n – 1),This F-ratio is the test statistic for the
hypothesis that the block group means are equal,To reject
the null hypothesis means that at least one block group had
a different effect on the dependent variable than the rest.
? 2002 The Wadsworth Group
Two-Way ANOVA
? Purpose,Examines (1) the effect of
Factor A on the dependent variable,y;
(2) the effect of Factor B on the
dependent variable,y; along with (3)
the effects of the interactions between
different levels of the two factors on
the dependent variable,y.
? 2002 The Wadsworth Group
Two-Way ANOVA
? Three Sets of Hypotheses:
Factor A Effect:
H0,μ1 = μ2 =,.,= μa for treatment groups 1 through a
H1,At least one Factor A level mean differs from the rest.
Factor B Effect:
H0,μ1 = μ2 =,.,= μb for block groups 1 through b
H1,At least one Factor B level mean differs from the rest.
Interaction Effect:
H0,There are no interaction effects.
H1,At least one combination of Factor A and Factor B
levels has an effect on the dependent variable.
? 2002 The Wadsworth Group
Two-Way ANOVA
? Format for data,Data appear in a grid,each cell having
two or more entries,The number of values in each cell is
constant across the grid and represents r,the number of
replications within each cell.
? Calculations,Variations - Sum of Squares
– SST = SSA + SSB + SSAB + SSE
– Sum of squares total (SST) = sum of squared
differences between each individual data value
(regardless of group membership) minus the grand
mean,,across all data..,total variation in the data (not
variance).
SST = (??? x – x)2
x
? 2002 The Wadsworth Group
Two-Way ANOVA
? Calculations,cont.:
– Sum of squares Factor A (SSA) = sum of
squared differences between each group mean for
Factor A and the grand mean,balanced by sample
size..,between-factor-groups variation (not variance).
– Sum of squares Factor B (SSB) = sum of squared
differences between each group mean for Factor B and
the grand mean,balanced by sample size..,between-
factor-groups variation (not variance).
S S A = r ?b ?? ( x – x ) 2
S S B = r ? a ?? ( x – x ) 2
? 2002 The Wadsworth Group
Two-Way ANOVA
? Calculations,cont.:
– Sum of squares Error (SSE) = sum of squared
differences between individual values and their cell
mean..,within-groups variation (not variance).
– Sum of squares Interaction:
SSAB = SST – SSA – SSB – SSE
???= 2)–(SSE ijxx
? 2002 The Wadsworth Group
Two-Way ANOVA
? Calculations,Variances - Mean Squares
– Mean Square Factor A (MSA) = SSA/(a – 1),
where a = the number of levels of Factor A,.,
between-levels variance,Factor A.
– Mean Square Factor B (MSB) = SSB/(b – 1),
where b = the number of levels of Factor B,.,
between-levels variance,Factor B.
? 2002 The Wadsworth Group
Two-Way ANOVA
? Calculations - Variances,cont.:
– Mean Square Interaction (MSAB) =
SSAB/(a – 1)(b – 1),Controls the size of SSE
by removing fluctuation due to the combined
effect of Factor A and Factor B.
– Mean Square Error (MSE) = SSE/ab(r – 1),
where ab(r – 1) = the degrees of freedom on
error,.,the within-groups variance.
? 2002 The Wadsworth Group
Two-Way ANOVA
? Calculations - F-Ratios:
– F-Ratio,Factor A = MSA/MSE,where
numerator degrees of freedom are a – 1 and
denominator degrees of freedom are ab(r – 1),
This F-ratio is the test statistic for the
hypothesis that the Factor A group means are
equal,To reject the null hypothesis means that
at least one Factor A group had a different
effect on the dependent variable than the rest.
? 2002 The Wadsworth Group
Two-Way ANOVA
? Calculations - F-Ratios:
– F-Ratio,Factor B = MSB/MSE,where
numerator degrees of freedom are b – 1 and
denominator degrees of freedom are ab(r – 1),
This F-ratio is the test statistic for the
hypothesis that the Factor B group means are
equal,To reject the null hypothesis means that
at least one Factor B group had a different
effect on the dependent variable than the rest.
? 2002 The Wadsworth Group
Two-Way ANOVA
? Calculations - F-Ratios:
– F-Ratio,Interaction = MSAB/MSE,where
numerator degrees of freedom are (a – 1)( b – 1)
and denominator degrees of freedom are
ab(r – 1),This F-ratio is the test statistic for the
hypothesis that Factors A and B operate
independently,To reject the null hypothesis
means that there is some relationship where
levels of Factor A operate differently with
different levels of Factor B.
? 2002 The Wadsworth Group