Transcript Statistics

Chapter 12
Analysis of Variance
McGraw-Hill, Bluman, 7th ed., Chapter 12
1
Chapter 12 Overview

Introduction
12-1 One-Way Analysis of Variance

12-2 The Scheffé Test and the Tukey Test

12-3 Two-Way Analysis of Variance
Bluman, Chapter 12
2
Chapter 12 Objectives
1. Use the one-way ANOVA technique to
determine if there is a significant difference
among three or more means.
2. Determine which means differ, using the
Scheffé or Tukey test if the null hypothesis is
rejected in the ANOVA.
3. Use the two-way ANOVA technique to
determine if there is a significant difference in
the main effects or interaction.
Bluman, Chapter 12
3
Introduction




The F test, used to compare two variances,
can also be used to compare three of more
means.
This technique is called analysis of variance
or ANOVA.
For three groups, the F test can only show
whether or not a difference exists among the
three means, not where the difference lies.
Other statistical tests, Scheffé test and the
Tukey test, are used to find where the
difference exists.
Bluman, Chapter 12
4
12-1 One-Way Analysis of Variance
When an F test is used to test a
hypothesis concerning the means of
three or more populations, the technique
is called analysis of variance
(commonly abbreviated as ANOVA).
 Although the t test is commonly used to
compare two means, it should not be
used to compare three or more.

Bluman, Chapter 12
5
Assumptions for the F Test
The following assumptions apply when
using the F test to compare three or more
means.
1. The populations from which the samples
were obtained must be normally or
approximately normally distributed.
2. The samples must be independent of each
other.
3. The variances of the populations must be
equal.
Bluman, Chapter 12
6
The F Test
In the F test, two different estimates of
the population variance are made.
 The first estimate is called the betweengroup variance, and it involves finding
the variance of the means.
 The second estimate, the within-group
variance, is made by computing the
variance using all the data and is not
affected by differences in the means.

Bluman, Chapter 12
7
The F Test
If there is no difference in the means, the
between-group variance will be
approximately equal to the within-group
variance, and the F test value will be
close to 1—do not reject null hypothesis.
 However, when the means differ
significantly, the between-group variance
will be much larger than the within-group
variance; the F test will be significantly
greater than 1—reject null hypothesis.

Bluman, Chapter 12
8
Chapter 12
Analysis of Variance
Section 12-1
Example 12-1
Page #630
Bluman, Chapter 12
9
Example 12-1: Lowering Blood Pressure
A researcher wishes to try three different techniques to
lower the blood pressure of individuals diagnosed with
high blood pressure. The subjects are randomly assigned
to three groups; the first group takes medication, the
second group exercises, and the third group follows a
special diet. After four weeks, the reduction in each
person’s blood pressure is recorded. At α = 0.05, test the
claim that there is no difference among the means.
Bluman, Chapter 12
10
Example 12-1: Lowering Blood Pressure
Step 1: State the hypotheses and identify the claim.
H0: μ1 = μ2 = μ3 (claim)
H1: At least one mean is different from the others.
Bluman, Chapter 12
11
Example 12-1: Lowering Blood Pressure
Step 2: Find the critical value.
Since k = 3, N = 15, and α = 0.05,
d.f.N. = k – 1 = 3 – 1 = 2
d.f.D. = N – k = 15 – 3 = 12
The critical value is 3.89, obtained from Table H.
Bluman, Chapter 12
12
Example 12-1: Lowering Blood Pressure
Step 3: Compute the test value.
a. Find the mean and variance of each sample
(these were provided with the data).
b. Find the grand mean, the mean of all
values in the samples.
X GM
X


N

10  12  9 
15
4

116
 7.73
15
2
c. Find the between-group variance, sB .
2
ni  X i  X GM 

2
sB 
k 1
Bluman, Chapter 12
13
Example 12-1: Lowering Blood Pressure
Step 3: Compute the test value. (continued)
c. Find the between-group variance, sB2 .
2
2
2
5
11.8

7.73

5
3.8

7.73

5
7.6

7.73






sB2 
3 1
160.13

 80.07
2
2
d. Find the within-group variance, sW .
2
n

1
s


 i
i
sB2 
  ni  1
4  5.7   4 10.2   4 10.3 104.80


 8.73
