An Analysis of Variance ANOVA Test in Statistics
ANOVA test in statistics refers to a hypothesis test that
analyzes the variances of three or more populations to
determine if the means are different or not.
In an ANOVA test the equality of the means of different
groups has to be examined. Thus, the hypothesis is set up as
follows:
Null Hypothesis, H0: μ1 = μ2 = μ3 = ... = μk
Alternative Hypothesis, H1: The means are not equal
What is the Formula for the ANOVA Test Statistic?
The ANOVA test uses the F statistic. The formula for
the test statistic is given as F = mean squares between
groups (MSB) / mean square between errors (MSE)
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:
Null Hypothesis, H0: μ1 = μ2 = μ3 = ... = μk
Alternative Hypothesis, H1: The means are not equal
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:
Step 1: Calculate the mean for each group.
Step 2: Calculate the total mean. This is done by adding all
the means and dividing it by the total number of means.
Step 3: Calculate the SSB.
Step 4: Calculate the between groups degrees of freedom.
Step 5: Calculate the SSE.
Step 6: Calculate the degrees of freedom of errors.
Step 7: Determine the MSB and the MSE.
Step 8: Find the f test statistic.
Step 9: Using the f table for the specified level of
significance, αα, find the critical value. This is given by F(α,
df1. df2).
Step 10: If f > F then reject the null hypothesis.
Example: 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.
Low Fat Low Calorie Low Protein Low Carbohydrate
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
H1: The means are not equal
Low Low Low Low
(X - 6.6)2 (X - 3)2 (X - 3.4)2 (X - 1.2)2
Fat Calorie Protein Carbohydrate
8 2 2 1 3 0.2 2 0.6
9 5.8 4 1 5 2.6 2 0.6
6 0.4 3 0 4 0.4 -1 4.8
7 0.2 5 4 2 2 0 1.4
3 13 1 4 3 0.2 3 3.2
Total =
𝒙𝟏 =6.6 𝒙𝟐 = 3 Total = 10 𝒙𝟑 =3.4 Total = 5.4 𝒙𝟒 = 1.2 Total = 10.6
21.4
Total mean, 𝒙 =3.6
n1 = n2 = n3 = n4= 5, k = 4
SSB = n1 (X¯1−X¯)2 + n2 (X¯2−X¯)2 + n3 (X¯3−X¯)2 +n4(X¯4−X¯)2
= 75.8
SSE = 21.4 + 10 + 5.4 + 10.6 = 47.4
The ANOVA Table can be constructed as follows:
Source of Sum of Degrees of
Mean Squares F Value
Variation Squares Freedom
df1 = k - 1
Between MSB = SSB / (k - 1) f = MSB / MSE
SSB = 75.8 =4-1
Groups = 25.3 = 8.43
=3
df2 = N - k
MSE = SSE / (N - k)
Error SSE = 47.4 = 20 - 4
=3
= 16
SST = SSB +
df3 = N - 1
Total SSE
= 19
= 123.2
As no significance level is specified, α = 0.05 is chosen.
F(0.05, 3, 16) = 3.24
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.
Answer: Reject the null hypothesis