Вы находитесь на странице: 1из 4

BM 602

03-Apr-12

Analysis of Variance

A One-way

anova_sak-030412

(Samples independent Normal distribution)


Drug \
Samples
A
77 81 71 76 80
B
72 58 74 66 70
C
76 85 82 80 77

Av
77
68
80

f2,12 (0.975/0.025) = 5.10


SSTr = 390
MSTr = 195
SSE = 276
MSE = 23
f3-1,3(5-1) = 8.47
p-value = 0.005 (approx)

Reject for 1-sided > 0.005 and 2-sided 0.01 (see the F-Table G in Daniel)
_
_
_
_
x1. = 77, x2. = 68, x3. = 80 x.. = 75
Xi j

i +

Xi j

+ i+ Eij

Eij

In general, i runs over 1, , k and there could be differing # obs for each i

... The Es assumed to be N(0,2)

Here

i = 0

i
H0: 1 = 2 = 3

i = 0, i = 1, 2, 3

H1: All i not equal not all i = 0, i = 1, 2, 3


_

X.. = Xi j / n
i j

_
Similarly define Xi. being averages for each factor (e.g., value)

_
Total Sum of Squares SST = (Xi j - X..)2
i j

_
_
_
= (Xi. - X..)2
+
(Xi j - Xi.)2
i j
i j
SSTr
SSE
= treatment differences
within treatment differences
k _
_
= n
( Xi. - X..)2
i=1 _
_
= 2 ( Xi. - X..)2
+ 2 2n-1

i ________
2/n

SST/ 2
________

= 2 2k-1

+ 2

= SSTr/ 2 2k-1

______________

Summary Table
Source of Variation

d.f

Sum of Squares

Treatment

k1

SSTr

Tr

SSE 2 k(n-1)
_____________

Mean Sum of Squares


MSTr

2 k(n-1)

F ratio
MSTr/MSE

Error
E
k(n 1)
SSE
MSE
_______________________________________________________________________________________
Total
T
kn 1
SST
______________________________________________________________________________________

B. An alternate way of looking at 1-way ANOVA


k

ni # samples from ith class

Total # samples: n = n i
i=1

sample sizes could be different


2

When we pool the samples to estimate the common variance of the population inclusive of all classes,
k
2
2
2
SW = (ni -1) Si
where Si is the sample variance of ith class
i=1
___________
ni - k
Considering in terms of distinct classes, i = 1, , k

_
k _
X = n i Xi / n
i=1

SB2
2

F ratio = SB / SW

k
_
_
= ni (Xi - X )2 /(k 1)
i=1

with degrees of freedom (k-1) and ( ni - k) respectively

Remark: Note that this works out to the case where all ni equal
Apply to the example!

SB = 195

SW

= 23

f SB2 / SW 2 = 195/23 = 8.47


(same as earlier! Why?)

C. 2-Way ANOVA
Blocks
j

Treatments

Xij

Note: Every block, comprising of several plots, each subject to each of the treatments
Here, we are considering only 1 observation (treat as average) per cell
=

Xij

SST (kn 1)
_

SSTr (k-1)
_
_

ij

(N(0,2))

SSB (n-1)
_
_

SSE (k-1)(n-1)
_ _
_
2

(Xij - X..)
= (Xi. - X..) + (X.j - X..)
(Xij - Xi. - X.j + X..)
i j
_______________________________________________________________________________
Source
Sum of Squares
df
Mean Square
F Ratio
Treatment
SSTr
k1
MSTr = SSTr /(k-1)
MSTr/MSE
Block

SSB

n -1

Error(Residual) SSE

MSB = SSB/(n-1)

(k-1)(n-1)

MSB/MSE

MSE = SSE/(k-1)(n-1)

Total
SST
kn - 1
_______________________________________________________________________________
Remarks: Unable to consider interaction effects. Require more than one sample in each cell to conduct this.
_
The extension would be to Joint (row,col) effect and for this we need to calculate X ij.
Example on travel time, Day-of-the-week

vs

Day-of-the-week
2
3
4

Routes

_
Xi.

22

26

25

25

31

25.8

25

27

28

26

29

27

26

29

33

30

33

30.2

Routes

4
26
28
27
30
30
28.2
_
_
X.j
24.7 27.5
28.2 27.7 30.7 X.. = 27.8
___________________________________________________

Analysis of the given data:


_______________________________________________________________________________
Source
Sum of Squares
df
Mean Square
F Ratio
SSTr
42.24
3
MSTr = 14.08
MSTr/MSE = 8.96 (3/12)
(p<0.005)

SSB

91.4

MSB = 22.85

MSB/MSE = 14.55 (4/12)


(p<<0.005)

SSE

18.86

12

MSE = 1.57

Reject both hypotheses:


No routes/day-of-the-week effect

SST
153.2
19
(see Appendix, F table, Table G in Daniel)
_______________________________________________________________________________

Вам также может понравиться