444
12
Bluman, Chapter 12
14
Example 12-1: Lowering Blood Pressure
Step 3: Compute the test value. (continued)
e. Compute the F value.
sB2
80.07
F 2 
 9.17
8.73
sW
Step 4: Make the decision.
Reject the null hypothesis, since 9.17 > 3.89.
Step 5: Summarize the results.
There is enough evidence to reject the claim and
conclude that at least one mean is different from
the others.
Bluman, Chapter 12
15
ANOVA




The between-group variance is sometimes
called the mean square, MSB.
The numerator of the formula to compute MSB
is called the sum of squares between
groups, SSB.
The within-group variance is sometimes called
the mean square, MSW.
The numerator of the formula to compute MSW
is called the sum of squares within groups,
SSW.
Bluman, Chapter 12
16
ANOVA Summary Table
Source
Sum of
Squares
d.f.
Mean
Squares
Between
SSB
k–1
MSB
Within (error)
SSW
N–k
MSW
F
MSB
MSW
Total
Bluman, Chapter 12
17
ANOVA Summary Table for
Example 12-1
Source
Sum of
Squares
d.f.
Mean
Squares
F
Between
160.13
2
80.07
9.17
Within (error)
104.80
12
8.73
Total
264.93
14
Bluman, Chapter 12
18
Chapter 12
Analysis of Variance
Section 12-1
Example 12-2
Page #632
Bluman, Chapter 12
19
Example 12-2: Toll Road Employees
A state employee wishes to see if there is a significant
difference in the number of employees at the interchanges
of three state toll roads. The data are shown. At α = 0.05,
can it be concluded that there is a significant difference in
the average number of employees at each interchange?
Bluman, Chapter 12
20
Example 12-2: Toll Road Employees
Step 1: State the hypotheses and identify the claim.
H0: μ1 = μ2 = μ3
H1: At least one mean is different from the others
(claim).
Bluman, Chapter 12
21
Example 12-2: Toll Road Employees
Step 2: Find the critical value.
Since k = 3, N = 18, and α = 0.05,
d.f.N. = 2, d.f.D. = 15
The critical value is 3.68, obtained from Table H.
Bluman, Chapter 12
22
Example 12-2: Toll Road Employees
Step 3: Compute the test value.
a. Find the mean and variance of each sample
(these were provided with the data).
b. Find the grand mean, the mean of all
values in the samples.
X GM
X


N

7  14  32 
15
 11

152
 8.4
18
2
c. Find the between-group variance, sB .
2
ni  X i  X GM 

2
sB 
k 1
Bluman, Chapter 12
23
Example 12-2: Toll Road Employees
Step 3: Compute the test value. (continued)
c. Find the between-group variance, sW2 .
2
2
2
6
15.5

8.4

6
4

8.4

6
5.8

8.4






sB2 
3 1
459.18

 229.59
2
d. Find the within-group variance, sW2 .
2
n

1
s


 i
i
sB2 
  ni  1
5  81.9   5  25.6   5  29.0  682.5


 45.5
444
15
Bluman, Chapter 12
24
Example 12-2: Toll Road Employees
Step 3: Compute the test value. (continued)
e. Compute the F value.
sB2
229.59
F 2 
 5.05
45.5
sW
Step 4: Make the decision.
Reject the null hypothesis, since 5.05 > 3.68.
Step 5: Summarize the results.
There is enough evidence to support the claim
that there is a difference among the means.
Bluman, Chapter 12
25
ANOVA Summary Table for
Example 12-2
Source
Sum of
Squares
d.f.
Mean
Squares
F
Between
459.18
2
229.59
5.05
Within (error)
682.5
15
45.5
Total
1141.68
17
Bluman, Chapter 12
26
12-2 The Scheffé Test and the
Tukey Test
When the null hypothesis is rejected
using the F test, the researcher may
want to know where the difference
among the means is.
 The Scheffé test and the Tukey test
are procedures to determine where the
significant differences in the means lie
after the ANOVA procedure has been
performed.

Bluman, Chapter 12
27
The Scheffé Test
In order to conduct the Scheffé test,
one must compare the means two at a
time, using all possible combinations of
means.
 For example, if there are three means,
the following comparisons must be
done:

