ANOVA Concept
ANOVA Concept
What is ANOVA?
ANOVA was developed by the statistician Ronald Fisher. Analysis of variance (ANOVA) is a
powerful statistical analysis tool that can be used to compare the mean of three or more
populations efficiently. An interesting fact to remember is that the analysis of variance actually
compares the means. In ANOVA, Variation is partitioned using the sum of squares. This statistical
analysis tool is used to test hypotheses about differences between two or more means. The Null
Hypothesis in ANOVA can be stated as:
H0 : µ1 = µ2 = µ3 =………….= µn
Alternate hypothesis
1
ANOVA
ANOVA Formula
There are several components to the ANOVA formula. The best way to solve a problem on an
ANOVA test is by organizing the formulas into an ANOVA table. The ANOVA formulas are
given below.
2
ANOVA
Types of ANOVA:
ANOVA can be one way when only one factor is analysed. Similarly, if more factors are
analysed, we call it two way, three way etc.
3
ANOVA
One way ANOVA
▪ One-way ANOVA is a short-cut method where a single factor is considered, and its effect
on the samples is observed. It is a commonly used technique as it is a more convenient
method.
▪ This method is performed when the means of the samples and/or the mean of the sample
means are non-integer values.
▪ One drawback of one-way ANOVA is that it cannot tell which specific groups are different
from each other but can tell that at least two groups are different.
▪ In one-way ANOVA, at least three groups are analyzed as a t-test can be used to determine
the difference between two groups.
4
ANOVA
Examples
One example of one-way ANOVA is the analysis of the exam performance of students based
on their test anxiety.
One example of the classification of agricultural products on the basis of different seeds and
different fertilizers used. Here, the agricultural output is the dependent factor, whereas
seeds and fertilizers are independent factors.
5
ANOVA
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.
6
ANOVA
The steps to perform the one way ANOVA test are given below:
Step 2: Calculate the total mean. This is done by adding all the means and dividing it by the
total numbers of mean.
Step 9: Using the f table for the specified level of significance, α, find the critical value. This is
given by F(α, df1. df2).
8
ANOVA
Two way ANOVA
▪ 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 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.
9
ANOVA
There are certain assumptions made for a two way ANOVA test. These are given as follows:
10
ANOVA
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:
11
ANOVA
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
8 12 9
4 9 11
5 11 8
3 6 7
4 8 12
12
ANOVA
Solution:
Null Hypothesis H0 : µ1 = µ2 = µ3
Alternate hypothesis H1 : The means are not equal or µ1 ≠ µ2 ≠ µ3
6 8 13
8 12 9
4 9 11
5 11 8
3 6 7
4 8 12
ഥ1 = 5
X ഥ2 = 9
X ഥ3 = 10
X 13
ANOVA
Grand mean or total mean Fertilizer ഥ 1 )2 Fertilizer ഥ 2 )2 Fertilizer ഥ 3 )2
(X - X (X - X (X - X
1 2 3
ന
X = (5+9+10)/3 = 8 6 1 8 1 13 9
n1 = n2 = n3 = 6 and k = 3 8 9 12 9 9 1
4 1 9 0 11 1
SSB = 6(5 - 8)2 + 6(9 - 8)2 + 6(10 - 8)2
5 0 11 4 8 4
SSB = 84
3 4 6 9 7 9
df1 = k - 1 = 2 4 1 8 1 12 4
ഥ1 = 5
X Total = 16 ഥ2 = 9
X Total = 24 ഥ3 = 10
X Total = 28
14
ANOVA
SSE = 16 + 24 + 28 = 68
N = 18
df2 = N - k = 18 - 3 = 15
MSB = SSB / df1 = 84 / 2 = 42
MSE = SSE / df2 = 68 / 15 = 4.53
ANOVA test statistic, f = MSB / MSE = 42 / 4.53 = 9.33
Using the f table at α = 0.05 the critical value is given as F(0.05, 2, 15) = 3.68
As f > F, thus, the null hypothesis is rejected and it can be concluded that there is a difference in
the mean growth of the plants.
Answer: Reject the null hypothesis
15
ANOVA
Example 2: Determine if there is a difference in the mean daily calcium intake for people
with normal bone density, osteopenia, and osteoporosis at a 0.05 alpha level. The data was
recorded as follows:
16
ANOVA
Normal
Using the ANOVA test the (X - 938.3)2 Osteopenia (X - 800)2 Osteoporosis (X - 715)2
Density
hypothesis is set up as follows: 1200 68,486.9 1000 40,000 890 30,625
17
ANOVA
Grand mean or total mean Source of Sum of Degrees of Mean
F Value
Variation Squares Freedom Squares
ന = (938.3+800+715)/3 = 817.8
X df1 = k - 1 MSB = f = MSB /
Between SSB =
=3-1 SSB / df1= MSE
n1 = n2 = n3 = 6 and k = 3 Groups 152,477.7
=2 76,238.6 = 1.395
SSB = 6(938.3–817.8)2 + 6(800– 817,3)2 + 6(715 – 817.8)2 df2 = N - k MSE = SSE /
SSE =
Error = 18 - 3 df2 =
SSB = 152,477.7 819,833.3
= 15 54,655.5
SSE = 130,083.3 + 240,000 + 449,750 = 819,833.3 SST = SSB +
df3 = N - 1
Total SSE =
df1 = k - 1 = 2 = 17
972,311
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.
▪ ANOVA is a useful technique for researches in various fields like economics, biology,
▪ ANOVA can be used in the agricultural field to determine the relationship between
▪ It can also be used to compare the gas mileage given by different automobiles.
19