Professional Documents
Culture Documents
Chapter 11
Analysis of Variance
Assumptions
Populations are normally distributed
Populations have equal variances
Samples are randomly and independently drawn
H0 : μ1 μ2 μ3 μK
All population means are equal
i.e., no variation in means between groups
μ1 μ2 μ3
Statistics for Business and Economics, 6e © 2007 Pearson Education, Inc.
One-Way ANOVA
(continued)
H0 : μ1 μ2 μ3 μK
H1 : Not all μi are the same
or
μ1 μ2 μ3 μ1 μ2 μ3
Statistics for Business and Economics, 6e © 2007 Pearson Education, Inc.
Variability
The variability of the data is key factor to test the
equality of means
In each case below, the means may look different, but a
large variation within groups in B makes the evidence
that the means are different weak
A B
A B C A B C
Group Group
Small variation within groups Large variation within groups
Statistics for Business and Economics, 6e © 2007 Pearson Education, Inc.
Partitioning the Variation
Total variation can be split into two parts:
Where: i 1 j 1
Re s p o n s e , X
i 1 j 1
Where:
SSW = Sum of squares within groups
K = number of groups
ni = sample size from group i
Xi = sample mean from group i
Xij = jth observation in group i
Statistics for Business and Economics, 6e © 2007 Pearson Education, Inc.
Within-Group Variation
(continued)
K ni
SSW (x ij x i )2
i 1 j 1
SSW
Summing the variation
within each group and then
MSW
adding over all groups n K
Mean Square Within =
SSW/degrees of freedom
μi
Statistics for Business and Economics, 6e © 2007 Pearson Education, Inc.
Within-Group Variation
(continued)
2 2 2
SSW (x11 x1 ) (x12 x1 ) ... (x KnK x K )
Re s p o n s e , X
x3
x2
x1
G rou p 1 G rou p 2 G ro u p 3
Statistics for Business and Economics, 6e © 2007 Pearson Education, Inc.
Between-Group Variation
SST = SSW + SSG
K
SSG ni ( x i x ) 2
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)
Statistics for Business and Economics, 6e © 2007 Pearson Education, Inc.
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
2 2 2
SSG n1(x1 x) n2 (x 2 x) ... nK (x K x)
Re s p o n s e , X
x3
x
x2
x1
SST
MST
n 1
SSW
MSW
n K
SSG
MSG
K 1
Source of SS df MS F ratio
Variation (Variance)
Between SSG MSG
SSG K-1 MSG =
Groups K - 1 F = 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
Degrees of freedom
df1 = K – 1 (K = number of groups)
df2 = n – K (n = sum of sample sizes from all groups)
Decision Rule:
Reject H0 if = .05
1 2 3
Statistics for Business and Economics, 6e © 2007 Pearson Education, Inc. Club
One-Factor ANOVA Example
Computations
Club 1 Club 2 Club 3 x1 = 249.2 n1 = 5
254 234 200
x2 = 226.0 n2 = 5
263 218 222
241 235 197 x3 = 205.8 n3 = 5
237 227 206 n = 15
251 216 204 x = 227.0
K=3
SSG = 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
Assumptions
Populations are normally distributed
Populations have equal variances
Independent random samples are
drawn
Let xji denote the observation in the jth group and ith
block
Suppose that there are K groups and H blocks, for a
total of n = KH observations
Let the overall mean be x
Denote the group sample means by
x j (j 1,2,,K)
Variation due to
Total Sum of
Squares (SST) = differences between
groups (SSG)
+
Variation due to
differences between
blocks (SSB)
+
The error terms are assumed Variation due to
to be independent, normally random sampling
distributed, and have the same (unexplained error)
variance
(SSE)
Statistics for Business and Economics, 6e © 2007 Pearson Education, Inc.
Two-Way Sums of Squares
The sums of squares are Degrees of
Freedom:
K H
Total : SST (x ji x)2 n–1
j 1 i 1
K
Between - Groups : SSG H (x j x)2 K–1
j 1
H
Between - Blocks : SSB K (x i x)2 H–1
i 1
K H
Error : SSE (x ji x j x i x)2 (K – 1)(K – 1)
j 1 i1
K
Between - groups : SSG HL (x j x)2 K–1
j 1
H
Between - blocks : SSB KL (x i x)2 H–1
i 1
K H
Interactio n : SSI L (x ji x j x i x)2 (K – 1)(H – 1)
j 1 i1
SSE
MSE
KH(L 1)
Statistics for Business and Economics, 6e © 2007 Pearson Education, Inc.
Two-Way ANOVA:
The F Test Statistic
F Test for group effect
H0: The K population group
means are all the same MSG Reject H0 if
F
MSE
F > FK-1,KH(L-1),
F Test for block effect
H0: The H population block
means are the same MSB Reject H0 if
F
MSE F > FH-1,KH(L-1),
MSI MSI
Interaction SSI (K – 1)(H – 1)
= SSI / (K – 1)(H – 1) MSE
MSE
Error SSE KH(L – 1)
= SSE / KH(L – 1)