Vous êtes sur la page 1sur 36

Analysis of Variance

By
R. K. Pandey
Mathematics Group,
BITS-Pilani, Goa Campus.
We are interested to comparing the mean of
a populations.
Our interest is in testing the null hypothesis
that the population means are equal.
Ex: In an agricultural experiment four different
chemical treatments of soil produced mean
wheat yields :
a
a
H
vs
H



= = =
... :
... :
2 1 1
2 1 0
Treatment 1 5 bushels/acre
Treatment 2 7 bushels/acre
Treatment 3 6 bushels/acre
Treatment 4 8 bushels/acre
Mean wheat
x
Is there any significant
difference in means ?
or
Are the obtained means due
to chance only ?
Definition of ANOVA
Definition: Analysis of the variance is the
simultaneous testing of two or more treatment
means by examinations of the variances within
groups (treatments). The t-test can test the
difference between two means of two groups,
but not more than two. Even though the
ANOVA is an analysis of variances among
data, its primary use is the test of differences
among the group means.
ANALYSIS OF VARIANCE
1. One way classification
or one factor experiments
2. Two way classification
or two factor experiments
One-Way Classification
(Fixed-Effect)
The term one way classification refers to
the fact that only one factor is being
studied in the experiment.
The term fixed effect refers to the fact
that the treatments of the factor involved
are specifically selected by experimenter
because they are of particular interest.
1. One way classification
...
Treatment a
Treatment 2
Treatment 1
b
x x x
1 12 11
..... ..........
b
x x x
2 22 21
..... ..........
ab a a
x x x ..... ..........
2 1
. 1
x
. 2
x
. a
x
a j x
b
x
b
k
jk j
......., , 2 , 1 ,
1
1
.
= =

=

=
= =
= =
k j
jk
a
j
b
k
jk
x
ab
a j x
ab
x
,
1 1
1
......., , 2 , 1 ,
1
( )
( )
( )

=
=
+ =
=
j
j B
k j
j jk W
B W
k j
jk
x x b V
x x V
V V
x x V
2
,
2
2
,
.
.
where

Total Variation
Problem 1.
Table below shows the yields in bushels
per acre of a certain variety of wheat
grown in a particular type of soil treated
with chemicals A, B or C.
49 51 50 50 C
47 49 48 48 B
48 49 50 49 A
Find the following by using the long method:
a) The mean yield for different treatments
b) The grand mean for all treatments
c) The total variation
d) The variation between treatments
e) The variation within treatments
Shortcut method for obtaining variation

= =
=
=
=
k
jk j
k j
jk
B W
j
j B
k j
jk
x T x T
V V V
ab
T
T
b
V
ab
T
x V
.
.
,
1
,
2
2
2
,
2
Mathematical Model for ANOVA
(One way classification)
The will differ from the population
mean for the jth treatment by a
random error . These are
assumed to be normally
distributed (0 , ).
k j j k j
x + =
k j
x
j

jk

= + + =
j j k j j k j
if x ,
If is the population mean for all the treatments,
where, and follows N(0, ).
Then, we conclude that can be considered as
normally distributed.

0 =

j
j

jk

jk
x
Expected value of the variations
1) ( ) ( )
( )
[ ]
( ) 1

where

1
1
2
2 2
2
2

=
=
=

=
b a
V
S
S E
b a
V
E
b a V E
W
W
W
W
W

2) (i) If is not true,


(ii) If is true
( ) ( )
( )
( )
1

where
1

1
2
2 2 2
2 2

+ =
+ =

a
V
S
a
b
S E
b a V E
B
B
j
j B
j
j B


0
H
0
H
( )
2 2

=
B
S E
3) (i) If is not true,
(ii) If is true
( ) ( )
( )
( )
1

where
1

1
2
2 2 2
2 2

+ =
+ =

ab
V
S
ab
b
S E
b ab V E
j
j
j
j


0
H
0
H
( )
2 2

= S E
Problem 2.
Referring to problem 1., find an unbiased
estimate of the population variance from
a) The variation between treatments under the
null hypothesis of equal treatment means,
b) The variation within treatments.
Distributions of the variations
Theorem 1. is chi square distributed with
degrees of freedom
Theorem 2. Under the null hypothesis ,
and are chi square
distributed with (a-1) and (ab-1)
degrees of freedom, respectively.
2
/
W
V
( ) 1 b a
0
H
2
/
B
V
2
/ V
F-test for the null hypothesis
of equal means
Theorem 3. The statistic has the F-
distribution with and degrees of
freedom.
If is greater or equal to the F value
(table), then reject otherwise we accept
1 a
2 2

