Professional Documents
Culture Documents
(ANOVA)
Professional membership
Senior Member of American Institute of Chemical Engineers
(AIChE)
Member of Institution of Chemical Engineers (IChemE), UK
2
Outline of presentation
ANOVA technique
One-Way ANOVA
Systematic calculation
Example
Two-Way ANOVA
Systematic calculation
Example
H0 1 2 ...k
H1 i j for at least one pair i,j
Treatment / Variety ( j ) 1 2 3 4
- sum over both subscripts
ANOVA technique
- notation / general calculation -
Sample sizes n1 n2 nk n
Y
Sample means Y1 Y2 Yk Y
n
Residual SS (SSR) k nj
SST Yij Y
nj 2
SS j Yij Y j
2
SS1 SS2 SSk j1 i1
i1
k
Pooled SS SSE SS j
j 1
ANOVA technique
- example / general calculation -
Sample sizes ( n j ) 3 3 3 3 n 12
Y
Sample means ( y j ) 7.9 12.1 10.2 18.2 Y 12.1
n
k nj
SSR
SST Yij Y
2
nj
SS j Yij Y j
2
16.0 31.94 12.48 22.64 j1 i1
i1 258.52
k
SSE SS j 83.14
Pooled SS
j 1
ANOVA technique
- variation between / within treatments -
2 kinds of variation:
Random variation within treatments - affects the
width of each distribution = type I
Systematic variation between treatments - causes
the i to be different from each other = type II
If H0 is true:
We have a single distribution - type I
We can estimate the variance of data ( ) by ignoring
2
the treatments - treating all observations as single
sample
ANOVA technique
- variation between / within treatments -
Theorem:
k n k k n
y
y n y i y y ij y i
2 2
ij
i1 j1 i1 i1 j1
One-Way ANOVA:
variation between - treatment & within - treatment
Treatment / Variety ( j ) 1 2 3 4
within-treatment
between-treatments
k = no. of treatments = 4
n = no. of samples for each treatment = 3
ANOVA technique
- ANOVA table / equal sample sizes -
H0 1 ... k
s12 reject H0
f f (k 1,k(n 1))
f 2
H1 i j s if
Degrees of Mean
Source of Sum of Squares f
variation freedom square
SSA
Between SSA k 1 s12
s12
k 1
treatments f 2
Within SSE s
treatments SSE k(n 1) s2
(error)
k(n 1)
Total SST nk 1
ANOVA technique
- ANOVA table / unequal sample sizes -
k ni n
SST y ij y i SSA ni y i y
2 2
i1 j1 i1
k
SSE SST SSA n ni
i 1
Source of
Sum of Squares Degrees of Mean f
variation freedom square
SSA
Between SSA k 1 s12
s12
k 1
treatments f 2
Within SSE s
treatments SSE n k s
2
(error)
n k
Total SST n 1
ANOVA technique
- One-Way ANOVA calculation-
Steps:
1. Find the treatment totals, square them, divide by nj and sum to get:
y 2 j
k
B
j 1 n j
k(n 1)
(error)
Total SST nk 1
H0 1 ... k s12 reject H0
f 2 f f (k 1,k(n 1))
H1 i j s if
ANOVA technique
- One-Way ANOVA example-
1. Find the treatment totals, square them, divide by nj and sum to get:
Treatment 1 2 3 4
i 10.1 11.4 13.0 14.4
j 8.9 16.4 8.2 19.4
Yields ( yij )
4.7 8.5 9.4 20.8
Treatment Totals ( y j ) 23.7 36.3 30.6 54.6
Sample sizes ( n j ) 3 3 3 3
Treatment 1 2 3 4
i 10.1 11.4 13.0 14.4
j 8.9 16.4 8.2 19.4
Yields ( yij )
4.7 8.5 9.4 20.8
k nj
Treatment Totals ( y j ) 23.7 36.3 30.6 54.6 Y Yij 145.2
j 1 i 1
Sample sizes ( n j ) 3 3 3 3 n 12
Treatment 1 2 3 4
10.1 11.4 13.0 14.4
Yields ( yij )
8.9 16.4 8.2 19.4
4.7 8.5 9.4 20.8
k nj
A yij2 (10.1) 2 (8.9) 2 (4.7) 2
j 1 i 1
(11.4)2 (16.4)2 (8.5)2
(13.0)2 (8.2)2 (9.4)2
(14.4)2 (19.4)2 (20.8)2
k nj
A yij2 2015 .44
j 1 i 1
ANOVA technique
- One-Way ANOVA example -
k
4. Complete the ANOVA table: n
SST A C
Total
258.52 nk 1 11
H0 1 ... k
s12 reject H0
f f (k 1,k(n 1))
f 2
H1 i j s if
ANOVA technique
- One-Way ANOVA example -
k
for treatments
n
f (k 1, k (n 1))
0.05 f 0.05 (3,8) 4.07
k 4 1 3
n3 2 8
f 5.63 f0.05 (3,8)
Treatment / Variety ( j ) 1 2 3 4
block
no. of blocks = 3
ANOVA technique
- Two-Way ANOVA calculation-
Steps:
1. Find the treatment totals, square them, divide by nj and sum to get:
y 2 j
k
B
j 1 n j
k 1
1
s
Blocks SSB
SSB D C n 1 sB 2 sB2
n 1
fB 2
s
Error SSE SST (n 1)(k 1)
s2
SSE
SSA
SSB (n 1)(k 1)
Total SST A C nk 1
treatments
H0 1 ... k f f (kt 1, (kt 1)(nt 1))
H1 i j blocks
fB f (kB 1, (kB 1)(nB 1))
ANOVA technique
- Two-Way ANOVA example-
1. Find the treatment totals, square them, divide by nj and sum to get:
Treatment 1 2 3 4
i 10.1 11.4 13.0 14.4
j 8.9 16.4 8.2 19.4
Yields ( yij )
4.7 8.5 9.4 20.8
Treatment Totals ( y j ) 23.7 36.3 30.6 54.6
Sample sizes ( n j ) 3 3 3 3
B 1932 .30
ANOVA technique
- Two-Way ANOVA example-
Treatment 1 2 3 4
i 10.1 11.4 13.0 14.4
j 8.9 16.4 8.2 19.4
Yields ( yij )
4.7 8.5 9.4 20.8
k nj
Treatment Totals ( y j ) 23.7 36.3 30.6 54.6 Y Yij 145.2
j 1 i 1
Sample sizes ( n j ) 3 3 3 3 n 12
3. Find the block totals, y i square them, divide by n i and sum to get:
nj
y 2i (48.9) 2 (52.9) 2 (43.4) 2
D
i 1 ni 4 4 4
D 1768 .30
ANOVA technique
- Two-Way ANOVA example -
4. Square each observation and sum over the whole data:
Treatment 1 2 3 4
10.1 11.4 13.0 14.4
Yields ( yij )
8.9 16.4 8.2 19.4
4.7 8.5 9.4 20.8
k nj
A yij2 (10.1) 2 (8.9) 2 (4.7) 2
j 1 i 1
(11.4)2 (16.4)2 (8.5)2
(13.0)2 (8.2)2 (9.4)2
(14.4)2 (19.4)2 (20.8)2
k nj
A yij2 2015 .44
j 1 i 1
ANOVA technique
- Two-Way ANOVA example -
5. Complete the ANOVA table:
H0 1 ... k treatments
f f (kt 1, (kt 1)(nt 1))
H1 i j blocks
fB f (kB 1, (kB 1)(nB 1))
ANOVA technique
- Two-Way ANOVA example -
kt nB
for treatments for blocks
nt kB
f (kt 1, (kt 1)(nt 1)) f (kB 1, (kB 1)(nB 1))
0.05 0.05
kt 4 1 3 kB 3 1 2
nt 3 2 6 nB 4 2 6
Tools
Data analysis
SUMMARY
Groups Count Sum Average Variance
Column 1 3 23.7 7.9 8.04
Column 2 3 36.3 12.1 15.97
Column 3 3 30.6 10.2 6.24
Column 4 3 54.6 18.2 11.32
ANOVA
Source of Variation SS df MS F P-value F crit
Between Groups 175.38 3 58.46 5.62521 0.022673 4.06618
Within Groups 83.14 8 10.3925
Total 258.52 11
Q & A session