Analysis of Variance
Analysis of Variance
Introduction to Analysis of
Variance
(ANOVA)
2
Some concepts
• Type I Error: Rejecting the null hypothesis when it is true.
Population condition
H0 True Ha True
4
ANOV
A
• ANOVA – Analysis of Variance
Recall:
• To compare means of 2 groups we use a Z or a T statistic.
– Compare means from two groups to see whether they are so far
apart that the observed difference cannot reasonably be attributed to
sampling variability.
8
Between- and Within- variability
9
What are the characteristics of the F
distribution?
• The F distribution is continuous. This means that it can
assume an infinite number of values between zero and
positive infinity.
• The F distribution cannot be negative. The smallest value
F can assume is 0.
• It is positively skewed. The long tail of the distribution is
to the right-hand side. As the number of degrees of
freedom increases in both the numerator and denominator
the distribution approaches a normal distribution.
• It is asymptotic. As the values of X increase, the F curve
approaches the X-axis but never touches it. This is similar to
the behavior of the normal distribution.
10
Two types of ANOVA
One-way ANOVA
• The different populations are classified according to one
attribute or factor
– E.g. levels of crop production classified according to
type of fertilizer used
Two-way ANOVA
• The different populations are classified according to 2
attributes or factors
– E.g. levels of crop production classified according to
type of fertilizer used and seed type 11
One-way ANOVA
• Classification of populations is based on a single
factor or attribute or treatment.
12
What are the steps for testing the equality of
means using the one-way ANOVA procedure?
• Step 1: State the null and alternative hypotheses as follows:
– H0: μ1= μ2= · · · = μk
– Ha: Not all k means are equal.
• Step 3: Build the ANOVA table, and from the table determine
the computed value of the F-ratio.
• Decision rule:
– If Fcal > Ftab, reject the null hypothesis
– Ftab from F-table using a given level of significance
and degrees of freedom k-1 and n-k
16
Alternative short-cut method
17
18
Example
4 NGOs were randomly selected in 3 districts in Malawi
to test whether significant variations exist in helping
farmers in adoption of farm technologies. The following
table records the number of farmers they have reached
with disseminating the farm technology.
NGO2 10 10 5
NGO3 12 15 20
NGO4 15 7 5
19
Example cont’d
• Formulate the hypotheses to test if there are
significant differences in mean number of farmers
reached with disseminating the farm technology.
20
Two-way ANOVA
21
Two-way ANOVA
• The two-way ANOVA tests the null hypotheses of equal means for each
factor
• E.g suppose that an agricultural experiment consists of examining
the yields per acre of 4 different varieties of wheat, where each
variety is grown on 5 different plots of land.
– n=20
– Yield differences can be due to either of the 2 factors or
classifications:
1) type of wheat grown 2) block (or plot) used
– The 2 factors are referred to as treatments and blocks, or simply
factor 1 and factor 2
• Assume we have a treatments (factor 1) and b blocks (factor 2)
• It is supposed that there is one experimental value (such as yield per
acre) corresponding to each treatment and block combination.
22
Practice exercise
Table 1 gives fresh graduates daily earnings (in
thousands of MK) of former students with bachelor’s
degrees from 5 colleges and for 3 class rankings at
graduation.
23
Table 1
Bunda Chanco Poly CoM Nursing
Top 20 18 16 14 12
Middle 19 16 13 12 8
Bottom 18 14 10 10 10
24