Professional Documents
Culture Documents
1-way ANOVA
Anthony J Greene
ANOVA
I.
II.
III.
IV.
V.
The F-ratio
Used for testing hypotheses among more than two means
As with t-test, effect is measured in numerator, error variance
in the denomenator
Partitioning the Variance
Degrees Freedom for Numerator and Denominator
No such thing as a negative value
M1
M2
Anthony J Greene
M3
ANOVA
Analysis of Variance
Hypothesis testing for more than 2 groups
For only 2 groups t2(n) = F(1,n)
2
effect
2
error
seffect
serror
M1 M 2
sM
Anthony J Greene
Grp 1
Grp 2
Grp 3
BASIC IDEA
Is the Effect
Variability
Large
M1 = 1 M2 = 5 M3 = 1
Compared to the
Random
Variability
BASIC IDEA
Sources of Variance
Anthony J Greene
T x, G T
M1
M2
Anthony J Greene
10
G
X
N
2
X
SS X 2
Grp 1
Grp 2
Grp 3
M1 = 1 M2 = 5 M3 = 1
Anthony J Greene
11
SS Between
T
G
n
N
X
SS X 2
Grp 1
Grp 2
1
1
1
1
1
5
5
5
5
5
Grp 3
1
1
1
1
1
T1 = 5 T2 = 25 T3 = 5
M1 = 1 M2 = 5 M3 = 1
Anthony J Greene
12
SS ( X M ) 2
SS computed within a
column removes the mean.
Grp 1
0-1
1-1
3-1
1-1
0-1
Grp 2
4-5
3-5
6-5
3-5
4-5
Grp 3
1-1
2-1
2-1
0-1
0-1
M2 = 5 M3 = 1
13
SS Between
Grp 1
0-1
1-1
3-1
1-1
0-1
T
G
n
N
Grp 2
4-5
3-5
6-5
3-5
4-5
G
X
N
2
SSWithin SS
SS ( X M ) 2
Grp 3
1-1
2-1
2-1
0-1
0-1
M1 = 1 M2 = 5 M3 = 1
Anthony J Greene
14
15
Anthony J Greene
16
Anthony J Greene
17
Anthony J Greene
18
Computing An F-Ratio
MSbetween
SSbetween
df between
MS within
MSbetween
F
MS within
Anthony J Greene
SS within
df within
19
Anthony J Greene
20
Table B-4
Anthony J Greene
21
Anthony J Greene
22
Anthony J Greene
23
Anthony J Greene
24
Anthony J Greene
25
Assumptions for
One-Way ANOVA
1.
Independentsamples:Thesamplestakenfrom
thepopulationsunderconsiderationare
independentofoneanother.
2.
Normalpopulations:Foreachpopulation,the
variableunderconsiderationisnormally
distributed.
3.
Equalstandarddeviations:Thestandard
deviationsofthevariableunderconsideration
arethesameforallthepopulations.
Anthony J Greene
26
M1 = 1
M2 = 5
M3 = 1
Anthony J Greene
27
Is the Effect
Variability
Large
M1 = 1
M2 = 5
M3 = 1
Compared to the
Random Variability
Anthony J Greene
28
T x
Anthony J Greene
29
T x
Anthony J Greene
30
Anthony J Greene
31
Anthony J Greene
32
M1
M2
M3
Anthony J Greene
33
1
9
1
M1
M2
1
4
4
X2 = 106
M3
Anthony J Greene
34
G T
M1
M2
M3
Anthony J Greene
35
M1
M2
M3
36
SSbetween = n N
Sstotal =
SSbetween = 30
SStotal= Ssbetween + SSwithin
Sswithin = 16
MSbetweeen
F
MS within
SSbetween 30
15
df between
2
11.28
SS within
16 1.33
df within
12
MSbetween MStreatment
F
MS within
MSerror
hastheFdistributionwithdf=(k1,nk)ifthenull
hypothesisofequalpopulationmeansistrue.Herendenotes
thetotalnumberofobservations.
Anthony J Greene
38
ANOVA
Source Table
for a one-way analysis of variance
Anthony J Greene
39
Anthony J Greene
40
Anthony J Greene
41
Post Hocs
H0 : 1 = 2 = 3 = = k
Rejecting H0 means that not all means are equal.
Pairwise tests are required to determine which of
the means are different.
One problem is for large k. For example with k = 7,
21 means must be compared. Post-Hoc tests are
designed to reduce the likelihood of groupwise type
I error.
Anthony J Greene
43
Anthony J Greene
44
One-Way
ANOVA
control
0
1
3
0
1
low dose
1
3
4
1
1
high dose
5
8
6
4
7
45
control
0
One-Way
1
ANOVA
3
0
Compute the
1
treatment totals, T,
and the grand total, G T1=5
low dose
1
3
4
1
1
T2=10
high dose
5
8
G=45
6
4
7
T3=30
Anthony J Greene
46
control
0
One-Way
1
ANOVA
3
0
Count n for each
1
treatment, the
T1=5
total N, and k
n1=5
low dose
1
3
4
1
1
T2=10
high dose
5
8
G=45
6
N=15
4
k=3
7
T3=30
n2=5
Anthony J Greene
n3=5
47
control
0
One-Way
1
ANOVA
3
0
Compute the
1
treatment means
T1=5
low dose
1
3
4
1
1
T2=10
high dose
5
8
G=45
6
N=15
4
k=3
7
T3=30
n1=5
n2=5
n3=5
M1=1
M2 =2
M3 =6
Anthony J Greene
48
One-Way
ANOVA
Compute the
treatment SSs
control
low dose
0(0-1)2=1 1
1(1-1)2=0 3
3(3-1)2=4 4
0(0-1)2=1 1
1(1-1)2=0 1
T1=5 sum T2=10
high dose
5
8
G=45
6
N=15
4
k=3
7
T3=30
n1=5
n2=5
n3=5
M1=1
M2 =2
M3 =6
SS=6
SS=8
SS=10
Anthony J Greene
49
control
0
One-Way
1
ANOVA
3
0
Compute all X2s
1
and sum them
T1=5
low dose
1
3
4
1
1
T2=10
high dose
5
8
6
4
7
T3=30
n1=5
n2=5
n3=5
M1=1
M2 =2
M3 =6
SS=6
SS=8
SS=10
Anthony J Greene
G=45
N=15
k=3
X2= 229
50
One-Way
ANOVA
Compute SSTotal
SSTotal= X2 G2
control
0
1
3
0
1
T1=5
N
low dose
1
3
4
1
1
T2=10
high dose
5
8
6
4
7
T3=30
n1=5
n2=5
n3=5
M1=1
M2 =2
M3 =6
SS=6
SS=8
SS=10
Anthony J Greene
G=45
N=15
k=3
X2= 229
SSTotal=94
51
One-Way
ANOVA
Compute SSWithin
SSWithin= SSi
control
0
1
3
0
1
T1=5
low dose
1
3
4
1
1
T2=10
high dose
5
8
6
4
7
T3=30
n1=5
n2=5
n3=5
M1=1
M2 =2
M3 =6
SS1=6
SS2=8
SS3=10
Anthony J Greene
G=45
N=15
k=3
X2= 229
SSTotal=94
SSWithin=24
52
control
0
One-Way 1
ANOVA 3
0
Determine d.f.s
1
d.f. Within=N-k
T1=5
low dose
1
3
4
1
1
T2=10
high dose
5
8
6
4
7
T3=30
G=45
N=15
k=3
X2= 229
SSTotal=94
d.f. Between=k-1
n1=5
n2=5
n3=5
SSWithin=24
d.f. Total=N-1
M1=1
M2 =2
M3 =6
d.f. Within=12
SS1=6
SS2=8
SS3=10
d.f. Between=2
Anthony J Greene
d.f. Total=14
53
control
0
One-Way 1
ANOVA 3
0
Ready to move it
1
to a source table
T1=5
low dose
1
3
4
1
1
T2=10
high dose
5
8
6
4
7
T3=30
G=45
N=15
k=3
X2= 229
SSTotal=94
n1=5
n2=5
n3=5
MX1=1
MX2 =2
MX3 =6
d.f. Within=12
SS1=6
SS2=8
SS3=10
d.f. Between=2
Anthony J Greene
SSWithin=24
d.f. Total=14
54
One-Way ANOVA
Compute the missing values
Source
Between
Within
SS
70
24
df
2
12
Total
94
14
MS
Anthony J Greene
55
One-Way ANOVA
Compute the missing values
Source
Between
Within
SS
70
24
df
2
12
Total
94
14
MS
35
2
Anthony J Greene
56
One-Way ANOVA
Compute the missing values
Source
Between
Within
SS
70
24
df
2
12
Total
94
14
MS
35
2
Anthony J Greene
F
17.5
57
One-Way ANOVA
1. Compare your F of 17.5 with the critical value at
2,12 degrees of freedom, = 0.01: 6.93
2. reject H0
Source
Between
Within
SS
70
24
df
2
12
Total
94
14
MS
35
2
Anthony J Greene
F
17.5
58
Low
One-Way
ANOVA
2
4
3
0
2
1
Medium
6
4
5
3
6
6
Anthony J Greene
High
9
10
8
10
8
9
59
One-Way
ANOVA
low
2
4
3
0
2
1
Compute the
treatment totals, T,
and the grand total,
G
T1=12
medium
6
4
5
3
6
6
high
9
10
8
10
8
9
T2=30
T3=54
Anthony J Greene
G=96
60
One-Way
ANOVA
Count n for each
treatment, the
total N, and k
low
2
4
3
0
2
1
medium
6
4
5
3
6
6
high
9
10
8
10
8
9
T1=12
T2=30
T3=54
n1=6
n2=6
n3=6
Anthony J Greene
G=96
N=18
k=3
61
One-Way
ANOVA
Compute the
treatment means
low
2
4
3
0
2
1
medium
6
4
5
3
6
6
high
9
10
8
10
8
9
T1=12
T2=30
T3=54
n1=6
n2=6
n3=6
M1=2
M2 =5
M3 =9
Anthony J Greene
G=96
N=18
k=3
62
One-Way
ANOVA
Compute the
treatment SSs
low
medium
2(2-2)2=0 6
4(4-2)2=4 4
3(3-2)2=1 5
0(0-2)2=4 3
2(2-2)2=0 6
1(1-2)2=1 6
T1=12
high
9
10
8
10
8
9
T2=30
T3=30
n2=6
n3=6
M1=2
M2 =5
M3 =9
SS=10
SS=8
SS=10
sum
n1=6
Anthony J Greene
G=96
N=18
k=3
63
One-Way
ANOVA
Compute all X2s
and sum them
low
2
4
3
0
2
1
medium
6
4
5
3
6
6
high
9
10
8
10
8
9
T1=12
T2=30
T3=54
n1=6
n2=6
n3=6
M1=2
M2 =5
M3 =9
SS=10
SS=8
SS=10
Anthony J Greene
G=96
N=18
k=3
X2=682
64
One-Way
ANOVA
Compute SSTotal
SSTotal= X
2
low
2
4
3
0
2
1
medium
6
4
5
3
6
6
high
9
10
8
10
8
9
T1=12
T2=30
T3=54
n1=6
n2=6
n3=6
M1=2
M2 =5
M3 =9
SS=10
SS=8
SS=10
Anthony J Greene
G=96
N=18
k=3
X2= 682
SSTotal=170
65
One-Way
ANOVA
Compute SSWithin
SSWithin= SSi
low
2
4
3
0
2
1
medium
6
4
5
3
6
6
high
9
10
8
10
8
9
T1=12
T2=30
T3=54
SSTotal=170
n1=6
n2=6
n3=6
SSWithin=28
M1=2
M2 =5
M3 =9
SS1=10
SS2=8
SS3=10
Anthony J Greene
G=96
N=18
k=3
X2= 682
66
d.f. Within=N-k
low
2
4
3
0
2
1
d.f. Between=k-1
T1=12
T2=30
T3=54
SSTotal=170
d.f. Total=N-1
n1=6
n2=6
n3=6
SSWithin=28
M1=2
M2 =5
M3 =9
d.f. Within=15
SS1=10
SS2=8
SS3=10
d.f. Between=2
67
One-Way
ANOVA
Determine d.f.s
medium
6
4
5
3
6
6
Anthony J Greene
high
9
10
8
10
8
9
G=90
N=18
k=3
X2= 682
One-Way ANOVA
Fill in the values you have
Source
Between
Within
SS
28
df
2
15
Total
170
17
MS
Anthony J Greene
68
One-Way ANOVA
Compute the missing values
Source
Between
Within
SS
142
28
df
2
15
Total
170
17
MS
71
1.87
Anthony J Greene
F
37.97
69
One-Way ANOVA
1. Compare your F of 37.97 with the critical value at
2,15 degrees of freedom, = 0.01: 6.36
2. reject H0
Source
Between
Within
SS
142
28
df
2
15
Total
170
17
MS
71
1.87
Anthony J Greene
F
37.97
70