Sei sulla pagina 1di 44

Biostatistics

Tutorials Tutorial # 8 Analysis of Variance [ANOVA]

Inferential Statistics
Test of Validity
Coefficient of Variation

Confidence Limits Tests of Significance


Regression

Correlation

Interpretation

Analysis

Comparison of Means of Groups


2 means

> 2 means (i.e. 3 or more means)


Analysis of Variance (ANOVA)
One-way ANOVA
(1 factor)

Student's t-test
Unpaired Data
(2 groups)

Paired Data
(1 group)

Two-way ANOVA
(2 factors)

ANOVA
Purpose
To compare between > 2 groups of data & determine whether : The difference between these groups is significant or non-significant

ANOVA : Types
Group A Group B Group C Comparison in terms of :

One Factor One-way ANOVA


e.g Effect of drugs on BP

Two Factors Two-way ANOVA


e.g Effect of drugs & food on BP

Why ANOVA not multiple t-tests ?


Group A
1 3

Group B
2

Group C

Probability of error for 3 t- tests = 1 (0.95 x 0.95 x 0.95 ) = 0.143 = 14.3 % Probability of error for 1 ANOVA test = 1 0.95 = 0.05 = 5 %

ANOVA
Characters
To compare > 2 independent groups (N) of groups are not necessarily equal Data must be numerical (Not categorical)
Data distribution must be normal (symmetric)

ANOVA
Characters
To compare > 2 independent groups (N) of groups are not necessarily equal Data must be numerical (Not categorical)
Data distribution must be normal (symmetric)

ANOVA
Characters
It compares the 3 groups at one time (not pairwise) probablity of error It analyzes sources of variation into 2 types :
Within Groups Between Groups

ANOVA
Mean B

Mean A

Mean C

Drug I

Drug II

Drug III

Compare 3 means

Group C

Group B

Group A

Example
Group 1 25 18 29 30 34 32 Group 2 38 29 32 25 26 28 32 N2 = 7 Group 3 50 46 54 39 53 48 62 64 N3= 8

Do the 3 groups differ significantly from each other at P < 0.05?

N1= 6

Answer
Find

F calculated
From ANOVA Table

&
If Fcalc > F tab

F tabulated
From F Table

Difference is significant

F calc
ANOVA Table
Source of Variation Between groups Within groups
Total ()

df
df between df within

Sum of Squares (SS)


SS between

Mean SS (MSS) SS between df between SS within


df within

Fcalc
MSS between

SS within SS between + SS wthin

MSS within

df between + df within

Degree of Freedom (df)


df between groups = No. of groups - 1 df Between groups = 3 1 = 2 df within groups = (N-1) = (N) No. of groups df Within groups = (6-1)+(7-1)+(8-1) = (6+7+8) - 3 = 18

F calc
ANOVA Table
Source of Variation
Between groups Within groups Total ()

df 2 18
20

Sum of Squares (SS)

Mean SS (MSS)

Fcalc

Sum of Squares (SS)

Sum of Squares (SS) : Table I


X1 (X1)2
625

X2
38

(X2 )2
1144

X3
50

(X3)2
2500

Data of groups

25

18 29
30

324 841
900

29 32
25

841 1024
625

46 54
39

2166 2916
1621

34
32

1155
1024

26
28

676
784

53
48

2809
2304

32
168 28 4869 210 30

1024
6418

62 64
416 52

3844 4096
22106

Sum of Squares (SS) : Table II


Group N 6 7 8 N = 21 X 168 210 416 X = 794 X 28 30 52 (X-X)2 96.24 61 201.36 N (X-X)2 577.44 427 1610.88 SS between = 2615.32

1 2 3
X

37.81

Sum of Squares (SS) : Table III


Group 1 2 3 N 6 7 8 21 X 2 4869 6418 (X)2 28224 44100 (X)2/ N X2 [(X)2/ N] 4704 6300 21632 165 118 474 SS within = 757

