Uploaded by Momina Butt

Formula sheet for ANOVA (fall 2019)

advertisement
One-way analysis of variance, completely randomized design
observation
1
2
…
j
…
ni
treatment
1
y11
y12
…
y1 j
…
y1n
2
y21
y22
…
y2 j
…
y 2n
…
…
…
yi1
yi2
…
…
…
…
…
i
…
k
yk1
…
…
yk2
y
ij
…
…
…
y
kj
T1.
1
…
yin
2
T2 .
…
T.
i
i
….
ykn
k
T .
k
T..
k is the number of treatments;
ni is size of the sample of experimental units such that i-th treatment is assigned to all experimental units in this sample.
yij is the response of the j-th experimental unit in the sample of size n to the i-th treatment ; i = 1, 2,…,k; j = 1, 2, …, ni ;
i
k
∑ ni = n = total number of experimental units sampled = size of “large” sample;
i =1
ni
k
k ni
=
=
T .= ∑ yij = total of all responses to the i-th treatment;
T.. ∑
T . ∑ ∑ yij = total of all responses to k treatments .
i
i
=i 1 =i 1 j =1
j =1
k ni
k
∑ y
∑ Ti . ∑ ∑ yij
T . j =1 ij
T..
=i 1 =j 1
y .= i =
= sample mean for i –th treatment ; y=
= overall sample mean
.. = i =1 =
i n
k
k
n
n
i
i
∑ ni
∑ ni
=i 1 =i 1
n
i
SST = SSTr + SSE or
k ni
∑ ∑ ( yij
=i 1 =j 1
− y ..)2
k
=
k ni
∑ ni ( yi . − y..)2 +=i∑1 =j∑1 (yij − yi. )2 - ANOVA identity
i =1
SST= total sum of squares; SSTr = treatment sum of squares; SSE = error sum of squares;
Calculation formulas for SST, SSTr and SSE
2
k ni
k ni
2 T
2
SST = ∑ ∑ ( yij − y ..) = ∑ ∑ yij − ..
n
=
j 1=
=
i 1=
i 1j 1
SSE =
k ni
k 2
2
∑ ∑ (yij − yi. ) = ∑ Si ( ni − 1)
=i 1 =j 1
=i 1
MSTr =
SSTr
= treatment mean square
k-1
k T2 T2
i. − ..
n
n
=i 1 =i 1 i
SSTr =
k
∑ ni ( yi . − y..)2 =
∑
SSE = SST – SSTr ;
MSE=
SSE
= error mean square
n−k
1
ANOVA table for completely randomized design with k treatments
Source of variation
Degrees of freedom Sums of squares Mean squares
Treatment
k-1
SSTr
MSTr =SSTr/(k-1)
Error
n-k
SSE
MSE=SSE/ (n-k)
Total
n-1
SST
F ratio
 MSTr 

 MSE 0
f0 =
H 0 : µ1= µ 2= ...= µ k
H 1 : at least one of the treatment means is different from the others
Test statistic F =
MSTr
 MSTr 
; f 0 is the value of F calculated for the sample: f 0 = 

MSE
 MSE 0
Rejection region F > f α,k-1,n-k ; Rejection criteria for H 0 : f 0 falls into rejection region
(1 − α )100% confidence interval on individual treatment mean µi
yi. − t
α /2,n−k
MSE
MSE
≤ µi ≤ yi. + t
/2,
n
k
α
−
ni
ni
Individual (1 − α )100% confidence interval on the difference between treatment means µi − µm
1
1
1 
1 
≤ µi − µm ≤ yi. − ym. + t
yi. − ym. − t
MSE  +
MSE  +


α /2,n−k
α /2,n−k
 n nm 
 n nm 
 i

 i

