You are on page 1of 11

BACS 2213

Chapter 9 : ANOVA

CHAPTER 10 :
ANALYSIS OF VARIANCE ( ANOVA )
OBJECTIVES
To use the one-way ANOVA technique to determine if there is a significant difference
among three or more means.
To determine the difference among means when Ho in ANOVA is rejected.

10.0 Analysis of Variance (ANOVA)


When F test is used to test a hypothesis concerning the means of three or more
populations, the technique is called analysis of variance (ANOVA).

10.1 One Way ANOVA


With the F test, two different estimates of the population variance are made.
i)
The first estimate is called the between-group variance, and it involves
finding the variance of the means.
ii)
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.
For a test of the difference among three or more means, the following hypotheses
should be used:
H0: 1 = 2 = = k
H1: At least two of the means are not equal
Steps to conduct test of the difference among three or more means:
Step 1 : State the hypothesis and identify the claim.
Step 2 : Find the critical value.
Step 3 : Compute the F test value.
Step 4 : Make the Decision.
Step 5 : Summarize the results.
Procedure for finding the F test value for the Analysis of Variance:
Step 1 : Find the mean and variance of each sample

x ,s
1

2
1

) ,(

x
x=
n

2
2

) ,(

s2
,

x
=

,
2

n 1

2
3

) ,, (

( x)

n( n 1)

2
k

BACS 2213

Chapter 9 : ANOVA

Step 2 : Find the grand mean

GM

X
N

Step 3 : Find the between-group variance.


MSB = SSB/ k-1 =

k 1

n (X
i

X GM ) 2

k 1

Step 4 : Find the within-group variance.


MSW= SSW/ N-k =

(n 1)s
i

N k

2
i

(n 1)
i

Step 5 : Find the F test value.


F=

MSB
MSW

The degrees of freedom are d.f.N = k-1, and d.f.D = N-k


Where
k is the number of groups
N is the sum of the sample sizes of the groups,
N = n1 + n 2 + n3 + n4 + ..... + n k
ANOVA table for one way classification:
Source of
variation

Sum of
Squares

Degree of
Freedom

Between

SSB

k-1

Within

SSW

N-k

Mean of Squares
SSB
k 1
SSW
MSW =
N-k
MSB =

Total
SSB Sum of Squares between groups
SSW Sum of Squares within groups
** Critical Region : Reject H 0 if
F > F, k 1, N k
(refer to upper critical values of F-distribution)

F test Statistic

F=

MSB
MSW

BACS 2213

Chapter 9 : ANOVA

Example 10.1 :
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 next. At
= 0.05 can it be concluded that there is a significant difference in the average number
of employees at each interchange ?

PA Turnpike
7
14
32
19
10
11

Greensburg Bypass
10
1
1
0
11
1

Valley Express
1
12
1
9
1
11

X 1 =15.5

X 2 =4.0

X 3 =5.8

2
1

=81.9

2
2

=25.6

2
3

=29.0

Step 1 : State the hypothesis and identify the claim.


H0: 1 = 2 = = k
H1: At least two of the means are not equal
Step 2 : Find the critical value. Since k=3, N= 18, and = 0.05 ,
d.f.N = k-1 = 3-1 = 2
d.f.D = N-k = 18-3 = 15
The critical value is 3.68

BACS 2213

Chapter 9 : ANOVA

Step 3 : Compute the test value.


a) Find the mean and variance of each sample.
b) Find the grand mean

GM

7 + 14 + 32 + ........ + 11 152
=
= 8.4
18
18

N
c) Find the between-group variance.
MSB= n i

( X i X GM ) 2
k 1

6(15.5 8.4) 2 + 6(4 8.4)2 + 6(5.8 8.4)2


3 1

=459.18/2 =229.59
d) Find the within-group variance.

MSW =

2
w

s
=
N k

(n 1)s
i

(n 1)

2
i

(6 1)(81.9) + (6 1)(25.6) + (6 1)(29.0)


(6 1) + (6 1) + (6 1)

682.5
= 15 = 45.5
e) Find the F test value.
MSB
229.59
= 5.05
F = MSW
= 45.5
Step 4 : Make the Decision. Since 5.05 >3.68, the decision is to reject the
null Hypothesis.
Step 5 : Summarize the results. There is enough evidence to support the
claim that there is a different among the means.

The ANOVA Summary table for this example is shown below :


Source of
Sum of
Degree of
Mean of
F test Statistic
variation
Squares
Freedom
Squares

(i)

Between

459.18

Within

682.5

Total

1141.68

SSB
= 229.59
2
SSW
= 45.5
15

2
15
17

H 0 : 1 = 2 = 3
H1: At least two of the means are not equal

