Professional Documents
Culture Documents
Chapter 15
Analysis of
Variance
• Assumptions
– Populations are normally distributed
– Populations have equal variances
– Samples are randomly and independently drawn
or
Where:
SST = Total sum of squares
K = number of groups (levels or treatments)
𝑛𝑖 = number of observations in group i
𝑥𝑖𝑗 = 𝑗𝑡ℎ
observation from group i
𝑥 = overall sample mean
Copyright © 2020 Pearson Education Ltd. All Rights Reserved. Slide - 12
Total Sum of Squares (2 of 2)
2 2 2
SST= 𝑥11 − 𝑥 + 𝑥12 − 𝑥 +⋅⋅⋅ + 𝑥𝐾𝑛𝐾 − 𝑥
𝐾 𝑛𝑖
2
SSW = 𝑥𝑖𝑗 − 𝑥lj 𝑖
𝑖=1 𝑗=1
Where:
SSG = 𝑛𝑖 𝑥lj 𝑖 − 𝑥
Where: 𝑖=1
SSG = Sum of squares between groups
K = number of groups
𝑛𝑖 = sample size from group i
𝑥lj 𝑖 = sample mean from group i
𝑥 = grand mean (mean of all data values)
Copyright © 2020 Pearson Education Ltd. All Rights Reserved. Slide - 17
Between-Group Variation (2 of 3)
𝐾
2
SSG = 𝑛𝑖 𝑥lj 𝑖 − 𝑥
𝑖=1
SSG
Variation Due to Differences
MSG =
𝐾−1
Between Groups
Mean Square Between
Groups
SSG
=
degrees of freedom
SSW
MSW =
𝑛−𝐾
SSG
MSG =
𝐾−1
K = number of groups
n = sum of the sample sizes from all groups
df = degrees of freedom
𝐻1 :
At least two population means are different
• Test statistic
MSG
𝐹=
MSW
• Degrees of freedom
– df1 = 𝐾– 1 (K = number of groups)
– df2 = 𝑛– 𝐾 (n = sum of sample sizes from all groups)
Copyright © 2020 Pearson Education Ltd. All Rights Reserved. Slide - 22
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 = 𝐾 − 1 will typically be small
– df2 = 𝑛 − 𝐾 will typically be large
Decision Rule:
• Reject 𝐻0 if
𝐹 > 𝐹𝐾−1,𝑛−𝐾,𝛼
𝑥lj 1 = 249.2 𝑥lj 2 = 226.0 𝑥lj 3
= 205.8
𝑥 = 227.0
Copyright © 2020 Pearson Education Ltd. All Rights Reserved. Slide - 25
One-Factor ANOVA Example
Computations
𝑥1 = 249.2 𝑛1 = 5
𝑥2 = 226.0 𝑛2 = 5
𝑥3 = 205.8 𝑛3 = 5
𝑥 = 227.0 𝑛 = 15
𝑘=3
2 2 2
SSG = 5 249.2 − 227 + 5 226 − 227 + 5 205.8 − 227 = 4716.4
2
SSW = 254 − 249.2 + 263 − 249.2 2 +. . . + 204 − 205.8 2
= 1119.6
4716.4
MSG = = 2358.2
3−1 2358.2
𝐹= = 25.275
1119.6 93.3
MSW = = 93.3
15 − 3
Copyright © 2020 Pearson Education Ltd. All Rights Reserved. Slide - 26
One-Factor ANOVA Example Solution
𝐻0 : 𝜇1 = 𝜇2 = 𝜇3
Test Statistic:
𝐻1 : 𝜇𝑖 not all equal
MSA 2358.2
𝐹= = = 25.275
α = .05 MSW 93.3
df1 = 2 df2 = 12
Decision:
Reject 𝐻0 at α = 0.05
Conclusion:
There is evidence
that at least one
𝜇𝑖 differs from the rest
𝑥lj 1 − 𝑥lj 2 Compare:
Is 𝑥lj 𝑖 − 𝑥𝑗lj > MSD 𝐾 ?
𝑥lj 1 − 𝑥lj 3
If the absolute mean difference is greater than
𝑥lj 2 − 𝑥lj 3 MSD then there is a significant difference
etc. . . between that pair of means at the chosen level
of significance.
𝑥lj 1 − 𝑥lj 2 = 23.2
Since each difference is greater
𝑥lj 1 − 𝑥lj 3 = 43.4 than 9.387, we conclude that all
three means are different from
𝑥lj 2 − 𝑥lj 3 = 20.2 one another at the .05 level of
significance.
𝐾
12 𝑅𝑖2
𝑊= −3 𝑛+1
𝑛 𝑛+1 𝑛𝑖
𝑖=1
where:
Decision rule
– Reject 𝐻0 if 𝑊 > 𝜒 2 𝐾−1,𝛼
• The W statistic is
𝑘
12 𝑅𝑖2
𝑊= −3 𝑛+1
𝑛 𝑛+1 𝑛𝑖
𝑖=1
2
= 5.991
2,0.05
reject H0
xlj •𝑗 j = 1,2, … , 𝐻
SS𝐺
MSG =
𝐾−1
SS𝐵
MSB =
𝐻−1
SSE
MSE =
𝐾−1 𝐻−1
SS𝐺
MSG =
𝐾−1
SS𝐵
MSB =
𝐻−1
SSI
MSI =
𝐾−1 𝐻−1
SSE
MSE =
𝐾𝐻 𝑚 − 1