Tukey’s simultaneous (1 − α )100% confidence interval on the difference between treatment means µi − µm
yi. − ym. − q
α , k , n−k
MSE k 1
MSE k 1
≤
≤
−
+
−
µ
µ
y
y
q
∑n
∑
m
i
i. m. α , k , n−k
k i 1=
k i 1 ni
i
If all sample sizes are equal
yi. − ym. − q
α , k , n−k
MSE
MSE
, where n0 is common sample size
≤ µi − µm ≤ yi. − ym. + q
k
n
k
α
,
,
−
n0
n0
Tukey’s pairwise comparisons
T
T
yi. = i. ; ym. = m. ; i = 1, 2, …, k; m = 1, 2, …, k; i ≠ m ; Difference between is µi and µm is significant if
nm
ni
yi. − ym. > Tcr.; MSE k 1
∑
α , k , n−k
k i =1 ni
Tcr. = q
If all sample sizes are equal Tcr. = q
α , k , n−k
MSE
, where n0 is common sample size.
n0
2
One-way analysis of variance, randomized block design
block
1
2
…
j
…
b
treatment
1
y11
y12
…
y1j
…
y1b
T1.
2
y21
y22
…
y2 j
…
y 2b
T2 .
…
i
…
…
…
…
yi2
…
…
…
yi1
…
…
yib
T.
i
…
k
yk2
…
…
…
yk1
…
…
ykb
T. 1
T. 2
y
ij
y
kj
T. j
….
T .
k
T. b
k = number of treatments, b = number of blocks.
y ij is the value of response variable for the experimental unit from j – th block assigned to i – th treatment
i = 1, 2,…,k;
j = 1, 2, …, b ;
b
k
T .= ∑ yij = total of all responses to i - th treatment; T. j = ∑ yij = total of all responses in j – th block;
i
j =1
i =1
k
b
k b
=
=
T.. ∑
T . ∑=
T. ∑ ∑ yij = total of all responses
i
j =i 1 =j 1
=i 1
=j 1
b
k
∑ yij
yij
∑
T. j
Ti . j =1
= sample mean for i – th treatment ; y . =
= sample mean for j –th block
= i =1
y .= =
j
i b
k
k
b
b
k b
k
∑
∑
∑ yij
T
.
∑ Ti .
j
T..
=j 1
=i 1 =j 1
=
y=
.. = i =1 =
= sample mean for kb observed values of response variable
kb
kb
kb
kb
SST = SSTr +SSB + SSE
ANOVA identity for completely randomized block design
SST= total sum of squares; SSTr = treatment sum of squares; SSE = error sum of squares; SSB = block sum of squares
Calculation formulas for SST, SSTr, SSB and SSE
2
k b
k b
2 T..
2
SST = ∑ ∑ ( yij − y ..) = ∑ ∑ yij −
kb
i =1 j =1
i =1 j =1
k T2 T2
i. − ..
SSTr = b ( yi . −=
y ..)
b
kb
i =1
i =1
k
∑
MSTr =
2
∑
b T. 2j T 2
y ..) ∑ − ..
SSB = k ∑ ( y . j − =
kb
i =1
i =1 k
b
2
SSE = SST – SSTr -SSB ;
SSE
SSTr
SSB
= treatment mean square; MSB=
= block mean square, MSE=
= error mean square
k-1
b −1
(k − 1)(b − 1)
3
ANOVA table for the randomized block design with k treatments and b blocks
Source of variation
Degrees of freedomSums of squares Mean squares
F ratio
Treatment
k-1
SSTr
MSTr =SSTr/(k-1)
Blocks
b -1
SSB
MSB =SSB/(b-1)
Error
(k-1)(b -1)
SSE
MSE=SSE/ (k-1)(b-1)
Total
kb -1
1. H 0 : µ1.= µ 2.= ...= µk .
 MSTr 

 MSE 0
f 0 (treatments)= 
 MSB 

 MSE 0
f 0 (bloks)= 
SST
H 1 : at least one of the treatment means is different from the others
MSTr
 MSTr 
; f 0 is the value of F calculated for the sample: f 0 = 

MSE
 MSE 0
Rejection region F > f α, k-1, (k-1)(b -1) ; Rejection criteria for H 0 : f 0 falls into rejection region
Test statistic F =
Tukey’s pairwise comparisons for the treatment means
Difference is significant if yi. − ym. > T cr. ;
2. H 0 : µ.1= µ.2= ...= µ .b
Test statistic F =
Tcr. = qα , k , (k −1)(b−1)
MSE
b
T
T
yi. = i. ; ym. = m. ; i = 1, 2, …, k; m =1, 2, …, k; i ≠ m
b
b
H 1 : at least one of the block means is different from the others
MSB
 MSB 
; f 0 is the value of F calculated for the sample: f 0 = 

MSE
 MSE 0
Rejection region F > f α, b -1, (k-1)(b -1) ;
Rejection criteria for H 0 : f 0 falls into rejection region
Turkey’s pairwise comparisons for the block means
Tcr. = qα , b, (k −1)(b−1)
MSE
k
T. j
T. p
; y. p =
; j = 1, 2, …, b; p =1, 2, …, b; j ≠ p
y. j =
k
k
Individual (1 − α )100% confidence interval on the difference between treatment means µi − µm
Difference is significant if y. j − y. p > T cr. ;
2
2
yi. − ym. − t
MSE ≤ µi. − µm . ≤ yi. − ym. + t
MSE
α /2,(k −1)(b−1)
α /2,(k −1)(b−1)
b
b
Tukey’s simultaneous (1 − α )100% confidence interval on µi − µm
MSE
MSE
≤ µi. − µm. ≤ yi. − ym. + q
α
k
,
,
(k-1)(b
-1)
b
b
Individual (1 − α )100% confidence interval on the difference between block means µ j − µ p
yi. − ym. − q
α , k , (k-1)(b -1)
2
2
y. j − y. p − t
MSE ≤ µ. j − µ. p ≤ y. j − y. p + t
MSE
α /2,(k −1)(b−1)
α /2,(k −1)(b−1)
k
k
Tukey’s simultaneous (1 − α )100% confidence interval on the difference between block means µ j − µ p
y. j − y. p − q
α , b, (k-1)(b -1)
MSE
MSE
≤ µ. j − µ
≤ y. j − y. p + q
α , b, (k-1)(b -1)
.p
k
k
4
Two-way analysis of variance
y = kth response to (i, j) treatment
ijk
(i, j) treatment is the treatment corresponding to i-th level of factor A and j – th level of factor B;
i = 1, 2,…, a;
a= number of levels of factor A,
j = 1, 2, …, b;
b = number of levels of factor B;
k = 1, 2, …, r;
r = sample size = number of experimental units that receive treatment defined by ith level
of factor A and j – th level of factor B
T ij. =
Tij.
y
=
total
of
all
responses
to
(i,
j)
treatment
;
=
y
∑ ijk
ij. r = sample mean for the (i, j) treatment
k =1
T i.. =
∑ Tij. = total of all responses to i
T . j. =
T. j.
th
th
y
=
total
of
all
responses
to
j
th
level
of
factor
B;
=
T
∑ ij.
. j. ar = sample mean for the j th level of factor B
i =1
T ... =
r
b
th
j =1
T
th level of factor A; yi.. = i.. = sample mean for the i th th level of factor A
br
a
b
a
∑ T. j. =
∑ Ti.. =
j =1
i =1
b
a
y...
∑ ∑ Tij. = total of all responses ; =
=i 1 =j 1
T ... T ...
= sample mean for all responses
=
abr
n
SST = SSA + SSB + SSAB + SSE = SSTr + SSE
Calculation formulas for SST, SSA, SSB, SSAB and SSE
T2
− ... ;
SST = ∑ ∑ ∑ ( y − y... ) = ∑ ∑ ∑ y
ijk
ijk
abr
=i 1 =j 1 k =1
=i 1 =j 1 k =1
a b
a b
r
r
2
2
Tij2. T 2
− ...
SSTr = r ∑ ∑ ( yij. − y... ) = ∑ ∑
abr
=i 1 =j 1 r
=i 1 =j 1
a b
a b
2
2
2
b
b T
T...2
. j. T...
2
i
..
−
−
SSA = br ∑ ( yi.. − y... ) = ∑
SSB = ar ∑ ( y. j. − y... ) = ∑
abr
=i 1 =i 1 br abr
=j 1 =j 1 ar
a
SSAB = r
2
a T2
a b
∑ ∑ ( yij. − yi.. − y. j. + y... )
=i 1 =j 1
SSE =
a
b
n
∑ ∑ ∑ ( yijk − yij. )
=i 1 =j 1 k =1
Mean squares MSA=
ANOVA table
Source of
variation
Factor A
Factor B
Interaction
Error
Total
2
2
or SSAB = SSTr – SSA- SSB
or SSE = SST – SSTr
SSAB
SSE
SSB
SSA
MSB=
MSAB =
MSE=
b −1
a −1
(a − 1)(b − 1)
ab(r − 1)
Degrees of
freedom
a-1
b-1
(a-1)(b-1)
ab(r-1)
abr- 1
Sum of squares
Mean square
F ratio
SSA
SSB
SSAB
SSE
SST
MSA
MSB
MSAB
MSE
F=MSA/MSE
F=MSB/MSE
F=MSAB/MSE
5
1 H 0 : there is no interaction between the factors A and B
Test statistic: F =
H 1 : there is interaction between the factors A and B
MSAB
MSE
Rejection region: F > f
α , (a−1)(b−1), ab(r −1)
; Rejection criterion: f 0 = (
2. H 0 : there are no differences among the means of factor A
Test statistic: F =
H 1 : at least two means are different
MSA
MSE
Rejection region: F > f
α ,(a −1),ab(r −1)
; Rejection criterion: f 0 = (
3. H 0 : there are no differences among the means of factor B
Test statistic: F =
MSAB
) 0 falls into rejection region
MSE
MSA
) 0 falls into rejection region
MSE
H 1 : at least two means are different
MSB
MSE
Rejection region: F > f α ,(b−1),ab( r −1) ; Rejection criterion: f 0 = (
MSB
) 0 falls into rejection region
MSE
Tukey’s pairwise comparison (no interaction between two factors)
T
MSE
T
; Difference is significant if yi.. − ym.. > T cr . ; yi.. = i.. ; ym.. = m..
α , a, ab(r −1) br
br
br
i = 1, 2, …, a; m = 1, 2, …, a; i ≠ m
T. j.
T. p.
MSE
Factor B: T cr . = q
; Difference is significant if y. j. − y. p. > T cr . y. j. =
y. p. =
.
.
j
α , b, ab(r −1) ar
ar
ar
Factor A: T cr . = q
j = 1, 2, …, b; p = 1, 2, …, b; j ≠ p
Individual (1 − α )100% confidence interval on on µi. − µm. and µ. j − µ. p
2
2
yi. − ym. − t
α /2,ab(r −1) MSE br ≤ µi. − µm. ≤ yi. − ym. + tα /2,ab(r −1) MSE br
2
2
y. j − y. p − t
MSE
≤ µ. j − µ. p ≤ y. j − y. p + t
MSE
α /2,ab(r −1)
α /2,ab(r −1)
ar
ar
Tukey’s simultaneous (1 − α )100% confidence interval on µi. − µm. and µ. j − µ. p
yi. − ym. − q
α , a, ab(r −1)
MSE
MSE
≤ µi. − µm. ≤ yi. − ym. + q
α , a, ab(r −1) br
br
MSE
MSE
≤ µ. j − µ. p ≤ y. j − y. p + q
,
b
,
ab
(
r
1)
α
−
ar
ar
Individual (1 − α )100% confidence interval on µij. − µmp.
y. j − y. p − q
α , b, ab(r −1)
2
2
yij. − ymp. − t
α /2,ab(r −1) MSE r ≤ µij. − µmp. ≤ yij. − ymp. + tα /2,ab(r −1) MSE r
yij. is the mean value of response variable obtained when using level i of factor A and level j of factor B;
ymp. is the mean value of response variable obtained when using level m of factor A and level p of factor B;
6
Download