Lecture Two 2019-2020
Lecture Two 2019-2020
Assumptions
Populations are normally distributed
μ1 μ2 μ3
One-Way ANOVA
(continued)
H0 : μ1 μ2 μ3 μK
H1 : Not all μi are the same
At least one mean is different:
The Null Hypothesis is NOT true
(Variation is present between groups)
or
A B C A B C
Group Group
Small variation within groups Large variation within groups
Sum of Squares Decomposition
Total variation can be split into two parts:
i1 j1
Where:
SST = Total sum of squares
K = number of groups (levels or treatments)
ni = number of observations in group i
xij = jth observation from group i
x = overall sample mean
R esponse, X
K ni
SSW (x ij x i )2
i1 j1
SSW
Summing the variation
within each group and then
MSW
adding over all groups n K
Mean Square Within =
SSW/degrees of freedom
μi
Within-Group Variation
(continued)
R esponse, X
x3
x2
x1
i1
Where:
SSG = Sum of squares between groups
K = number of groups
ni = sample size from group i
xi = sample mean from group i
x = grand mean (mean of all data values)
Between-Group Variation
(continued)
K
SSG ni ( x i x ) 2
i1
SSG
Variation Due to
Differences Between MSG
Groups K 1
Mean Square Between Groups
= SSG/degrees of freedom
μi μj
Between-Group Variation
(continued)
2 2 2
SSG n1(x1 x) n2 (x 2 x) ... nK (x K x)
R esponse, X
x3
x2 x
x1
SSG
MSG
K 1
Where n = sum of the sample sizes from all groups
K = number of populations
One-Way ANOVA Table
Source of SS df MS F ratio
Variation (Variance)
Between SSG MSG
SSG K-1 MSG = F=
Groups K-1 MSW
Within SSW
SSW n-K MSW =
Groups n-K
Total SST = n-1
SSG+SSW
K = 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 = … = μK
H1: At least two population means are different
Test statistic MSG
F
MSW
MSG is mean squares between variances
MSW is mean squares within variances
Degrees of freedom
df1 = K – 1 (K = number of groups)
df2 = n – K (n = sum of sample sizes from all groups)
Interpreting the F Statistic
The F statistic is the ratio of the between
estimate of variance and the within estimate
of variance
The ratio must always be positive
df1 = K -1 will typically be small
df2 = n - K will typically be large
Decision Rule:
Reject H0 if = .05
1 2 3
Club
One-Factor ANOVA Example
Solution
H 0: μ 1 = μ 2 = μ 3 Test Statistic:
H1: μi not all equal
MSA 2358.2
= .05 F 25.275
MSW 93.3
df1= 2 df2 = 12
F2,12,.05 = 3.89
Lecture by:Dr. Lord Mensah
ANOVA -- Single Factor:
Excel Output
EXCEL: data | data analysis | ANOVA: single factor
SUMMARY
Groups Count Sum Average Variance
Club 1 5 1246 249.2 108.2
Club 2 5 1130 226 77.5
Club 3 5 1029 205.8 94.2
ANOVA
Source of
SS df MS F P-value F crit
Variation
Between
4716.4 2 2358.2 25.275 4.99E-05 3.89
Groups
Within
1119.6 12 93.3
Groups
Total 5836.0 14
Multiple Comparisons Between
Subgroup Means
To test which population means are significantly
different
e.g.: μ1 = μ2 ≠ μ3
Done after rejection of equal means in single factor
ANOVA design
Allows pair-wise comparisons
Compare absolute mean differences with critical
range
1= 2 3 x
Two Subgroups
1 1
MSD t α/2sp
n1 n2