ANOVA
ANOVA
Example
Suppose it needs to be determined if consumption of a certain type of tea
will result in a mean weight loss. Let there be three groups using three types
of tea - green tea, earl grey tea, and jasmine tea. Thus, to compare if there
was any mean weight loss exhibited by a certain group, the ANOVA test (one
way) will be used.
ANOVA Formula:
One Way ANOVA
The one way ANOVA test is used to determine whether there is any
difference between the means of three or more groups. A one way ANOVA
will have only one independent variable. The hypothesis for a one way
ANOVA test can be set up as follows:
Decision Rule: If test statistic > critical value then reject the null
hypothesis and conclude that the means of at least two groups are
statistically significant.
The steps to perform the one way ANOVA test are given below:
The one way ANOVA is an omnibus test statistic. This implies that the test
will determine whether the means of the various groups are statistically
significant or not. However, it cannot distinguish the specific groups that
have a statistically significant mean. Thus, to find the specific group with a
different mean, a post hoc test needs to be conducted.
The two way ANOVA has two independent variables. Thus, it can be thought
of as an extension of a one way ANOVA where only one variable affects the
dependent variable. A two way ANOVA test is used to check the main effect
of each independent variable and to see if there is an interaction effect
between them. To examine the main effect, each factor is considered
separately as done in a one way ANOVA. Furthermore, to check the
interaction effect, all factors are considered at the same time. There are
certain assumptions made for a two way ANOVA test. These are given as
follows:
The samples drawn from the population must be independent.
The population should be approximately normally distributed.
The groups should have the same sample size.
The population variances are equal
Suppose in the two way ANOVA example, as mentioned above, the income
groups are low, middle, high. The gender groups are female, male, and
transgender. Then there will be 9 treatment groups and the three
hypotheses can be set up as follows:
Example 1: Three types of fertilizers are used on three groups of plants for 5
weeks. We want to check if there is a difference in the mean growth of each
group. Using the data given below apply a one way ANOVA test at 0.05
significant level.
6 8 13
Fertilizer 1 Fertilizer 2 Fertilizer 3
8 12 9
4 9 11
5 11 8
3 6 7
4 8 12
Solution:
H0: μ1 = μ2 = μ3
H1: The means are not equal
6 8 13
8 12 9
4 9 11
5 11 8
3 6 7
4 8 12
n1 = n2 = n3 = 6, k = 3
SSB = 6(5 - 8)2 + 6(9 - 8)2 + 6(10 - 8)2
= 84
df1 = k - 1 = 2
6 1 8 1 13 9
8 9 12 9 9 1
4 1 9 0 11 1
5 0 11 4 8 4
3 4 6 9 7 9
4 1 8 1 12 4
SSE = 16 + 24 + 28 = 68
N = 18
df2 = N - k = 18 - 3 = 15
Example 2: A trial was run to check the effects of different diets. Positive
numbers indicate weight loss and negative numbers indicate weight gain.
Check if there is an average difference in the weight of people following
different diets using an ANOVA Table.
8 2 3 2
9 4 5 2
6 3 4 -1
7 5 2 0
3 1 3 3
Solution:
H0: μ1 = μ2 = μ3 = μ4
n1 = n2 = n3 = n4 = 5, k = 4
SSB
= n1(¯¯¯¯¯X1−¯¯¯¯¯X)2+ n2(¯¯¯¯¯X2−¯¯¯¯¯X)2 +& n3(¯¯¯¯¯X3−¯¯¯¯¯X)2+n4(¯¯¯
¯¯X4−¯¯¯¯¯X)2
8 2 2 1 3 0.2 2 0.6
7 0.2 5 4 2 2 0 1.4
3 13 1 4 3 0.2 3 3.2
= 75.8
MSB =
SSB = df1 = k - 1 f = MSB
Between SSB / (k -
Σnj(¯¯¯¯¯Xj−3.6)2 =4-1 / MSE
Groups 1)
= 75.8 =3 = 8.43
= 25.3
MSE =
SSE = df2 = N - k
SSE / (N -
Error Σ(X−¯¯¯¯¯Xj)2 = 20 - 4
k)
= 47.4 = 16
=3
SST = SSB +
df3 = N - 1
Total SSE
= 19
= 123.2
As 8.43 > 3.24, thus, the null hypothesis is rejected and it can be concluded
that there is a mean weight loss in the diets.
Solution:
Nor
(X -
mal Osteope (X - Osteopor (X -
938.3)
Dens 2
nia 800)2 osis 715)2
ity
3,806. 90,00
1000 1100 650 4,225
9 0
1,466. 34,22
900 800 0 900
9 5
Total Total
¯¯¯¯¯ Total =
¯¯¯¯¯X2 = ¯¯¯¯¯X3 = =
X1 = 130,08
= 800 240,0 715 449,7
938.3 3.3
00 50
n1 = n2= n3 = 6, k = 3
= 152,477.7
MSB = f=
SSB =
df1 = k - 1 SSB / (k MSB /
Between Σnj(¯¯¯¯¯Xj−817.8)
=3-1 - 1) MSE
Groups 2
=2 = =
= 152,477.7
76,238.6 1.395
MSE =
SSE = df2 = N - k SSE / (N
Error Σ(X−¯¯¯¯¯Xj)2 = 18 - 3 - k)
= 819,833.3 = 15 =
54,655.5
As 1.395 < 3.68, the null hypothesis cannot be rejected and it is concluded
that there is not enough evidence to prove that the mean daily calcium
intake of the three groups is different.