You are on page 1of 37

Unit- 7

Anova Testing
ANALYSIS OF VARIANCE (ANOVA)
Analysis of Variance is the separation of variance ascribable to one group of courses from the
variance ascribable to the other group. Variation happens in any set of numerical data due to:
(i) Assignable Causes (ii) Chance Causes

Assumptions

• The observations are independent.


• Parent population from which observations are taken are normal.
• Various treatment and environmental effects are additive in nature.
ONE- WAY ANOVA
CLASS SAMPLE OBSERVATIONS TOTAL MEAN
1 X11 X12 ……………………….. X1n1 T1 𝑋1
2 X21 X22 ……………………….. X2n1 T2 𝑋2
. . .
. . .
i Xi1 Xi2 ……………………….. Xin1 Ti=σ 𝑋𝑖𝑗 𝑇𝑖
𝑋ഥ𝑖 =
𝑛𝑖
. . .
. . .
k Xk1 Xk2 ……………………….. Xknk Tk 𝑋𝑘
The total variation in the observations Xij can be split into the following two components:
(i) The variation between the classes or the variation due to different bases of classification
known as Treatments. (Assignable Causes)
(ii) The variation within the classes i.e., the inherent variation of the random variables within
the observations of a class. (Chance Causes)
COMPUTATION OF VARIOUS SUM OF SQUARES

STEP 1 : Compute G ( Grand total of all the observations) = σ 𝑋𝑖𝑗


𝐺2
STEP 2 : Compute Correction Factor =
𝑛
2
STEP 3 : Compute Row Sum of Squares (RSS) = ⅀⅀ 𝑋𝑖𝑗 = Sum of Square of all the
observations
STEP 4 : Compute Total Sum of Squares (TSS) = 𝑆𝑇2 =⅀⅀ 𝑋𝑖𝑗 − 𝑋ത 2= RSS - CF
𝑛
STEP 5 : Compute 𝑇𝑖 = σ𝑗=1
𝑖
𝑋𝑖𝑗
2
𝑇
STEP 6 : Between ( Treatment) Sum of Squares = 𝑆𝑡2 = σ𝑘𝑖=1 𝑖 − 𝐶𝐹
𝑛𝑖

STEP 7 : Within (Error) Sum of Square = 𝑆𝑟2 = TSS – Between SS


𝑠𝑢𝑚 𝑜𝑓 𝑠𝑞𝑢𝑎𝑟𝑒
STEP 8 : Compute Mean Sum of Square =
𝑑.𝑓.
STEP 9 : Compute the critical (tabulated ) value of F for respective d.f. at certain level of
significance
Source of Sum of Square df Mean Sum of Variance Ratio
Variation Square (F)
Between 𝑆𝑡2 k-1 𝑆𝑡
2
F=
𝑠𝑡2
Classes 𝑠𝑡2 = 𝑠𝑟2
𝑘 −1
(Treatment)
Within Classes 𝑆𝑟2 N-k 𝑆𝑟2
(Error ) 𝑠𝑟2 =
𝑁 −𝑘
Total 𝑆𝑇2 N-1
To test the hypothesis that the average number of days a patient is kept in the three local
hospitals say, A, B and C is the same, a random check on the number of days that seven
patients stayed in each hospital reveals the following:
Hospital A : 8 5 9 2 7 8 2
Hospital B : 4 3 8 7 7 1 5
Hospital C : 1 4 9 8 7 2 3
Test the hypothesis at = 0.05.
A trucking company wishes to test the average life of each of the four brands of tyres. The
company uses all brands on randomly selected trucks. The records showing the lives (
thousands of miles) of tyres are given below:

BRAND I BRAND II BRAND III BRAND IV


20 19 21 15
23 15 19 17
18 17 20 16
17 20 17 18
16 16
Test the hypothesis that the average life for each brand of tyres is the same. Assume = 0.01.
Following are the weekly sales records ( in thousand Rs.) of three salesmen A, B and C of a
company during 13 sale-calls.
A 300 400 300 500
B 600 300 300 400
C 700 300 400 600 500
Test whether the sales of three salesmen are different.
A professor whishes to select a good text-book from four different ones available. He has 37
students whom he distributes at random into four groups of 9, 10, 11 and 7 students assigning
the books at random to the groups. After the course is over, all the students take the same test
obtaining scores as follows:
Text A B C D
Explain if any of the four books is to be Books
preferred over the others. Take = 0.05 Score 68 41 54 44
obtained 68 47 44 51
in the
test 69 54 51 69
60 65 56 59
73 32 47 59
64 73 61 55
71 44 59 66
67 48 49
75 64 41
54 61
73
A 68 68 69 60 73 64 71 67 75
B 41 47 54 65 32 73 44 48 64 54
C 54 44 51 56 47 61 59 49 41 61 73
D 44 51 69 59 59 55 66
TWO- WAY ANOVA
Treatments Varieties Row Totals Row Means
1 2 j h
1 X11 X12 …………… X1j ………….. X1h R1 𝑋1.
2 X21 X22 ……………X2j ………….. X2h R2 𝑋2.
. . .
. . .
i Xi1 Xi2 ……………Xij ………….. Xih Ri 𝑋𝑖.

