You are on page 1of 15

One way ANOVA

Source of Sum of Degrees of Mean Sum of F-ratio


Variation Squares Freedom Square
Between SSC C- 1 MSC = SSC MSC
Samples C- 1 MSE
Within Samples SSE N- C MSE = SSE
N- C
Total SST N- 1
Example 1
The following table gives the results of three different medicines administrated for a
skin disease

A B C
25 20 30
22 24 35
26 30 19
20 22 18
18 20 21
Find out whether the response of the patient varies significantly for
different medicines at 5% level of significance
H0 = There is no significant difference in the response to different medicines
H1 = There is a significant difference in the response to different medicines
N= 15 (Number of elements in the table)

Calculation for ANOVA

Sample A Sample B Sample C


X1 X12 X2 X22 X3 X32
25 625 20 400 30 900
22 484 24 576 35 1225
26 676 30 900 19 361
20 400 22 484 18 324
18 324 20 400 21 441
ΣX2 = Σ X 32
ΣX1= 111 ΣX12= 2509 116 ΣX22 = 2760 Σ X3 =123 =3251
(1) Sum of All items of Samples (T)
= ΣX1 + ΣX2 + Σ X3
111 + 116 + 123 = 350

(2) Correction Factor


(T)2 = (350)2 = 8167
N 15

(3) Total Sum of Squares (SST)


ΣX12 + ΣX22 + Σ X32 - (T)2
N
= 2509 + 2760 + 3251 - 8167 = 353

(4) Sum of Squares between Samples (SSC)


(ΣX1)2 + (ΣX2)2 + ( Σ X3)2 - (T)2
N1 N2 N3 N
(111)2 + (116)2 + (123)2 - 8167
5 5 5
= 2464 + 2691 + 3026 – 8167 = 14

(5) Sum of Squares within Samples (SSE)


SST – SSC = 353 – 14 = 339
ANOVA Table
Source of Sum of Degrees of Mean Sum of F-ratio
Variation Squares Freedom Square
(1) (2) (3) (4) = (2) / (3)
Between Samples 14 3- 1 = 2 14/2 = 7 7 / 28.25
Within Samples 339 15- 3 = 12 339/12 = = 0.24
28.25
Total 353 14

Degrees of freedom (between variables)


V1 = (k -1) = (3-1) 2
Degrees of freedom (within variables)
V2 = k (n-1) = 3 (5-1) = 12.
k = Number of columns and n = Number of rows

Table value of F for V1 = 2 and V2 = 12 at 5% significant level is 3.88


As F calculated is < the table value, H0 is accepted
Conclusion: There is no significant difference in the response to different medicines
F- Distribution table (sig level at 1%)
Two- way ANOVA Table

Sum of Squares Degrees of Mean Squares


Sources of Variation Freedom
Between Columns SSC (c-1) SSC / (c-1)
Between Rows SSR (r-1) SSR/ (r-1)
Residual SSE (c-1) (r-1) SSE/ (c-1) (r-1)
Total SST N- 1
Example 1:
The following table shows the number of defectives produced by four workers
working on four different machines

Machines Workers Total


1 2 3 4
1 20 22 20 13 75
2 30 25 32 22 109
3 15 18 22 32 87
4 21 23 25 27 96
Total 86 88 99 94 367

Can we conclude that the difference in production is due to performance of


workers on different machines? Test at 5% significant level
Solution
Hypothesis 1 (for workers)
H0 = Variation in production is not due to variation in performance of
workers
H1 = Variation in production is due to variation in performance of
workers
Hypothesis 2 (for machines)
H0 = Variation in production is not due to variation in performance of
machines
H1 = = Variation in production is due to variation in performance of
machines

N= 16 (Number of elements in the table)


Calculation for ANOVA
Sample A Sample B Sample C Sample D
X1 X12 X2 X22 X3 X32 X4 X42
20 400 22 484 20 400 13 169
30 900 25 625 32 1024 22 484
15 225 18 324 22 484 32 1024
21 441 23 529 25 625 27 729
ΣX12 ΣX22 Σ X3 Σ X 32 Σ X4 ΣX42
ΣX1= 86 =1966 ΣX2= 88 =1962 = 99 =2533 = 94 = 2406
(1) Sum of All items of Samples (T)
= ΣX1 + ΣX2 + Σ X3 + Σ X4
86 + 88 + 99 + 94 = 367
(2) Correction Factor
(T)2 = (367)2 = 8418
N 16
(3) Total Sum of Squares (SST)
ΣX12 + ΣX22 + Σ X32 + Σ X42 - (T)2
N
= 1966 + 1962 + 2533 + 2406 - 8418 = 449

(4) Sum of Squares between Samples (SSC) – Workers


(ΣX1)2 + (ΣX2)2 + ( Σ X3)2 + ( Σ X4)2 - (T)2
N1 N2 N3 N4 N
(86) 2 + (88) 2 + (99) 2 + (94) 2 - 8418
4 4 4 4
= 1849 + 1936 + 2450 + 2209 – 8418 = 26
(5) Sum of Squares between machines (SSR)
(75)2 + (109)2 + (87) 2 + (96)2 - 8418
4 4 4 4
1406 + 2970 + 1892 + 2304 – 8418 = 155
ANOVA Table

Sum of Degrees of Mean Sum of F-ratio


Source of Squares Freedom Square
Variation (2) (3) (4) = (2) / (3)
(1)
Between Samples 26 4- 1 = 3 26/3 = 8.66 8.66/29.77 =
0.29
Within Samples 155 4-1 = 3 155/3 = 51.66 51.66/29.77 =
1.73
Residual 268 (4-1) (4-1) = 9 268/9= 29.77
Total 449 15
For workers
F Calculated = 0.29
Table value of F for V1 = 3 and V2 = 9 at 5% significant level is 3.86
As F calculated is < the table value, H0 is accepted

Conclusion: Variation in production is not due to variation in performance of workers

For machines

F Calculated = 1.73
Table value of F for V1 = 3 and V2 = 9 at 5% significant level is 3.86
As F calculated is < the table value, H0 is accepted

Conclusion: Variation in production is not due to variation in performance of machines

You might also like