F=

MSB
=
MSW

5.05

BACS 2213

Chapter 9 : ANOVA

= 0.05
Critical region : Reject H 0 if F > f 0.05,2,15 = 3.68
MSB
Test statistics F =
= 5.05
MSW

(ii)
(iii)
(iv)

Reject H 0

Since F > 3.68 ,


Example 10.2:

In an effort to improve the quality of recording tapes, the effects of four kinds of
coatings A,B,C,D on the reproducing quality of sound are compared. Suppose that the
measurements of sound distortion (given in the table below) are obtained from tapes
treated with four coatings.
A
B
C
D
45
58
54
42
43
56
50
37
51
62
55
49
Does any significant difference exist among the mean distortions obtained using the
four coatings? Use a 0.01 level of significance.
Solution:
A
45
43
51
X 1 =46.33

2
1

B
58
56
62
X 2 =58.67

=17.3

2
2

C
54
50
55
X 3 =36.33

=9.3

2
3

=7.0

Step 1 : State the hypothesis and identify the claim.


H0: 1 = 2 = = k
H1: At least two of the means are not equal
Step 2 : Find the critical value. Since k=4, N= 12, and = 0.01 ,
d.f.N = k-1 = 4-1 = 3
d.f.D = N-k = 12-4 = 8
The critical value is 7.59
Step 3 : Compute the test value.
c) Find the mean and variance of each sample.
d) Find the grand mean

GM

= 602 / 12 = 50.17

N
c) Find the between-group variance.

D
42
37
49
X 3 =42.67
s42 =36.3

BACS 2213

Chapter 9 : ANOVA

MSB=

n (X
i

X GM ) 2

3(14 .75 ) + 3(72 .25 ) + 3(191 .55 ) + 3(56 .25 )


4 1

k 1
= 453.67/3 = 151.22
d) Find the within-group variance.
MSW =

2
w

s
N k

(n 1)s
i

2
i

(n 1)
i

(3 1)(17 .3) + (3 1)( 9.3) + (3 1)( 7.0) + (3 1)( 36 .3)


(3 1) + (3 1) + (3 1) + (3 1)
139 .8
=17 .5
=
8

e) Find the F test value.


MSB
151 .22
= 8.64
F=
=
17 .5
MSW
Step 4 : Make the Decision. Since 8.64 >7.59, the decision is to reject the null
Hypothesis.
Step 5 : Summarize the results. We can conclude that there is a significant difference in
treatment effects.

The ANOVA Summary table for this example is shown below :


Source of
Sum of
Degree of
Mean of
F test Statistic
variation
Squares
Freedom
Squares
Between

453.67

Within

139.8

Total

1148.18

11

(v)

(vi)
(vii)
(viii)

(ix)

SSB
=151 .22
3
SSW
=17 .5
8

H 0 : 1 = 2 = 3
H1: At least two of the means are not equal
= 0.05
Critical region : Reject H 0 if F > f 0.01,3,8 = 7.59
MSB
Test statistics F =
= 8.64
MSW
Since F > 7.59 ,

Reject H 0

F=

MSB
=
MSW

8.64

BACS 2213

Chapter 9 : ANOVA

Example 10.3:
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 persons blood
pressure is recorded. At = 0.05, test the claim that there is no difference among the
means.
Medication
Exercise
Diet
10
6
5
12
8
9
9
3
12
15
0
8
13
2
4
X 1 =11.8
X 2 =3.8
X 3 =7.6

2
1

=5.7

2
2

=10.2

2
3

=10.3

Step 1 : State the hypothesis and identify the claim.


H0: 1 = 2 = 3
H1: At least one mean is different from the others
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
Step 3 : Compute the test value.
a) Find the mean and variance of each sample.
X 1 =11.8
X 2 =3.8

=5.7
b) Find the grand mean
1

GM

2
2

=10.2

116
= 7.73
15

N
c) Find the between-group variance.
MSB= n i

( X i X GM ) 2 160 .13
=
=80.07
2
k 1
d) Find the within-group variance.

X 3 =7.6

2
3

=10.3

BACS 2213

Chapter 9 : ANOVA

MSW =

2
W

(n 1)s
i

2
i

(n 1)
i

104 .80
= 8.73
12

e) Find the F test value.


MSB
80 .07
= 9.17
F=
=
8.73
MSW
Step 4 : Make the Decision. Since 9.17 >3.89, the decision is to reject the null
Hypothesis.
Step 5 : Summarize the results. There is enough evidence to support the claim that there
is a different among the means.
The ANOVA Summary table for this example is shown below :
Source of
Sum of
Degree of
Mean of Squares
variation
Squares
Freedom
SSB
= 80.07
Between
160.13
2
2
12
SSW
= 8.73
Within
104.80
12
Total
264.93
14
H 0 : 1 = 2 = 3
(x)
H1: At least two of the means are not equal
= 0.05
(xi)
(xii)
Critical region : Reject H 0 if F > f 0.05,2,12 = 3.89
(xiii)

