Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Jigyasu Gaur
Assumptions
Populations are normally distributed : or CLT
applies
Populations have equal variances
Samples are randomly and independently
drawn
H0 : 1 2 3 c
Why ANOVA?
We could compare the means, one by one using t-tests
for difference of means.
Problem: each test contains type I error
k
The total type I error is
1 1 where k is the
number of comaprisons.
For example, if there are 5 means and you use =.05, you
must make 10 two by two comparisons. Thus, the type
I error is 1-(.95)10, which is .59. That is, 59% of the time
you will reject the null hypothesis of equal means in
favor of the alternative!
One-Way ANOVA
H0 : 1 2 3 c
H1 : Not all i are the same
All Means are the same:
The Null Hypothesis is True
(No Treatment Effect)
1 2 3
One-Way ANOVA
H0 : 1 2 3 c
H1 : Not all i are the same
At least one mean is different:
The Null Hypothesis is NOT true
(Treatment Effect is present)
or
1 2 3
1 2 3
(continued)
Variation Due to
Factor (SSA)
nj
SST ( Xij X)
Where:
j1 i 1
Total Variation
(continued)
X
G ro u p 1
G ro u p 2
G ro u p 3
Among-Group Variation
SST = SSA + SSW
c
SSA n j ( X j X)2
Where:
j1
Among-Group Variation
(continued)
c
SSA n j ( X j X)2
j 1
Variation Due to
Differences Among Groups
SSA
MSA
c 1
Mean Square Among =
SSA/degrees of freedom
Among-Group Variation
(continued)
SSA n1 ( x1 x ) n2 ( x 2 x ) ... nc ( x c x )
2
Response, X
X3
X1
G ro u p 1
G ro u p 2
X2
G ro u p 3
Within-Group Variation
SST = SSA + SSW
c
SSW
j 1
nj
i 1
( Xij X j )
Where:
Within-Group Variation
(continued)
c
SSW
j1
nj
i 1
( Xij X j )2
SSW
MSW
nc
Mean Square Within =
SSW/degrees of freedom
Within-Group Variation
(continued)
Response, X
X1
G ro u p 1
G ro u p 2
X2
G ro u p 3
X3
SS
df
Among
Groups
SSA
c-1
Within
Groups
SSW
n-c
SST =
SSA+SSW
n-1
Total
MS
(Variance)
F ratio
SSA
MSA
MSA =
c - 1 F = MSW
SSW
MSW =
n-c
c = number of groups
n = sum of the sample sizes from all groups
df = degrees of freedom
One-Factor ANOVA
F Test Statistic
H0: 1= 2 = = c
H1: At least two population means are different
Test statistic
MSA
F
MSW
Degrees of freedom
df1 = c 1
(c = number of groups)
df2 = n c
Decision Rule:
Reject H if F > F ,
0
U
otherwise do not
reject H0
= .05
Do not
reject H0
Reject H0
FU
One-Factor ANOVA
F Test Example
You want to see if three
different golf clubs yield
different distances. You
randomly select five
measurements from trials on
an automated driving
machine for each club. At
the .05 significance level, is
there a difference in mean
distance?
Club 1
254
263
241
237
251
Club 2
234
218
235
227
216
Club 3
200
222
197
206
204
Club 2
234
218
235
227
216
Club 3
200
222
197
206
204
Distance
270
260
250
240
230
220
210
X1
X2
200
190
1
2
Club
X
X3
Club 2
234
218
235
227
216
Club 3
200
222
197
206
204
X1 = 249.2
n1 = 5
X2 = 226.0
n2 = 5
X3 = 205.8
n3 = 5
X = 227.0
n = 15
c=3
SSA = 5 (249.2 227)2 + 5 (226 227)2 + 5 (205.8 227)2 = 4716.4
SSW = (254 249.2)2 + (263 249.2)2 ++ (204 205.8)2 = 1119.6
2358.2
F
25.275
93.3
H0: 1 = 2 = 3
H1: i not all equal
= .05
df1= 2
df2 = 12
Critical
Value:
FU = 3.89
= .05
Do not
reject H0
Reject H0
FU = 3.89
MSA 2358.2
F
25.275
MSW
93.3
Decision:
Reject H0 at = 0.05
Conclusion:
There is evidence that
at least one i differs
F = 25.275
from the rest
Count
Sum
Average
Variance
Club 1
1246
249.2
108.2
Club 2
1130
226
77.5
Club 3
1029
205.8
94.2
ANOVA
Source of
Variation
SS
df
MS
Between
Groups
4716.4
2358.2
Within
Groups
1119.6
12
93.3
Total
5836.0
14
F
25.275
P-value
4.99E-05
F crit
3.89
Thank You