Professional Documents
Culture Documents
E
C
N
A
I
R
A
V
F
O
S
I
S
Y
L
A
AN
MORA, REGINALD G.
ME-SE
WHY ANOVA?
WHAT IS ANOVA?
WHAT IS ANOVA?
WHAT IS ANOVA?
2
between
2
within
ASSUMPTIONS OF ANOVA:
MOTIVATING EXAMPLE
The analysis of variance can be used as an exploratory
tool to explain observations.
Suppose we wanted to
predict the weight of a dog
based on a certain set of
characteristics of each dog
Is one mean so
far away from the
other that is like
not from the same
population?
Variability
AMONG/
BETWEEN the
sample
means
CLASSES OF MODELS
FIXED-EFFECTS MODELS
RANDOM-EFFECTS MODELS
MIXED-EFFECTS MODELS
FIXED-EFFECTS MODELS
Applies to situations in which the experimenter applies
one or more treatments to the subjects of the
experiment to see if the response variable values
change. This allows the experimenter to estimate the
ranges of response variable values that the treatment
would generate in the population as a whole.
RANDOM-EFFECTS MODELS
Used when the treatments are not fixed. This
occurs when the various factor levels are sampled
from a larger population
MIXED-EFFECTS MODELS
A mixed-effects model contains experimental
factors of both fixed and random-effects types,
with appropriately different interpretations and
analysis for the two types.
PURPOSE
The reason for doing an ANOVA is to see if there is any
difference between groups on some variable.
PURPOSE
For example, you might have data on student
performance in non-assessed tutorial exercises as well as
their final grading. You are interested in seeing if tutorial
performance is related to final grade. ANOVA allows you
to break up the group according to the grade and then
see if performance is different across these grades.
TYPES OF ANOVA
1.ONE WAY
2.TWO WAY
Treatment 2
Treatment 3
Treatment 4
y11
y21
y31
y41
y12
y22
y32
y42
y13
y23
y33
y43
y14
y24
y34
y44
y15
y25
y35
y45
y16
y26
y36
y46
y27
y37
y47
y18
y28
y38
y48
y19
y29
y39
y49
y110
y210
y310
y410
y17
n=10 obs./group
k=4 groups
means10
y1
10
y1 j
j 1
y 2
10
(y
1j
j 1
y1 )
10 1
j 1
2 j
j 1
10
10
y 3
10
( y 2 j y 2 )
10
j 1
10 1
j 1
10
( y 3 j y 3 ) 2
10 1
10
y3 j
y 4
10
j 1
4 j
j 1
10
( y 4 j y 4 ) 2
10 1
j 1
10
( y1 j y1 )
(y
j 1
2j
y 2 )
10
(y
j 1
10 1
10 1
3j
y 3 )
10
(y
j 1
4j
y 4 ) 2
10 1
10 1
The (within)
group
variances
(y
1j
j 1
10
y1 ) +
j 1
10
( y 2 j y 2 ) 2
j 3
( y 3 j y 3 ) 2 +
10
( y
i 1 j 1
ij
y i )
10
j 1
( y 4 j y 4 ) 2
Overall mean of
all 40
observations
(grand mean)
4
10 x
(y
i 1
y )
10
ij
i 1 j 1
40
Sum of Squares
Between (SSB).
Variability of the group
means compared to the
grand mean (the
variability due to the
10
( y
i 1 j 1
ij
y )
Total sum of
squares(TSS).
Squared difference
of every observation
from the overall
mean. (numerator of
variance of Y!)
PARTITIONING OF VARIANCE
4
10
i 1 j 1
( y ij y i )
(y
i 1
10x
y )
SSW + SSB =
TSS
10
( y
i 1 j 1
ij
y )
ANOVA TABLE
Source of
variation
Between
(k groups)
Within
Sum of squares
d.f.
k-1
F-statistic
SSB
SSB/k-1
(sum of squared
deviations of group
means from grand
mean)
nk-k
(n individuals per
group)
Total variation
Mean Sum of
Squares
nk-1
SSW
(sum of squared
deviations of
observations from their
group mean)
Go to
SSB
SSW
s2=SSW/nk-k
TSS
(sum of squared deviations of
observations from grand mean)
p-value
k 1
nk k
Fk1,nkk
chart
TSS=SSB + SSW
ANOVA TABLE
Source Degrees Sum of Mean Square Computed
of
of
Squares
f
Variation Freedom
Between
Between
SSB
SSB
k-1
k-1
Error
Error
SSE
SSE
k(n-1)
k(n-1)
SST
nk-1
Total
EXAMPLE
Treatment 1
Treatment 2
Treatment 3
Treatment 4
60 inches
50
48
47
67
52
49
67
42
43
50
54
67
67
55
67
56
67
56
68
62
59
61
65
64
67
61
65
59
64
60
56
72
63
59
60
71
65
64
65
EXAMPLE
Step 1) calculate the
sum of squares between
groups:
Mean for group 1 = 62.0
Mean for group 2 = 59.7
Mean for group 3 = 56.3
Mean for group 4 = 61.4
Grand mean= 59.85
Treatment 1
Treatment 2
Treatment 3
Treatment 4
60 inches
50
48
47
67
52
49
67
42
43
50
54
67
67
55
67
56
67
56
68
62
59
61
65
64
67
61
65
59
64
60
56
72
63
59
60
71
65
64
65
Treatment 1
Treatment 2
Treatment 3
Treatment 4
60 inches
50
48
47
67
52
49
67
42
43
50
54
67
67
55
67
56
67
56
68
62
59
61
65
64
67
61
65
59
64
60
56
72
63
59
60
71
65
64
65
EXAMPLE
(60-62) +(67-62) + (42-62) + (6762)2+ (56-62)2+ (62-62)2+ (64-62)
2
+ (59-62)2+ (72-62)2+ (71-62)2+
(50-59.7)2+ (52-59.7)2+ (43-59.7)
2
+67-59.7)2+ (67-59.7)2+ (69-59.7)
2
+.(sum of 40 squared
deviations) = 2060.6
2
Mean Sum
of Squares
Source of
variation
d.f.
Between
196.5
65.5
Within
36
2060.6
57.2
Total
39
2257.1
F-statistic
1.14
INTERPRETATION of ANOVA:
How much of the variance in height is explained by treatment
group?
2=
COEFFICIENT OF DETERMINATION
SSB
SSB
R
EXAMPLE
SSB
SSB
ANOVA TABLE
Source Degrees Sum of Mean Square Computed
of
of
Square
f
Variation Freedom
s
Between 86049.55
43024.775
Error
10254
1709
96303.55
Total
25.175
(5.) Interpretation
Since we rejected the null hypothesis, we are 95% confident (1-)
that the mean head pressure is not statistically equal for compact,
midsize, and full size cars. However, since only one mean must be
different to reject the null, we do not yet know which mean(s)
is/are different. In short, an ANOVA test will test us that at least
one mean is different, but an additional test must be conducted to
determine which mean(s) is/are different.
EXAMPLE
Susan sound predicts that students will learn most effectively with a constant
background sound, as opposed to an unpredictable sound or no sound at all. She
randomly divides twenty-four students into three groups of eight. All students study a
passage of text for 30 minutes. Those in group 1 study with background sound at a
constant volume in the background. Those in group 2 study with noise that changes
volume periodically. Those in group 3 study with no sound at all. After studying, all
students take a 10 point multiple choice test over the material. Their scores follow:
GROUP
1) constant sound
2) random sound
3) no sound
test scores
7 4 6 8 6 6 2 9
5 5 3 4 4 7 2 2
2 4 7 1 2 1 5 5
x1
x12
x2
x22
x3
x32
49
25
16
25
16
36
49
64
16
36
16
36
49
25
81
Sx12 = 322
4
Sx22 = 148
5
Sx3 = 27
25
Sx32 = 125
Sx1 = 48
(Sx1)2 = 2304
Sx2 = 32
(Sx2)2 = 1024
M1 = 6
M2 = 4
(Sx3)2 = 729
M3 = 3.375
Source SS
df
MS