You are on page 1of 19

NESTED ANOVA

BY YASHVARDHAN CHAUHAN and


AMIT KUMAR

INTRODUCTION

A nested design is used for experiments in which there is interest in one set of treatment and
the experimental units are measured more than once or are sub sampled.

Nested designs extend one-factor ANOVA to consider two or more factors in a hierarchical structure.
Nested factors cannot be cross factored with each other because each level of one factor exists only in
one level of another. Nested designs allow us to quantify and compare the magnitudes of variation in
the response at different spatial, temporal or organizational scales. They are used particularly for testing
a factor of interest without confounding different scales of variation.

For Example: If 4 dyes are being tested for colour fastness on cotton, each dye might be used
on 2 experimental units.

Other examples of nested designs:

 Three drugs are each used at 2 different clinics (a total of 6 clinics) and are given to 5 patients at
each clinic.
 Ten roosters are each mated to 5 different hens, and a random sample of 6 chicks from each
hen is examined for a certain genetic characteristic.
 Four fungicides are used on a certain type of tree. Each fungicide is applied to 3 trees, and 10
leaves are examined from each tree.
 Each of 3 methods of teaching geometry is used by 2 teachers (6 teachers are in the
experiment), and a random sample of 10 students of each teacher is tested.

The additive model for these nested designs is

Yijk = µ + Ai + Bj(i) + e(ij)k


where

Yijk is the kth replication under the ith treatment of factor A and the jth treatment of factor B,
µ is the overall mean of the responses,

Ai is the effect of the ith treatment of factor A on the response,

Bj(i) is the effect of the kth replication under the jth trteatment of the nested factor B on
the ith treatment of factor A,

e(ij)k is the effect of the kth replication under the jth treatment of the nested factor B on the
ith treatment of factor A,

a is the number of treatments of factor A,

b is the number of treatmentys of factor B, and

n is the number of replications under each experimental combination(n=4).

Assumptions

Nested designs have no assumptions other than those common to all ANOVA models. Note, however,
that the levels of any random factors are deemed to be drawn from an infinite (or effectively infinite)
population, and that if the factor is used as an error term, its samples of level means are assumed to be
normally distributed with homogeneous variances between samples.

Analysis

The nested designs below all have the nested factor being measured at the same number of levels in
each level of the higher-order factor. Imbalance in nested designs results in inexact F tests for all but the
last term in the model. Consider using Satterthwaite’s approximation (Sokal and Rohlf 1995), or deleting
data points at random to reinstate balance

Two Factor Nested Design


Consider the generalised data format of two factor complete factorial experiment with four
replications under each experimental combination as shown in Table 1. The number of levels
of factor A is 3 and that of factor B is 3.

In Table 6.1, treatment 1 of factor B is common for all the treatments of factor A. Like this,
the each of the other treatments of the factor B is common to all the treatments of factor A.

But in reality there may be a situation in which treatment 1 of factor B under treatment of
factor A will be different from treatment 1 of factor B under treatment 2 of factor A, which
means the treatment 1 of factor B is not the same under all the treatments of factor A. Same
in the case of for all the tratments of factor B. As per this reality, the data format of the
complete factorial experiments showm in Table 1 is modified and shown in hierarchy. This
arrangement is called Nested Design, which means that the treatments of factor B under
treatment 2 of factor A are nested within it and treatments of factor B under treatment 3 of
factor A are nested within it.

Table 1: Generalized data format of two factor Nested Design, which

Factor A

YYY
YYY
YYY
YYY
YYY
YYY
YYY
YYY
Table 1 : Nested hierarchy of two - stage experiment

2
1 Factor A
3

Factor B Factor B Factor B

1 Y111 Y121 Y131 Y211 Y221 Y231 Y311 Y321 Y331

2 Y112 Y122 Y132 Y212 Y222 Y232 Y312 Y322 Y332

3 Y113 Y123 Y133 Y213 Y223 Y233 Y313 Y323 Y333

4 Y114 Y124 Y134 Y214 Y224 Y234 Y314 Y324 Y334

The model of this nested model is :

Yijk = µ + Ai + Bj(i) + e(ij)k


where

Yijk is the kth replication under the jth treatment of nested factor B and the ith treatment
of factor A,