. . .
. . .
k Xk1 Xk2 …………Xkj …………….. Xkh Rk 𝑋𝑘.
Column Total C1 C2 …………….. Cj ………………………. Ch G = ⅀⅀ 𝑋𝑖𝑗

Column Mean 𝑋.1 𝑋.2 ……….. 𝑋.𝑗 …………….. 𝑋.ℎ


The total variation in the observation 𝑋𝑖𝑗 can be split into the following thee components:
1. The variation between the classes due to factor one represented along the k rows of the
table i.e., the variation between the treatments.
2. The variation between the classes due to the other factor represented along the columns
i.e variation between the varieties.
3. The inherent variation within the observation of each class due to combination of a large
number of uncontrolled or extraneous factors of random nature known as chance causes.
COMPUTATION OF VARIOUS SUM OF SQUARES
STEP 1 : Compute G ( Grand total of all the observations) =⅀σ 𝑋𝑖𝑗
𝐺2
STEP 2 : Compute Correction Factor =
𝑛
2
STEP 3 : Compute Row Sum of Squares (RSS) = ⅀⅀ 𝑋𝑖𝑗 = Sum of Square of all the
observations
STEP 4 : Compute Total Sum of Squares (TSS) =⅀⅀ 𝑋𝑖𝑗 − 𝑋ത 2= RSS - CF
1 𝑘 𝑇𝑖.2
STEP 5 : Row ( Treatment) Sum of Squares = σ − 𝐶𝐹
ℎ 𝑖=1 𝑛𝑖
2
1 ℎ 𝑇.𝑗
STEP 6 : Column ( Varieties) Sum of Squares = σ − 𝐶𝐹
𝑘 𝑖=1 𝑛𝑖
STEP 7 : Within (Error) Sum of Square = 𝑆𝑟2 = TSS – Row SS – Column SS
𝑠𝑢𝑚 𝑜𝑓 𝑠𝑞𝑢𝑎𝑟𝑒
STEP 8 : Compute Mean Sum of Square =
𝑑.𝑓.
STEP 9 : Compute the critical (tabulated ) value of F for respective d.f. at certain level of
significance
Source of Variation Sum of Square df Mean Sum of Variance Ratio
Square (F)
Between Row (Treatment) 𝑆𝑟2 k-1 𝑆𝑟
2
F=
𝑠𝑟2
𝑠𝑟2 = 𝑠𝑒2
𝑘 −1
Between Column 𝑆𝑐2 h-1 𝑆𝑐
2
F=
𝑠𝑐2
(Varieties) 𝑠𝑐2 = 𝑠𝑒2
𝑘 −1

Within Classes (Error ) 𝑆𝑒2 (h-1) (k-1) 𝑆𝑒2


𝑠𝑒2 =
𝑁 −𝑘
Total 𝑆𝑇2 hk-1
A farmer applies three types of fertilizer on 4 separate plots. The figure on yield per cre are
tabulated below:

FERTILIZERS PLOTS Total


A B C D

Nitrogen 6 4 8 6 24
Potash 7 6 6 9 28
Phosphates 8 5 10 9 32
Total 21 15 24 24 84

Find out if plots are materially different in fertility, as also, if the three fertilizers make any
material difference in yields.
Five doctors each test five treatments for a certain disease and observe the number of days
each patient takes to recover. The results are as follows(recovery time in days):
Discuss the difference between:
i. The doctors
ii. The treatments. Use = 0.05
DOCTORS TREATMENTS
1 2 3 4 5
1 10 14 23 18 20
2 11 15 24 17 21
3 9 12 20 16 19
4 8 13 17 17 20
5 12 15 19 15 22
Four experimenters determine the moisture content of samples of a powder each man taking
a random sample from each of the six consignments. The assessments are given in the table:
CONSIGNMENT
OBSERVER 1 2 3 4 5 6
1 9 10 9 10 11 11
2 12 11 9 11 10 10
3 11 10 10 12 11 10
4 12 13 11 14 12 10

Perform an analysis of variance on these data and discuss whether there is any significant
difference between consignments or between observers. Use = 0.05
Complete the following ANOVA table and test the hypothesis of homogeneity of
a) Blocks (b) Treatments

SOURCE OF SUM OF d.f. Mean S.S. VARIANCE RATIO


VATIATION SQUARES
BLOCKS 6810 9 - -
TREATMENT 400 4 - -
ERROR - - -
TOTAL 9948 49

You might also like