1. 27-08-2012
Shudhho Chinta: Part 3
Analysis Of VAriance Are the employees in the five different
ANOVA offices equally bad?
Session XVII
Practice problem
The Govt a/c office is interested in seeing whether
similar-sized offices spend similar amounts on
1 way (and 2 way?) ANOVA personnel and equipment. Monthly expenses of 3
Comparing Means of multiple populations offices have been examined: 1 each in agriculture
dept, state dept. and Interior dept. The data
(expense in lakh Rs )from some past months are
given below:
Agriculture: 10 8 11 9 12
State: 15 9 8 10 13 13
Interior: 8 16 12
At 1% significance level, are there differences in
expenses for the different offices?
Splitting the SUM OF SQUARES(SS) Algebra in Splitting the SUM OF SQUARES:
Practice Problem 6
mean s.d n
Agriculture 10 8 11 9 12 10.00 1.58 5
State 15 9 8 10 13 13
( X ij − X ) = ( X ij − X i ) + ( X i − X )
11.33 2.73 6
Interior 8 16 12 12.00 4.00 3
Grand 11 2.602 14
∑ ∑ ( X ij − X ) 2 = ∑ ∑ ( X ij − X i ) 2 + ∑ ∑ ( X i − X )2
2
4×1.582 + 5 ×2.732 + 2×42 = ∑ ( ni − 1) S i + ∑ ni ( X i − X ) 2
Total SS = within group SS + Between group SS
Total SS χ 2
(if H0)
χ
13×2.6022 5×(10-11)2 + 6 ×(11.33-11)2 +3×(12-11)2
n −1
within group SS χ 2
n− k
Between group SS 2
k −1
2
(after dividing by σ ) independent
χ 2
n −1 χ 2
n−k χ 2
k −1
After dividing by d.f.
MSE MS due to ‘group’
1
2. 27-08-2012
Practice Problem
ANOVA TABLE
Between group SS
k -1
Test statistic is = Within group SS = Fk −1,n −k
n -k ANOVA P-value
VAR00001
At α=0.01, the C.R. is TS > 7.21 Sum of
Squares df Mean Square F Sig.
Between Groups 8.667 2 4.333 .601 .565
Observed MSE = (4×1.582 + 5 ×2.732 + 2×42 )/11=7.2121 Within Groups 79.333 11 7.212
MS due to group = [5×(10-11)2 + 6 ×(11.33-11)2 +3×(12-11)2 ]/2=4.33 Total 88.000 13
So observed value of TS = 0.60
So do not reject H0 at α =0.01
Observed value of TS
ANOVA TABLE Three unbiased estimates of σ2
Source of
variation
Sum of squares (SS) Degrees of
freedom
Mean SS F Statistic (under H0)
(df)
Between group k-1
∑ n j ( x j − x ) 2 = SSb
ˆ2
σb =
SS b σ b2
ˆ
= Fk −1,n− k • Usual S2 based on all n observation TSS/(n-1)
k −1 ˆ2
σw
• Pooled estimate
Within group n-k
∑ (n j − 1) S 2 = SS w
j ˆ2
σw =
SS w – SSE/(n-k)
2
n−k • Indirect estimate from σX
– SS due to treatment/(k-1)
TOTAL n-1
∑∑ ( xij − x ) 2 = SST
S2 =
SST
n −1 The last estimate is likely to be large compared to the second
if the null hypothesis is not true
This column does not add up! E (Mean square error/within group)=σ 2 ;
k
Usually not included in the ANOVA table
2
∑ n (µ
i =1
i i − µ )2
E (Mean square between group)=σ + .
k −1
ANOVA:
The Model in ANOVA and
A comparison of three estimates of σ2 estimating the parameters
µ3 µ2 µ1
in the model
Sampling distribution of X
X ij ֏ N ( µ + α i , σ 2 )
µ1=µ2=µ3
Assume temporarily that n1=n2=n3.
µ = X ..
ˆ
( X A − X )2 + ( X S − X )2 + ( X I − X ) 2 σ2 α i = X i. − X ..
ˆ
is an estimate for σ2 =
X
2 ni
σ 2 = MSE
ˆ
2 2 2
n A ( X A − X ) + nS ( X S − X ) + nI ( X I − X )
is an estimate for σ2
2
2
3. 27-08-2012
Post Hoc Analysis
Assumptions in one-way ANOVA Multiple pair-wise comparison
Controversial
• Each population is normal
• Each population has equal variance • Post-Anova analysis: if one rejects H0, then
• Samples are drawn independently from the what ?
different population – Fisher’s LSD: Check if
1 1
| X i − X j | > tν × MSE × +
ni n j
Exercise
• Complete the work on Shudhho Chinta: Pt2,3
3