X1 versus X 2
X1 versus X 3
Bluman, Chapter 12
X 2 versus X 3
28
Formula for the Scheffé Test
FS 
X
i
Xj
2
sW2 1 ni   1 n j 
where X i and X j are the means of the
samples being compared, ni and n j are
the respective sample sizes, and the
2
within-group variance is sW .
Bluman, Chapter 12
29
F Value for the Scheffé Test

To find the critical value F for the
Scheffé test, multiply the critical value
for the F test by k  1:
F    k 1 C.V.

There is a significant difference
between the two means being
compared when Fs is greater than F.
Bluman, Chapter 12
30
Chapter 12
Analysis of Variance
Section 12-2
Example 12-3
Page #641
Bluman, Chapter 12
31
Example 12-3: Lowering Blood Pressure
Using the Scheffé test, test each pair of means in
Example 12–1 to see whether a specific difference exists,
at α = 0.05.
a. For X 1 versus X 2 ,
FS 
X
1  X2 
11.8  3.8 


 18.33
2
sW 1 n1   1 n2   8.73 1 5   1 5  
2
2
b. For X 2 versus X 3 ,
FS 
 X2  X3 
2
s 1 n2   1 n3  
2
W

 3.8  7.6 
2
8.73 1 5   1 5  
Bluman, Chapter 12
 4.14
32
Example 12-3: Lowering Blood Pressure
Using the Scheffé test, test each pair of means in
Example 12–1 to see whether a specific difference exists,
at α = 0.05.
c. For X 1 versus X 3 ,
FS 
 X1  X 3 
11.8  7.6 


 5.05
2
sW 1 n1   1 n3   8.73 1 5   1 5  
2
2
Bluman, Chapter 12
33
Example 12-3: Lowering Blood Pressure
The critical value for the ANOVA for Example 12–1 was
F = 3.89, found by using Table H with α = 0.05, d.f.N. =
2, and d.f.D. = 12.
F  3.89
In this case, it is multiplied by k – 1 as shown.
FS   k 1 C.V.   23.89  7.78
Since only the F test value for part a ( X1 versus X 2 )
is greater than the critical value, 7.78, the only
significant difference is between X1 and X 2 , that is,
between medication and exercise.
Bluman, Chapter 12
34
An Additional Note
On occasion, when the F test value is greater than the
critical value, the Scheffé test may not show any
significant differences in the pairs of means. This result
occurs because the difference may actually lie in the
average of two or more means when compared with
the other mean. The Scheffé test can be used to make
these types of comparisons, but the technique is
beyond the scope of this book.
Bluman, Chapter 12
35
The Tukey Test
The Tukey test can also be used after
the analysis of variance has been
completed to make pairwise
comparisons between means when the
groups have the same sample size.
 The symbol for the test value in the
Tukey test is q.

Bluman, Chapter 12
36
Formula for the Tukey Test
q
Xi  X j
2
W
s
n
where X i and X j are the means of the
samples being compared, n is the size of
the sample, and the within-group variance
is sW2 .
Bluman, Chapter 12
37
Chapter 12
Analysis of Variance
Section 12-2
Example 12-4
Page #642
Bluman, Chapter 12
38
Example 12-4: Lowering Blood Pressure
Using the Tukey test, test each pair of means in Example
12–1 to see whether a specific difference exists, at
α = 0.05.
a. For X 1 versus X 2 ,
q
X1  X 2
sW2
11.8  3.8

 6.06
8.73 5
n
b. For X 1 versus X 3 ,
q
11.8  7.6

 3.18
8.73 5
n
X1  X 3
sW2
Bluman, Chapter 12
39
Example 12-3: Lowering Blood Pressure
Using the Tukey test, test each pair of means in Example
12–1 to see whether a specific difference exists, at
α = 0.05.
c. For X 2 versus X 3 ,
q
3.8  7.6

 2.88
8.73 5
n
X2  X3
sW2
Bluman, Chapter 12
40
Example 12-3: Lowering Blood Pressure
To find the critical value for the Tukey test, use Table N.
The number of means k is found in the row at the top, and
the degrees of freedom for are found in the left column
(denoted by v). Since k = 3, d.f. = 12, and α = 0.05, the
critical value is 3.77.
Bluman, Chapter 12
41
Example 12-3: Lowering Blood Pressure
Hence, the only q value that is greater in absolute value
than the critical value is the one for the difference
between X1 and X 2 . The conclusion, then, is that there
is a significant difference in means for medication and
exercise.
These results agree with the Scheffé analysis.
Bluman, Chapter 12
42
12-3 Two-Way Analysis of Variance
In doing a study that involves a twoway analysis of variance, the
researcher is able to test the effects of
two independent variables or factors on
one dependent variable.
 In addition, the interaction effect of the
