Download as pdf or txt
Download as pdf or txt
You are on page 1of 13

ANALYSIS OF VARIANCE

Suppose a medical researcher is analyzing the effectiveness of three

types of pain relievers and wants to determine whether there is a

difference in the mean lengths of time it takes the three medications to

provide relief. To determine whether such a difference exists, the

researcher can use the F-distribution together with a technique called

analysis of variance. Because one independent variable is being

studied, the process is called one-way analysis of variance.


ANALYSIS OF VARIANCE
One-way analysis of variance is a hypothesis-testing technique that

is used to compare the means of three or more populations. Analysis

of variance is usually abbreviated as ANOVA.

The null and alternative hypothesis are usually stated as;

H0: 𝜇1 = 𝜇2 = 𝜇3 = ⋯ 𝜇𝑘 (all population means are equal) Vs

H1: 𝜇1 ≠ 𝜇2 ≠ 𝜇3 ≠ ⋯ 𝜇𝑘 (At least one of the population mean is

different)
ANALYSIS OF VARIANCE

In a one-way ANOVA test, the following conditions must be true.

1. Each sample must be randomly selected from a normal, or

approximately normal, population.

2. The samples must be independent of each other.

3. Each population must have the same variance.


ANALYSIS OF VARIANCE
Given a one way anova model as;

𝑦𝑖𝑗 = 𝜇 + 𝜏𝑖 + 𝑒𝑖𝑗 , where 𝑦𝑖𝑗 is the jth observation of the ith

treatment, 𝜇 is the population mean, 𝜏𝑖 is the treatment effect of the

ith treatment and 𝑒𝑖𝑗 is the random error. The test statistic is given as;

𝑀𝑆𝑡
F= with degree of freedom for SSt and SSE respectively where
𝑀𝑆𝐸

𝑆𝑆𝑇
MSt (mean square treatment) = ,
𝐷.𝐹
ANALYSIS OF VARIANCE
𝑟
𝑖=1 𝑌𝑖 2
SSt (𝑠𝑢𝑚 𝑠𝑞𝑢𝑎𝑟𝑒 𝑡𝑟𝑒𝑎𝑡𝑚𝑒𝑛𝑡) = − 𝐶. 𝐹 with t−1 degree of
𝑟𝑖

freedom where r is the number of replication for each treatment.

𝑁 2
SST (sum square total)= 𝑖=1 𝑌 𝑖𝑗 − 𝐶𝐹 with N−1 degree of

freedom

SSE (sum square error) = SST−SSt , D.F= 𝐷𝐹 𝑆𝑆𝑇 − 𝐷𝐹 (𝑆𝑆𝑡)

𝑆𝑆𝐸
MSE (mean square error) =
𝐷.𝐹
ANALYSIS OF VARIANCE
𝑁 2
𝑖=1 𝑌𝑖𝑗
C.F (correction factor) =
𝑁

The Anova summary table is presented below.

Source of Sum of Degree of Mean F-ratio

variation squares freedom square

Treatment

Error

Total
Example
A medical researcher wants to determine whether there is a difference

in the mean lengths of time it takes three types of pain relievers to

provide relief from headache pain. Several headache sufferers are

randomly selected and given one of the three medications. Each

headache sufferer records the time (in minutes) it takes the medication

to begin working. The results are shown in the table. At 𝛼 = 0.01, can

you conclude that at least one mean time is different from the others?

Assume that each population of relief times is normally distributed

and that the population variances are equal.


Example

Treatments

A B C D
2.0 1.7 2.0 2.1
2.2 1.9 2.4 2.2
1.8 1.5 2.7 2.2
2.3 2.5 1.9
1.7 2.4
Total=10 Total=5.1 Total=12 Total=8.4
Solution
H0: 𝜇1 = 𝜇2 = 𝜇3 = 4 (all treatment means are equal) Vs

H1: 𝜇1 ≠ 𝜇2 ≠ 𝜇3 ≠ 𝜇4 (At least one of the treatment mean is

different)

𝑁 2
𝑖=1 𝑌𝑖𝑗 35.52
C.F (correction factor) = = = 74.132
𝑁 17

𝑁 2
SST (sum square total)= 𝑖=1 𝑌 𝑖𝑗 − 𝐶𝐹

SST (sum square total)= 2.02 + 2.22 + 1.82 + ⋯ 1.92 − 74.132


Solution
SST (sum square total)= 75.77 − 74.132

SST (sum square total)= 1.638

𝑟
𝑖=1 𝑌𝑖 2
SSt (𝑠𝑢𝑚 𝑠𝑞𝑢𝑎𝑟𝑒 𝑡𝑟𝑒𝑎𝑡𝑚𝑒𝑛𝑡) = − 𝐶. 𝐹
𝑟𝑖

10 2 5.12 12 2 8.42
SSt 𝑠𝑢𝑚 𝑠𝑞𝑢𝑎𝑟𝑒 𝑡𝑟𝑒𝑎𝑡𝑚𝑒𝑛𝑡 = ( + + +⋯ )−
5 3 5 4

74.132
Solution

SSt 𝑠𝑢𝑚 𝑠𝑞𝑢𝑎𝑟𝑒 𝑡𝑟𝑒𝑎𝑡𝑚𝑒𝑛𝑡 = 75.110 − 74.132 = 0.978

SSE (sum square error) = SST−SSt

SSE (sum square error) = 1.638 − 0.978

SSE (sum square error) = 0.660


Solution
ANOVA table

Source of Sum of Degree of Mean F-ratio

variation squares freedom square

Treatment 0.978 3 0.326 6.392

Error 0.660 13 0.051

Total 1.638 16

F3, 13= 5.74


Solution

Decision

Since our calculated F = 6.392 is greater than the tabulated F 3, 13= 5.74,

we therefore reject the null hypothesis and conclude that there is a

difference in the mean length of time it takes the three pain relievers to

provide relief from headache pain.

You might also like