µ is the overall mean of the responses,

Ai is the effect of the ith treatment of factor A on the response,

Bj(i) is the effect of the kth replication under the jth trteatment of the nested factor B on
the ith treatment of factor A,

e(ij)k is the effect of the kth replication under the jth treatment of the nested factor B on the
ith treatment of factor A,

a is the number of treatments of factor A,

b is the number of treatmentys of factor B, and

n is the number of replications under each experimental combination.

Total Sum of squares = Sum of squares of treatments of factor A + Sum of squares of nested
factor B + Sum of squares of error

SStotal = SSA + SSB(A) + SSerror

The degree of freedom of factor A is (a-1).

The degree of freedom of the nested factor B is a(b-1).

The degree of freedom of the error is ab(n-1).

The degree of freedom of the total is abn-1.

The shortcut formulas for the sum of squares of this model are given by

a b n
Y 2…
SStotal = ∑ ∑ ∑Y 2
ijk --
i=1 j=1 k=1 abn

1 a 2 Y 2…
SSA = ( )∑ Y i.. --
bn i=1 abcn

1 a b 1
a
SSB(A) = ( )∑ ∑ Y2ij - ( ¿ ∑ Y2i
n i=1 j=1 bn i=1
a b n a b
1
SSerror = ∑ ∑ ∑ Y ijk - ( ¿ ∑ ∑ Y2ij
2

i=1 j=1 k=1 n i=1 j=1

EXAMPLE 1:

Furnace (A)
1 2 3
Heat(B) Heat(B) Heat(B)
1 2 3 1 2 3 1 2 3

1 60 70 50 55 70 48 56 67 72

Observation 2 50 55 45 46 55 70 74 56 59
3 55 60 56 58 62 65 45 48 59

4 65 45 42 68 56 78 80 67 62
Heat total (Yij.) 230 230 193 227 243 261 255 238 251
Furnace total (Yi..) 653 731 744
Y… 2138

SOLUTION:

The model of this model design is:

Yijk = µ + Ai + Bj(i) + e(ij)k


(b) Factor : Furnace A

H0: There is no significant difference between furnaces in terms of the heat preparation time,

H1: There is significant difference between furnaces in terms of the heat preparation time.

Factor: Heat B(A)


H0: There is no significant difference between heats of the nested factor ‘Heat’ in terms of the heat
preparation time.

H1: There is significant difference between heats of the nested factor ‘Heat’ in terms of the heat
preparation time.

For this problem,


3 3 4
Y= ∑ ∑ ∑Y ijk = 2128
i=1 j=1 k=1

3 3 4
Y2
SStotal = ∑ ∑∑ Y2ijk --
i=1 j=1 k=1 36
2 2 2 2 2 2 2 2 2 2
= ( 60 ) + ( 70 ) + ( 50 ) + ( 55 ) +¿ ( 70 ) + ( 48 ) + ( 56 ) + ( 67 ) + ( 72 ) + ……+ ( 65 )

2
2 2 2 2
+ ( 45 ) + ( 42 ) + ( 68 ) + ( 56 ) + ¿ ( 78 ) + ( 80 ) + ( 67 ) + ( 62 ) –
2 2 2 2 ( 2128 )
36
2
= 129200 -
( 2128 )
36

= 3411.56
3 2 2 2 2
Yi ² Yijk ² ( 60 ) + ( 60 ) + ( 2128 ) ( 2128 )
SSA = ∑ - = -
i=1 36 36 36 36

= 403.72

3 3 2 3 2
( Yij ) ( Yi )
SSB(A) = ∑ ∑ -∑
i=1 j=1 4 i=1 12

2 2 2 2 2 2 2 2 2 2 2 2
=
( 230 ) + ( 230 ) + ( 193 ) + ( 227 ) + ( 243 ) + ( 261 ) + ( 255 ) + ( 238 ) + ( 251 ) -
( 653 ) + ( 731 ) + ( 744 )
4 12

= 412.333

SSerror = SStotal – SSA – SSB(A)

= 341.56 – 403.72 – 412.333

= 2595.507

Source of Sum of Degree of Mean sum EMS Fcalculated Ftable at Remarks


variation squares freedom Of squares Formula A =0.05
Between 403.72 2 201.86 2.937 5.14 Accept null
furnace hypothsis,
levels (A) Ho
Between 412.333 6 68.722 0.715 2.46 Accept null
hypothesis,
H0
Error 2595.507 27 965.130
Total 3411.56 35

Infrences

1. There is no significant difference between the different furnaces in terms of the time taken for
the preparation of the heats.
2. There is no significant difference between the treatments of the nested factor, heats in terms of
the time taken for the preparation of the heats.

EXAMPLE 2:

Factor A Yj
1 2 3

60 55 56
50 46 74

1 55 58 45
65 68 80 712
70 70 64
55 55 56

Factor B 2 60 62 48
45 56 67 711
50 48 72
45 70 59

3 56 65 58
42 78 62 705
653 731 744 Y…= 2128
YL

The model of this problem is:

Yijk = u + Ai + Bj + ABij + eijk

Where

Yijkl is the heat preparation time w.r.t kth replication under ith furnace and jth heat,

U is the overall mean of the heat preparation times,

Ai is the effect of the ith furnace on the heat preparation time,

Bj is the effect of the jth heat on the heat preparation time,

ABij is the interaction effect of the ith furnace and jth heat on the heat preparation time,

Eijk is the random error associated with the kth replication under ith furnace and jth heat,

A is the number of treatments of Factor A,

B is the number od treatments of factor B , and

N is the number of replications.


Factor : Furnace A

H0 : There is no significant difference between furnaces in terms of heat preparation time.

H1 : There is significant difference between furnaces in terms of heat preparation time.

Factor : Heat B

H0 : There is no significant difference between heats in terms of heat preparation time.

H1 : There is significant difference between heats in terms of heat preparation time.

Interaction :Fuirnace A × Heat B

Ho : There is no significant difference between different pair of interactions terms of furnace and heat in
terms of heat preparation time.

H1 : There is significant difference between different pair of interactions terms of furnace and heat in
terms of heat preparation time.

3 3 4
Y=∑ ∑ ∑ = 2128
i=1 j=1 k=1

3 3 4
Y ²ijk
SStotal = ∑ ∑ ∑ Y² ijk -
i=1 j=1 k=1 36
3 3 4 3
Yi ² Y ²ijk
=∑ ∑ ∑ Yijk SSA = ∑ 36
-
36
i=1 j=1 k=1 i=1

2 2 2 2 2 2 2 2 2 2
= ( 60 ) + ( 70 ) + ( 50 ) + ( 55 ) +¿ ( 70 ) + ( 48 ) + ( 56 ) + ( 67 ) + ( 72 ) + ……+ ( 65 )

2
2 2 2 2
+ ( 45 ) + ( 42 ) + ( 68 ) + ( 56 ) + ¿ ( 78 ) + ( 80 ) + ( 67 ) + ( 62 )
2 2 2 2

( 2128 )
36
2
= 129200 -
( 2128 )
=
36

= 3411.56
3 2 2 2 2
Y ²i Y ²ijk ( 60 ) + ( 60 ) + ( 2128 ) ( 2128 )
SSA = ∑ - = -
i=1 36 36 36 36

= 403.72
3 2 2 2 2 2 2
( Yij ) ( Yi ) ( 712 ) + ( 711 ) + ( 705 ) ( 2128 )
SSB = ∑ - = -
j=1 12 36 12 36

= 2.3889

Computation of SSsubtotal
3 3
Y ²ijk
SSsubtotal = ∑ ∑ Y 4²ij -
36
i=1 j=1

2
2 2 2
= ( 230 ) + ( 227 )2+ ( 225 )2 + ( 230 )2+ ¿ ( 243 ) + ( 238 ) + ( 193 ) + ( 261 ) + ( 251 )
2 2 2
-
( 2128 )
36

= 816.0556

SSAB = SSsubtotal – SSA – SSB

= 816.0556 – 403.72 – 2.3889

= 409.9467

SSerror = SStotal – SSB – SSAB

= 3411.56 – 403.72 – 2.3889

= 2595.5044\

The results of ANOVA are summarized in Table 2

Source of Sum of Degree of Mean of EMS formula Fcalculated Ftable at α Remarks

variation squares freedom squares =0.05

A 403.72 2 201.86 1.9696 6.94 Accept Ho


B 2.3889 2 1.1945 0.0124 3.35 Accept Ho

AB 409.9867 4 102.4867 σ² + n σ² 1.0661 2.73 Accept Ho

Error 2595.5044 27 96.1298 σ²

Total 3411.56 35

Infrences

1. There is no significant difference between furnaaace in terms of heat preparation time.

2. There is no significant difference between heat in terms of heat preparation time.

3. There is no significant difference between the interaction terms of furnaaace aand heat in terms of heat preparation time.
THREE-STAGE NESTED DESIGN
Consider a reality with three factors, viz. A with a treatment (a = 2), B with b treatments
(b=2) and C with c treatments (c = 2) such that factor B is nested within factor A and
factor C is nested within factor B as shown in Figure 6.2. The number of replications be
k (k = 4). Factor A and factor B are assumed to be fixed. Factor C is random. The model
of this nested design is:

= µ+A +B +C +e
Yijk i j(i) k(ij) (ijk)l

Yijk = µ + Ai + Bj(i) + Ck(ij) + e(ijk)l

i=1, 2,3,...,a

j=1,2,3,..., b

k=1,2,3,...,c

l=1,2,3,..., n

where

Yijk is the Ith replication under the ith treatment of factor A, the jth treatment of factor B,
and kth treatment of factor C,

µ is the overall mean of the responses,

Ai the effect of the ith treatment of factor A on the response,

Bj(i) is the effect of the jth treatment of the nested factor B within the ith treatment of
factor on the response,

Ck(ij) is the effect of the kth treatment of the nested factor C with in jth treatment of the
nested factor Band ith treatment of factor A on the response

e(ijk)l is the error associated with the lth replication under the kth treatment of the nested
factor C within the jth treatment of the nested factor B, which in turn within the ith
treatment of factor A.
a is the number of treatments of factor A,

b is the number of treatments of the nested factor B,

c is the number of treatments of the nested factor C, and

n is the number of replications under each experimental combination.

Factor A

1 2

Factor A Factor B

1 2 1 2

Factor C Factor C Factor C Factor C

1 2 1 2 1 2 1 2

1 Y1111 Y1131 Y1211 Y1221 Y2111 Y2121 Y2211 Y2221

2 Y1112 Y1122 Y11212 Y1222 Y2112 Y2122 Y2212 Y2222

Y1113 Y1123 Y1213 Y1223 Y2113 Y2123 Y2213 Y2223


3
Y1114 Y1124 Y1214 Y1224 Y2114 Y2124 Y2214 Y2224
4
Fig 1 Nested hierarchy of three – stage experiment
Total sum of squares = Sum of squares of treatment of factor A
+ Sum of squares of nested factor B within factor A
+ Sum of squares of the nested factor C within factor B
+ Sum of squares if error

SStotal = SSA + SSB(A) + SSC(B) + SSerror


The degree of freedom of factor A is (a – 1)
The degree of freedom of the nested factor B is a(b – 1)
The degree of freedom of the nested factor C is ab(c – 1)
The degree of freedom of the error is abc(n – 1)
The degree of freedom of the total is abcn – 1
The shortcut formula for the sum of squares of this model are presented below.

a b n n
2 Y 2…
SStotal = ∑ ∑ ∑ ∑Y ijkl --
i=1 j=1 k=1 l=1 ab c n

1 a 2 Y 2…
SSA = ( )∑ Y i.. --
b c n i=1 abcn

1 a b 2 1
a
SSB(A) = ( )∑ ∑ Y ij - ( ¿ ∑ Y2i
cn i=1 j=1 b c n i=1

1 a b c 1
a b
SSC(B) = ( )∑ ∑ ∑ Y2ijk - ( ¿ ∑ ∑ Y2ij
n i=1 j=1 k=1 cn i=1 j=1

SSerror = SStotal - SSA - SSB(A) - SSC(B)


The EMS formulas and F-ratios when factor A and Factor B are fixed and factor C is
random, are shown in Table 123

Table 123 EMS formulas and F-ratios When Factor A and


Factor B are Fixed and Factor c is Random
Model F F R R Expected mean square formula F-ratio
componen i j k l
t
a b c n

A 0 b c N a EMSA
 
i
σ
2 2 ∑A 2 E M Sc
+n σ +{bcn i=1 }l(a – 1)
c i

B 1 0 c n a EM SB
j(l)
σ
2 2 ∑1 2 E M Sc
+n  σ + {cn i=1 ∑ B }la(b – 1)
c j(i)

C 1 1 1 n 2 EM Sc
k(ij) σ + n  σ 2 E M S error
c
E 1 1 1 n 2
(ijk)l σ

EXAMPLE 4:

University (A)
1 2
College (B) College (B)
1 2 1 2
Student (C) Student (C) Student (C) Student (C)
1 2 1 2 1 2 1 2
1 8 7 2 7 6 5 1 8
Replication
(year) 2 4 4 9 8 1 4 8 9
3 4 9 9 8 6 5 7 5
4 6 7 8 6 9 7 5 4
Yi… 106 90
Yij.. 49 57 43 47
Yijk. 22 27 28 29 22 21 21 26

Factor : Universirty A
Ho : There is no significant difference between universities in terms of the score.
H1 : There is significant difference between universities in terms of the score.
Factor : college B(A)

For this problem,


2 2 2 4
Yijkl = ∑ ∑ ∑ ∑Y ijkl = 196
i=1 j=1 k=1 l=1

3 3 4
Y=∑ ∑ ∑ = 2128
i=1 j=1 k=1

2 2 2 4
Y ²ijkl
SStotal = = ∑ ∑∑∑ Y²ijkl -
i=1 j=1 k=1 l=1 32
2 2 2 2 2 2 2
= ( 8 )2 + ( 7 ) + ( 2 ) + ( 7 ) +¿ ( 6 ) + ( 5 ) + ( 1 ) + ( 8 ) + …. +

2 2 2 2 2 2 2 ( 196 )2
( 6 ) + ( 7 ) + ( 8 ) + ( 6 ) +¿ ( 9 ) + ( 7 )2 + ( 5 ) + ( 4 ) –
32
2
= 1364 -
( 196 )
32

= 163.5
2
Y ²ijkl Y ²ijkl
SSA = ∑ -
i=1 16 32

2 2
( 106 )2+ ( 90 ) ( 196 )
= -
16 32

=8
2 2 2
Y ² ij Y ²i
SSB(A) = ∑ ∑ -∑
i=1 j=1 8 i=1 16
2 2 2 2 2 2
= ( 49 )2 + ( 57 )2+ ( 43 ) + ( 47 ) + ¿ ( 6 ) + ( 5 ) + ( 1 ) + ( 8 )
2 2 2
( 49 )2 + ( 57 )2 + ( 43 ) + ( 47 ) ( 106 )2+ ( 90 )
= -
8 16

=5
2 2 2 2 2
Y ² ijk
SSC(B) = ∑∑∑ 4
- ∑ ∑ Y 8² ij
i=1 j=1 k=1 i=1 j=1

2 2 2 2 2
( 22 )2+ ( 27 )2+ ( 28 )2 + ( 29 )2 + ( 22 )2 + ( 21 ) + ( 21 ) + ( 26 ) ( 49 )2 + ( 57 )2 + ( 43 ) + ( 47 )
= -
8 8

4880 9708
= -
4 8

= 6.5

SSerror = SStotal - SSA - SSB(A) – SSC(B)

= 163.5 – 8 – 5 – 6.5

= 144

The results of this problem are summarized in Table 3


Source Sum of Degree Mean of EMS Fcalculated Ftable at α Remarks
of squares of squares formula
=0.05
variation freedom
A 8.0 1 8.000 4.923 7.71 Accept Ho
BA 5.0 2 2.500 1.539 6.94 Accept Ho
CB 6.5 4 1.625 0.271 2.78 Accept Ho
Error 144.0 24 6.000
Total 163.5 31

INFRENCES:
1.
There is no significant between the different un in terms of the scores.
2.
There is no significant between the different un in terms of the scores.
3.
There is no significant between the different un in terms of the scores.

You might also like