/

W B
S S F =
( ) 1 b a
2 2

/

W B
S S
0
H
ab-1 Total
a(b-1) Within treatments
With a-1
and a(b-1)
degrees of
freeedom
a-1 Between Treatments
F-value Mean square Degree of
freedom
Variations
2
.
) (

=
j
j B
X X b V
B W
V V V =
W B
V V V + =
1

=
a
V
S
B
B
) 1 (

=
b a
V
S
W
W
2
2

W
B
S
S
Problem 3.
In Problem 1, test the null hypothesis of equal
means at significant level
(a) 0.01 (b) 0.05
Given that: The table value
F
(2,9)
= 4.26 at 5% level of significance.
F
(2,9)
= 8.02 at 1% level of significance.
11 Total
9 Within treatments
With 2 and
9 degrees
of
freeedom
2 Between Treatments
F-value Mean square Degree of
freedom
Variations
8 ) (
2
.
= =

j
j B
X X b V
6 = =
B W
V V V
14 = + =
W B
V V V
4
1

2
=

=
a
V
S
B
B
3
2
) 1 (

2
=

=
b a
V
S
W
W
6

2
2
=
W
B
S
S
Problem 4
The three samples below have been obtained from the
normal population with the equal variances. Test the
hypothesis that the sample means are equal at 5%
level of significance? The table value of F
(2 ,12)
= 3.89
at 5% level of significance.
A
B
C
14 12 13 9 12
9 9 10 5 7
11 14 7 10 8
15-1=14 Total
3(5-1)= 12 Within treatments
With 2 and
12
degrees of
freeedom
3-1=2 Between Treatments
F-value Mean square Degree of
freedom
Variations
40 ) (
2
.
= =

j
j B
X X b V
60 = =
B W
V V V
100 = + =
W B
V V V
20
1

2
=

=
a
V
S
B
B
5
) 1 (

2
=

=
b a
V
S
W
W
4

2
2
=
W
B
S
S
Conclusion:
F
cal
= 4 and
F
tab
= 3.89
Here F
cal
is not less than F
tab
.
The null hypothesis is rejected. Hence there is
a significant difference in sample means.
Modification for unequal no. of
observations
In this case the treatments 1,2a have
different no. of observations equal to
respectively.
Here,
1
N
... ,
2
N
a
N
a
N N N N N + + + + = ...
3 2 1
1.One way classification
(Unequal no. of observations)
...
Treatment a
Treatment 2
Treatment 1
1
1 12 11
..... ..........
N
x x x
2
2 22 21
..... ..........
N
x x x
a
aN a a
x x x ..... ..........
2 1
. 1
x
. 2
x
. a
x
Variation Formula
( )
( ) ( )



= =
=

=
= =
+ + + =

= =
k
jk j
k j
jk
B W
j
j
j
j
j j
k j
j B
a
k j
jk
k j
jk
x T x T
V V V
N
T
N
T
x x N x x V
N N
N
T
x x x V
.
,
2
2
.
2
.
,
2
.
2 1
,
2
2
2
,
... N N where

ANOVA Table for unequal no. of observations
N-1 Total
N-a Within treatments
With a-1
and N-a
degrees of
freeedom
a-1 Between Treatments
F-value Mean square Degree of
freedom
Variations
2
.
) (

=
j
j j B
X X N V
B W
V V V =
W B
V V V + =
1

=
a
V
S
B
B
a N
V
S
W
W

=
2

2
2

W
B
S
S
Problem 5
The table shows the lifetimes in hours of samples from three
different types of television tubes manufactured by a company.
Determine whether there is a difference between the three
types at significant level of (a) 0.01 and (b) 0.05
410 408 406 408 sample 3
404 406 408 405 402 sample 2
407 411 409 sample 1
Solution:
( )
2
,

=
k j
jk
x x V
Problem 6
The table shows the thread life in thousands of
miles of 4 brands of tyres. Test the hypothesis of
equality of means at 5% level of significance.
38 29 25
31 30 29 28
40 28 27
35 20 22 28 30 32
A
B
C
D
Thread life in thousands of miles Brand
Conclusion:
F
cal
= .38
At 5% level of significance-
F
tab (3, 12)
= 3.49
Here, F
cal
< F
tab . .
Hence, we accept the null hypothesis. It
means that there is no difference among
the various brand in thread life length.
Two way classifications
In a one-factor analysis of variance
explained above the treatments constitute
different levels of a single factor which is
controlled in the experiment.
There are, however, many situations in
which the response variable of interest
may be affected by more than one factor.

Vous aimerez peut-être aussi