Test statistics

Since F > 3.89 ,

F=

MSB
= 9.17
MSW

Reject H 0

Exercises

F test Statistic

F=

MSB
= 9.17
MSW

BACS 2213

1.

Chapter 9 : ANOVA

Six different machines are being considered for use in manufacturing rubber seals
the machines are being compared with respect to tensile strength of the product. A
random sample of 4 seals from each machine is used to determine whether the mean
tensile strength varies from machine to machine. The following are the tensilestrength measurements in kilograms per square centimeter 10-1.
Machine
1
2
3
4
5
6
17.5
16.4
20.3
14.6
17.5
18.3
16.9
19.2
15.7
16.7
19.2
16.2
15.8
17.7
17.8
20.8
16.5
17.5
18.6
15.4
18.9
18.9
20.5
20.1
Perform the analysis of variance at the 0.05 level of significance and indicate
whether or not the mean tensile strengths differ significantly for the 6 machines.

2.

The data in the following table represent the number of hours of relief provided by 5
different brands of headache tablets administrated to 25 subjects of variance fever of
38C or more. Perform the analysis of variance and test the hypothesis at the level
of 0.05 level of significance that the mean number of hours if relief provided by the
tablets is the same for all 5 brands. Discuss the results.
Tablet
A
B
C
D
E
5.2
9.1
3.2
2.4
7.1
4.7
7.1
5.8
3.4
6.6
8.1
8.2
2.2
4.1
9.3
6.2
6.0
3.1
1.0
4.2
3.0
9.1
7.2
4.0
7.6

3.

Immobilization of free-ranging white-tailed deer by drugs allows researchers the


opportunity to closely examine deer and gather valuable physiological information.
In the study Influence of Physical Restraint and Restraint-Facilitating Drugs on
Blood Measurements of White-Tailed Deer and Other Selected Mammals conducted
at the Virginia Polytechnic Institute and State University, wildlife biologists tested
the "knockdown" time (time from injection to immobilization) of three different
immobilizing drugs. Immobilization, in this case, is defined as the point to remain
standing thirty male white-tailed deer were randomly assigned to each of three
treatments. Group A received 5 mg of liquid succinylcholine chloride (SCC); group
B received 8 mg of powdered SCC; and group C received 200 mg of phencyclidine
hydrochloride. Knockdown times, in minutes, were recorded as follows:
Group

BACS 2213

Chapter 9 : ANOVA

A
B
C
11
10
4
5
7
4
14
16
6
7
7
3
10
7
5
7
5
6
23
10
8
4
10
3
11
6
7
11
12
3
Perform an analysis of variance at the 0.01 level of significance and determine
whether or not the average knockdown time for the 3 drugs is the same.
Solution for the Exercises
Solution 1:

H 0 : 1 = 2 = 3 = 4 = 5 = 6

H 1 : at least two of the means are not equal


= 0.05
Critical region: f > 2.77 with v1 = 5 and v 2 = 18 dof.

Source of
Sum of
Degree of
Mean of
Variation
Squares
Freedom
Squares
Between
5.34
5
1.07
Within
62.64
18
3.48
Total
67.98
23
F<2.77
Decision: The treatment means do not differ significantly.

F-Test
Statistics
F=0.31

Solution 2:

H 0 : 1 = 2 = 3 = 4 = 5

H 1 : at least two of the means are not equal


= 0.05
Critical region: f > 2.87 with v1 = 4 and v 2 = 20 dof.

Source of
Sum of
Degree of
Mean of
Variation
Squares
Freedom
Squares
Between
79.440
4
19.86
Within
57.600
20
2.880
Total
137.040
24
F>2.87
Decision: Reject H 0 . The mean number of hours of relief differ.

10

F-Test
Statistics
F=6.90

BACS 2213

Chapter 9 : ANOVA

Solution 3:

H 0 : A = B = C

H 1 : at least two of the means are not equal


= 0.01
Critical region: f > 5.49 with v1 = 2 and v 2 = 27 dof.

Source of
Sum of
Degree of
Mean of
Variation
Squares
Freedom
Squares
Between
158.8667
2
79.4334
Within
393.0000
27
14.5556
Total
551.8667
29
F<5.49
Decision: The average knockdown time did not differ significantly.

11

F-Test
Statistics
F=5.46

You might also like