Professional Documents
Culture Documents
Analysis of Variance
Analysis of Variance
If we have more than 2 groups then we will have to use z test or t test for more than once.
Eg if we have 4 groups
A,B,C,AND D
two at a time
4
( )=6 A with B , A with C , A with D
2
B with C , B with D and C with D
Null hypothesis is
𝑣𝑎𝑟𝑖𝑎𝑛𝑐𝑒 1
Test statistic is F= F is ratio of variances
𝑣𝑎𝑟𝑖𝑎𝑛𝑐𝑒 2
The technique is called as Analysis of variance but we are testing equality of several population
means.
Remember
1
Variance =𝑛 ∑(𝑋𝑖 − 𝑋̅)2
1 1 1 2 𝑛
= ∑(𝑋𝑖 − 𝑋̅)2= ∑(𝑋𝑖 2 − 2𝑋𝑖𝑋̅ + 𝑋̅ 2 )= ∑ 𝑋𝑖 2 − 𝑋̅ ∑ 𝑋𝑖 + 𝑋̅ 2
𝑛 𝑛 𝑛 𝑛 𝑛
1
Variance = 𝑛 ∑ 𝑋𝑖 2 − 𝑋̅ 2
Principles of experimentation
1. Randomization-
2. Replication
3. Local Control
Example
Example- 4 fertilizers A, B, C, D
A A B C C D A
B B C B A B C
D D A A D C B
C C D D B A D
Null hypothesis is
Total ∑ ∑ 𝑋𝑖𝑗 2
𝐺2
Calculate Correction Factor C F=
𝑚𝑛
ANOVA TABLE
Decision rule: if F calculated > F tabulated, then we reject H0, otherwise accept it.
Illustration
There are three training methodologies used for training the new recruits. The methods are used for
a long period, but the performance of the new recruits is not in the same way. Hence it is required to
test the similarity of the result of these three training methods. The scores of the new recruits after
the training is given in the following table
Method 1 45 55 42 58 56 53 58
Method 2 42 49 62 74 58 56 52
Method 3 56 69 68 67 63 65 65
Test at 5% level of significance whether the methods are equally effective in training the new
recruits.
H0: the three training methods are equally effective Or There is no significant difference in the
training methodologies Or µ1=µ2=µ3
Method 1 45 55 42 58 56 53 58
Method 2 42 49 62 74 58 56 52
Method 3 56 69 68 67 63 65 65
Changing origin to 60
Total
Method 1 -15 -5 -18 -2 -4 -7 -2 -53
Method 2 -18 -11 2 14 -2 -4 -8 -27
Method 3 -4 9 8 7 3 5 5 33
Total -47
the three training methods are not equally effective Or There is significant difference in the training
methodologies Or not all µ1=µ2=µ3
Anova: Single Factor
SUMMARY
Groups Count Sum Average Variance
Method 1 7 367 52.42857 40.95238
Method 2 7 393 56.14286 104.1429
Method 3 7 453 64.71429 18.90476
ANOVA
Source of Variation SS df MS F P-value F crit
Between Groups 555.8095 2 277.9048 5.083624 0.017773 3.554557
Within Groups 984 18 54.66667
Total 1539.81 20
Example 2
A marketing campaign was conducted in four metro cities. The number of retail outlets were
different in every metro. We need to test whether the marketing campaign has same effect in all the
metro cities. Use α=5%
H0: marketing campaign has the same effect in all the metro cities
H1: marketing campaign does not have the same effect in all the metro cities
SUMMARY
Groups Count Sum Average Variance
Metro city A 4 878 219.5 3231
Metro city B 4 1056 264 717.3333
Metro City C 3 770 256.6667 529.3333
Metro City D 3 845 281.6667 58.33333
ANOVA
Source of Variation SS df MS F P-value F crit
Between Groups 7475.167 3 2491.722 1.913716 0.191347 3.708265
Within Groups 13020.33 10 1302.033
Total 20495.5 13
:marketing campaign has the same effect in all the metro cities
Examples
1.
2. The four sections appeared for the same test in a subject taught by the same professor. The
scores are as below, test at 5% level of significance if the performance of all the sections is same.
Section A 78 65 66 98 45 85 65 25 14
Section B 89 23 44 45 68 79 92 65 63
Section C 56 48 56 57 84 96 75 80 47
Section D 32 49 66 57 99 80 71 61 59