two variables can be tested.

Bluman, Chapter 12
43
Two-Way Analysis of Variance
Variables or factors are changed
between two levels (i.e., two different
treatments).
 The groups for a two-way ANOVA are
sometimes called treatment groups.
 A two-way ANOVA has several null
hypotheses. There is one for each
independent variable and one for the
interaction.

Bluman, Chapter 12
44
Two-Way ANOVA Summary Table
Source
Sum of
Squares
d.f.
Mean
Squares
F
A
B
AXB
Within (error)
SSA
SSB
SSAXB
SSW
a–1
b–1
(a – 1)(b – 1)
ab(n – 1)
MSA
MSB
MSAXB
MSW
FA
FB
FAXB
Total
Bluman, Chapter 12
45
Assumptions for Two-Way ANOVA
1. The populations from which the samples
were obtained must be normally or
approximately normally distributed.
2. The samples must be independent.
3. The variances of the populations from
which the samples were selected must
be equal.
4. The groups must be equal in sample
size.
Bluman, Chapter 12
46
Chapter 12
Analysis of Variance
Section 12-3
Example 12-5
Page #648
Bluman, Chapter 12
47
Example 12-5: Gasoline Consumption
A researcher wishes to see whether the type of gasoline
used and the type of automobile driven have any effect on
gasoline consumption. Two types of gasoline, regular and
high-octane, will be used, and two types of automobiles,
two-wheel- and four-wheel-drive, will be used in each
group. There will be two automobiles in each group, for a
total of eight automobiles used. Use a two-way analysis of
variance at α = 0.05.
Bluman, Chapter 12
48
Example 12-5: Gasoline Consumption
Step 1: State the hypotheses.
The hypotheses for the interaction are these:
H0: There is no interaction effect between type of
gasoline used and type of automobile a person
drives on gasoline consumption.
H1: There is an interaction effect between type of
gasoline used and type of automobile a person
drives on gasoline consumption.
Bluman, Chapter 12
49
Example 12-5: Gasoline Consumption
Step 1: State the hypotheses.
The hypotheses for the gasoline types are
H0: There is no difference between the means of
gasoline consumption for two types of
gasoline.
H1: There is a difference between the means of
gasoline consumption for two types of
gasoline.
Bluman, Chapter 12
50
Example 12-5: Gasoline Consumption
Step 1: State the hypotheses.
The hypotheses for the types of automobile driven are
H0: There is no difference between the means of
gasoline consumption for two-wheel-drive and
four-wheel-drive automobiles.
H1: There is a difference between the means of
gasoline consumption for two-wheel-drive and
four-wheel-drive automobiles.
Bluman, Chapter 12
51
Example 12-5: Gasoline Consumption
Step 2: Find the critical value for each.
Since α = 0.05, d.f.N. = 1, and d.f.D. = 4 for each
of the factors, the critical values are the same,
obtained from Table H as
C.V.  7.71
Step 3: Find the test values.
Since the computation is quite lengthy, we will
use the summary table information obtained
using statistics software such as Minitab.
Bluman, Chapter 12
52
Example 12-5: Gasoline Consumption
Two-Way ANOVA Summary Table
Source
Sum of
Squares
d.f.
Gasoline A
Automobile B
Interaction A X B
Within (error)
3.920
9.680
54.080
3.300
1
1
1
4
Total
70.890
7
Bluman, Chapter 12
Mean
Squares
3.920
9.680
54.080
0.825
F
4.752
11.733
65.552
53
Example 12-1: Lowering Blood Pressure
Step 4: Make the decision.
Since FB = 11.733 and FAXB = 65.552 are greater
than the critical value 7.71, the null hypotheses
concerning the type of automobile driven and the
interaction effect should be rejected.
Step 5: Summarize the results.
Since the null hypothesis for the interaction effect
was rejected, it can be concluded that the
combination of type of gasoline and type of
automobile does affect gasoline consumption.
Bluman, Chapter 12
54