BIOSTATISTICS ANOVA .BEST WAYS TO SOLVE ONE WAY AND TWO WAY ANOVA.SHORTCUT METHOD FOR ANOVA.pptx
1. BIOSTATISTICS
ONE WAY AND TWO WAY ANOVA
By Mr Payaam Vohra
NIPER AIR 11
Gold Medalist in MU
MET AIR 07
ICT MTECH SCORE RANK 01
CUET-PG AIR 01
IIT BHU AIR 08
GPAT AIR 43
GATE AND BITS HD QUALIFIED
2. IV B.PHARMACY (BIO STATISTICS)
ANALYSIS OF VARIANCE (ANOVA)
INTRODUCTION:
Analysis of variance is an important method to test the significance
difference between the sample mean.
Previously, we used t –test for testing the significance difference
between Two sample means, but when we have more than two sample then we
have to use the technique of ANOVA.
Example: Five fertilizers are applied to four plots, each plot consisting of yield
of rice then we have to test whether the effected of fertilizers on the plots is
significantly different (or) not.
ANOVA technique is introduced by R.A. Fisher (Father of statistics) in the
year 1920.
Assumption of ANOVA:
To apply the ANOVA technique the following assumptions must be made.
1. All the observations are Independent.
2. All group variances are Equal.
3. Parent population is Normal.
4. Environmental effects are additive in Nature.
To test the equality of several means by ANOVA technique. we have the
following methods.
(1) ANOVA One-way classification
The Technique of testing several means by analyzing the total variance in
one direction is called ANOVA One-way classification
STATISTICAL ANALYSIS OF ONE-WAY CLASSIFICATION:
Total Sum of Square (T.S.S) = Group Sum of Square (G.S.S) + Error Sum of
Square (E.S.S)
i.e., T.S.S = G.S.S + E.S.S
ST = SG + SE
2 2 2
3. IV B.PHARMACY (BIO STATISTICS)
ij
Steps for Computation:
1) Find the sum of values of all the items of all the samples
k ni
G = Grand Total = xij = Ti. = T. j
i=1 j=1
G2
2) Calculation of Correction Factor (C.F ) =
N
(Where N is the number of observation in all the samples)
3) Find out the T.S.S(S 2
T
)
k ni
T.S.S = 2
x Correction Factor C.F
( )
i=1 j=1
k ni G2
T.S.S = 2
x
ij
i=1 j=1 N
T 2 G2
Row wise data]
4) Find Out the G.S.S (S 2
G
)
G.S.S = i.
[
ni N
(OR)
T 2
G2
G.S.S = . j
[ Column wise data]
nj N
5) Find out the E.S.S (S 2
E
)
E.S.S = T.S.S – G.S.S
S2
E = S2
T S2
G
HYPOTHESIS:
Null hypothesis (H0): The group means are equal (or) There is no difference
between the group means.
i.e., H0 : 1 = 2 = 3 = ...........= k
Alternative hypothesis (H1): The group means are not equal (or) There is
difference between the group means.
4. E T G
S
S
IV B.PHARMACY (BIO STATISTICS)
Degrees of Freedom (d.f):
i. Total Sum of Squares (T.S.S) follows (N-1) d.f.
ii. Group Sum of Squares (G.S.S) follows (k-1) d.f.
iii. Error Sum of Squares (E.S.S) follows (N-k) d.f.
Since,
S 2 = S 2
+ S 2
T G E
S 2 = S 2 S 2
= N 1 k + 1
= N k
Mean Sum of Squares (M.S.S): Sum of Squares divided by its respective
degrees of freedom (d.f) is called Mean sum of squares (M.S.S):
2
2
T
1) M .S.S due to Total (s ) = T
N 1
S 2
2) M .S.S due to Group (s2
G ) = G
k 1
2
2
E
3) M .S.S due to Error (s )
ANOVA ONE WAY TABLE:
= E
N k
S. No Sourc
e of
Variat
ion
d.f S. S M.S. S F - Test
1 Group k-1 S 2
G
2 S
2
sG = G
k
1
s
G
2
F = ~ F (k 1, N k )
s 2
E
2 2
if sG >sE
(OR)
F = sE
2
~ F (N k,k 1)
s 2
G
2 2
if sE >sG
2 Error N-k S 2
E
2 S
2
sE
= E
N k
3 Total N-1 S 2
T
2 S
2
sT = T
N 1
INFERENCE: If FCal Ftab thenAccept H0
i.e., All group means are equal.
Otherwise, FCal > Ftab then Reject H0 (Or) Accept H1
i.e., All group means are not equal.
5. IV B.PHARMACY (BIO STATISTICS)
PROBLEMS ON ANOVA ONE WAY CLASSIFICATION
Problem-1: A test was given to 5 students taken at random from
V class students of 3 schools of a town. The individual scores
are:
Sample- 1 9 7 6 5 8
Sample-2 7 4 5 4 5
Sample-3 6 5 6 7 6
Find out whether the means of the three samples differ significantly
or Not?
Null Hypothesis: There is no significant difference in the means of
the three samples. i.e., H0 : 1 = 2 = 3
Alternative Hypothesis: There is significant difference in the means
of the three sample.
LOS: Tabulated value of F at 5% level for (2,12) d.f is 3.89
Steps for Computation:
observations Ti. T 2
i.
ni
Sample- 1 9 7 6 5 8 35 (35)2
= 245
5
Sample- 2 7 4 5 4 5 25 (25)2
=125 5
Sample- 3 6 5 6 7 6 30 (30)2
=180 5
G = 90 T 2
=
i. 550
ni
6. IV B.PHARMACY (BIO STATISTICS)
ij
1. Find the sum of values of all the items of all the samples
k ni
G = Grand Total = xij = 9+ 7 + 6 +5+8+7 + 4 +5+ 4 +5+6 +5+6+ 7 + 6
i=1 j=1
= 90
2. Calculation of correction factor
G2 (90)2
15
i.e., C.F =
N
= = 540
Where N is the number of observations in all the samples
3.T.S.S = 2
x Correction Factor C.F
( )
k ni
i=1 j=1
k ni G 2
T.S.S = 2
x
ij
i=1 j=1
N
= (92 +72 +62 +52 +82 +72 + 42 +52 +42 +52 +62 +52 +62 +72 +62
) (540)
= (568) (540)
= 28
(Where N is the number of items in all the samples)
T 2 G2
4. G.S.S =
i.
ni N
= 550 540
=10
5. E.S.S = T.S.S G.S.S
= 28 10
=18
7. IV B.PHARMACY (BIO STATISTICS)
ANOVA ONE WAY TABLE:
60
S.
No
Source of
Variation
d.f S. S M.S. S F - Test
1 Group 3-1=2 S 2 =10
G
s 2
=
10
= 5
G
2
s 2
F = G
~ F (k 1,N k)
s 2
E
if S2
>
S2
G
E
=
5
~ F
(2,12)
1.5
= 3.33 ~ F(2,12)
2 Error 15-3=12 S 2 =18
E
s 2 =
18
=1.5
E
12
3 Total 15-1=14
ST 2 28
INFERENCE:
Inference: If FCal < Ftab
3.33 < 3.89 then Accept Null hypothesis
i.e., All group means are equal.
Problem-2: Three samples of barely were sown in 7 plots each and the following
yield in quintals per acre were obtained. Analyze the data and find out whether
there is a significant difference between the mean yield of the three samples.
Samples
Plots A B C
1 8 7 6
2 10 7 8
3 6 8 10
4 7 9 6
5 9 8 4
6 - 5 5
7 - - 7
8. IV B.PHARMACY (BIO STATISTICS)
Solution:
1. Null Hypothesis: There is no significant difference in the means
of the three sample
. i.e., H0 : 1 = 2 = 3
2. Alternative Hypothesis: There is significant difference in the
means of the three sample.
3. LOS: Tabulated value of F at 5% level for (2,15) d.f is 3.68
Steps for Computation:
Samples
Plots A B C
1 8 7 6
2 10 7 8
3 6 8 10
4 7 9 6
5 9 8 4
6 - 5 5
7 - - 7
T. j
40 44 46
T 2
. j
nj
(40)2
=
320
5
(44)2
=
322.67
6
(46)2
=
302.29
7
T2
. j = 944.96
nj
1. Find the sum of values of all the items of all samples
k ni
G = xij = 8+10 + 6 + 7 + 9 + 7 + 7 + 8+ 9 +8+ 5+ 6 +8+10+ 6 + 4 + 5 + 7
i=1 j=1
= 130
2. Calculation of correction factor
G2 (130)2
18
i.e.,C.F =
N
= = 938.89
Where N is the number of observation in all the samples
9. IV B.PHARMACY (BIO STATISTICS)
k ni
3.T.S.S = ij
2
x Correction Factor C.F
( )
i=1 j=1
k ni
2
G
T.S.S = 2
x
ij
i=1 j=1
N
= (82 +102 + 62 + 72 + 92 + 72 + 72 + 82 + 92 + 82 + 52 + 62 + 82 +102 + 62 + 42 + 52 + 72
) (938.59)
= (988) (938.89)
= 49.11
T 2 G2
4. G.S.S =
i.
ni N
= 944.96 938.89
= 6.07
5. E.S.S = T.S.S G.S.S
= 49.11 6.07
= 43.04
ANOVA ONE WAY TABLE:
S.
No
Source of
Variation
d.f S. S M.S. S F - Test
1 Group 3-1=2
SG 2
6
.07
s 2 =
6.07
= 3.04
G
2
s 2
F = G
~ F (k 1,N k)
s 2
E
if s2
> s2
G E
=
3.04
~ F(2,15)
2.87
=1.06 ~ F(2,15)
2 Error 18-3=15 S 2 = 43.0
E
4 s 2 =
43.04
= 2.87
E
15
3 Total 18-1=17
ST 2
4
9.1
1
Inference: If FCal < Ftab
1.06 < 3.68then Accept Null hypothesis
i.e., All group means are equal.
(OR)
There is no significant difference in the means of the three samples.
10. ij
IV B.PHARMACY (BIO STATISTICS)
(2) ANOVA Two-way classification
The Technique of testing several means by analyzing the total variance in
two direction is called ANOVA Two-way classification
STATISTICAL ANALYSIS OF TWO-WAY CLASSIFICATION:
Total Sum of Square (T.S.S) = Row Sum of Square (R.S.S) + Column Sum of
Square (C.S.S) + Error Sum of Squares (E.S.S)
i.e., T.S.S = R.S.S +C.S.S+ E.S.S
S 2 = S 2 + S 2
+ S 2
T R C E
Steps for Computation:
1) Find the sum of values of all the items of all the samples
k n
G = Grand Total = xij
i=1 j=1
G2
2) Calculation of Correction Factor (C.F ) =
N
(Where N = n k is the number of
3) Find out theT.S.S (S 2
T
)
observation in all the samples)
T.S.S =
k n
2
x Correction Factor C.F
( )
i=1 j=1
k n
2 G2
T.S.S = xij
N
i=1 j=1
T2 G2
4) Find Out the R.S.S (S 2
R
)
R.S.S = i
[ For Treatments]
n N
&
T 2
G2
5) Find out the C.S.S = j
[ For Varities]
k N
11. IV B.PHARMACY (BIO STATISTICS)
6)Find out the E.S.S (S 2
E
)
E.S.S = T.S.S – R.S.S C.S.S
S2
E = S2
T S2
R S2
C
HYPOTHESIS:
(I) For Treatments:
(1) Null hypothesis (H01): There is no difference between the treatments
means. i.e., H01 : 1 = 2 = 3 = .......... = k
(2) Alternative hypothesis (H11): There is difference between treatment
means.
(II) For Varieties:
(i)Null hypothesis(H02): There is no difference between the varieties
means
i.e., H02 : 1 = 2 = 3 = ..........= k
(ii)Alternative Hypothesis(H12): There is difference between
Varieties means.
12. IV B.PHARMACY (BIO STATISTICS)
ANOVA TWO WAY TABLE:
S.
No
Source of
Variation
d.f S.
S
M.S. S F - Test
1 Treatments k-1 S 2
R
2 S 2
sR = G
k
1
For Treatments :
F = s
R
2
~ F ((k 1),(n 1)(k
1))
s 2
E
if sR2 > sE2
(or)
F = s
E
2
~ F ((n 1)(k 1),(k
1
))
s 2
R
f s 2 > s 2
E R
For Varieties :
F = s
C
2
~ F ((n 1),(n 1)(k
1))
s 2
E
if s 2 > s 2
C E
(or)
F = s
E
2
~ F ((n 1)(k 1),(n
1
))
s 2
C
if s 2 > s 2
E C
(rows)
2 Varieties n-1 S 2
C
2
s 2 =
SC
C n 1
(columns)
3 Error (n- S 2
E
2
s 2
=
SE
E
(n 1)(k
1)
1)
(k-1)
4 TOTAL N-1 S 2
T
-
INFERENCE:
(I) For Treatments:
If FCal Ftab then Accept H01, Otherwise Reject H01
(II) For Varieties:
If FCal Ftab then Accept H02, Otherwise Reject H02
13. IV B.PHARMACY (BIO STATISTICS)
PROBLEMS ON TWO WAY CLASSIFICATION
PROBLEM-1: The following table gives the figures of monthly draw in acidity
level and chlorine concentration in lake water. Apply two-way classification of
analysis of variance and interpret your results?
ACIDITY LEVEL
CHLORINE Low Medium High Very high
Low 22 19 9 7
Medium 11 11 8 4
High 9 10 6 4
Solution:
For ACIDITY:
Null hypothesis: There is no significance difference in acidity level and the
different concentrations of Chlorine.
Alternative hypothesis: There is significance difference in acidity level and the
different concentrations of Chlorine.
For CHLORINE CONCENTRATION:
Null hypothesis: There is no significance difference in the Chlorine
concentrations and different acidity level.
Alternative Hypothesis: There is significance difference in the Chlorine
concentrations and different acidity level.
Acidity
Chlorine Low Medium High Very
high
Ti.
2
Ti.
n
Low 22 19 9 7 57 812.25
Medium 11 11 8 4 34 289
High 9 10 6 4 29 210.25
T.j 42 40 23 15 G=120 1311.5
2
T.j
k
588 533.33 176.33 75 1372.66
14. IV B.PHARMACY (BIO STATISTICS)
ij
v
E T t v
CALCULATION :
N = Number of Observation = 12
G = Grand Total =120
Correction factor = G2
= 1200
N
T.S.S = 2
y CF =1530 1200 = 330
2
Sum of squres for treatments = St =
2
Sum of sqaures for Varities = S =
CF =1311.5 1200 =111.5
n
CF =1372.66 1200 =172.66
k
S 2 = S 2 S 2 S 2 = 330 111.5 172.66 = 4
5
.
8
4
S.NO Source of
variation
df S. S MSS F-Ratio
1 treatments 2 111.5 55.75 FCal =4.86~F
(2,6)
AND
FCal =
7.53~F
(3,6)
2 verities 3 172.66 57.55
3 Errors 6 45.84 7.64
4 TOTAL 11 330
CONCLUSSION:
For Aciditylevel:
If FCal >FTab
i.e., 7.29 >5.14then we reject null hypothesis(or) Accept alternativehypothesis
Thereis significancedifferenceinacidity level and the different concentrationsof Chlorine.
For ChlorineConcentration:
If FCal >FTab
i.e., 7.53 > 4.76 then we reject null hypothesis(or) Accept alternativehypothesis
Thereis significancedifferencein theChlorineconcentrationsand different acidity level.
Ti.
2
T. j
2