22106 173056

F calc
ANOVA Table
Source of Variation
Between groups Within groups Total ()

df 2 18
20

Sum of Squares (SS)

Mean SS (MSS)

Fcalc

2615.32 757

Mean SS (MSS)
General Rule MSSbetween

MSSwithin

F calc
ANOVA Table
Source of Variation
Between groups Within groups Total ()

df 2 18
20

Sum of Squares (SS)

Mean SS (MSS)

Fcalc

2615.32 1307.66 757 42.06

F calc

F calc
ANOVA Table
Source of Variation
Between groups Within groups Total ()

df 2 18
20

Sum of Squares (SS)

Mean SS (MSS)

Fcalc

2615.32 1307.66 757


3372.24

42.06

31.09

F tab

Order is very important

F 0.05, 2, 18 = 3.55

Significance of Difference
F calc = 31.09 and F tab = 3.55

Since F calc > F tab Difference between the 3 groups is significant

Problem
The analgesic effect of 3 drugs A, B, & C was determined using the writhing method in mice. The number of mice responding to each drug was as follows : A 15 12 16 15 14 18 B 12 10 13 10 9 12 C 16 20 17 21 18 22

Are there any significant differences in the analgesic activity of the 3 drugs?

Answer : Fcalc
Source of Variation Between groups

df
2

SS
192 60

MSS
96 4

Fcalc

Within groups 15

24

Total

17

252

Answer : F tab

F 0.05, 2, 15 = 3.68
Since F calc > F tab Difference between the 3 groups is significant

Alternative Method (optional)


ANOVA Table
Source of Variation Between groups Within groups
Total ()
1

df
df between
3

Sum of Squares (SS)


4

SS between

Mean SS (MSS) 7 SS between df between 8 SS within


df within

Fcalc
MSS between

df within
2

SS within
5

MSS within

df total
N-1
=

SS total

One Table
X1 25 X2 38 X3 50

18 29 30 34 32

29 32 25 26 28 32 210 44100 6418

X (X)2 X2

168 28224 4869

46 54 39 53 48 62 64 416 173056 22106

Sum X = 794
----X2 =33393

Degree of Freedom (df)


df between groups = No. of groups - 1 df Between groups = 3 1 = 2 df total = (6+7+8) 1 = 20 df within groups = df total df between = 20 -2 = 18

F calc
ANOVA Table
Source of Variation
Between groups Within groups Total ()

df 2 18
20

Sum of Squares (SS)

Mean SS (MSS)

Fcalc

Correction Factor (CF)

CF =

2 (794) /21=

30020.76

SS between

SS between = [(28224/6)+(44100/7)+(173056/8)] 30020.76 = 2615.24

SS total

SS total = 33393 30020.76 = 3372.24

SS within

SS within = 3372.24 - 2615.24 = 757

F calc
ANOVA Table
Source of Variation
Between groups Within groups Total ()

df 2 18
20

Sum of Squares (SS)

Mean SS (MSS)

Fcalc

2615.32 757
3372.24

F calc
ANOVA Table
Source of Variation
Between groups Within groups Total ()

df 2 18
20

Sum of Squares (SS)

Mean SS (MSS)

Fcalc

2615.32 1307.66 757


3372.24

42.06

F calc
ANOVA Table
Source of Variation
Between groups Within groups Total ()

df 2 18
20

Sum of Squares (SS)

Mean SS (MSS)

Fcalc

2615.32 1307.66 757


3372.24

42.06

31.09

Today's Picture

API : Diclofenac Uses : Analgesic, antipyretic & Anti-inflammatory Manufacturer : Novartis

This tutorial will be available on PharmaTox Department page on Facebook :


www.facebook.com/pharmatox

Thank You Thank You Thank You

Thank You Thank You Thank You Thank You Thank You
Thank You

Thank You Thank You Thank You Thank You Thank You

Thank You

Thank You Thank You Thank You

Potrebbero piacerti anche