Professional Documents
Culture Documents
Chapter 4 Analysis of Variance (Student - S Notes
Chapter 4 Analysis of Variance (Student - S Notes
Example 1
Suppose that lecturers at a college have devised three different methods to teach statistics. They want to
find out if these three methods produce different mean scores. Let , and be the mean scores of all
students who will be taught by the three Methods I, II and III, respectively. State the null and alternative
hypotheses to test if the three teaching methods produce the same mean.
(All three population means are equal.)
Not all three population means are equal (or at least two population means are not equal.)
Example 2
Three different groups of runners are subjected to different training methods.
Experimental units:
Treatments:
Levels of the factor:
STA408 Chapter 4: Analysis of Variance
One-way ANOVA
A 0ne-way ANOVA test analyses one factor or one independent variable.
Assumptions of one-way ANOVA
The populations from which the samples are drawn are (approximately) normally distributed.
The populations from which the samples are drawn have the same variances (or standard
deviations).
The samples drawn from different populations are random and independent.
The ANOVA test is applied by calculating two estimates of the variance, , of the population distributions:
Between-group variance (mean square treatment (MSA)) involves finding the variance of the
means
Within-group variance (mean square error (MSE)) found through computing the variance using
all the data and is not affected by differences in means.
In general, for a test of the difference among three or more means, the hypotheses are:
(All the population means are equal.)
At least one mean is different from the others (or at least two population means are not equal)
The degrees of freedom for this test are:
degrees of freedom for numerator (d.f.N.)
Note:
The one-way ANOVA test is always right-tailed with rejection region in the right tail of the F
distribution curve.
If there is no difference in the means, then
between-group variance estimate within-group variance estimate
and the test statistic, will be approximately 1.
2
STA408 Chapter 4: Analysis of Variance
Example 4
Fifteen students were randomly assigned to three groups to experiment the three different methods of
teaching statistics. At the end of the semester, the same test was given to all 15 students. The following
table gives the scores of the students in the three groups.
¥
73 85 68
51 70 95
65 69 74
87 90 67
Assume that all the assumptions of the one-way ANOVA procedure hold true.
(a) Calculate the value of the test statistic F.
(b) Test a 5% significance level the claim that there is no difference among the population mean scores.
In ANOVA terminology, the three methods of used in teaching statistics are called treatments.
Let
the score of a student
the number of different groups (or treatments)
the size of sample
the sum of the values in sample 15
=
The total sum of squares (SST) is the sum of SSA and SSE, i.e.,
To calculate MSA and MSE, we first need to compute the treatment sum of squares (SSA) and the error
sum of squares (SSE). The SST, SSA, SSE, MSA and MSE are calculated as follows, respectively:
3
STA408 Chapter 4: Analysis of Variance
Therefore,
For convenience, all the calculations above are often recorded in a table called the ANOVA table as follows:
ANOVA table
Source of Degrees of Sum of Mean Value of the Test
Variation freedom Squares Square Statistic
Treatments
Error
Total
4
STA408 Chapter 4: Analysis of Variance
Example 5
Below is the Minitab output for the data of the three methods used in teaching Statistics of Example 4.
Test at 5% significance level the claim that there is no difference among the population mean scores.
Method
Factor Information
Analysis of Variance
Model Summary
Means
5
STA408 Chapter 4: Analysis of Variance
Example 6
A consumer agency wanted to find out if the mean time taken by each of three brands of medicines to
provide relief from a headache is the same. The following table gives the time (in minutes) taken by each
patient to get relief from a headache after taking the medicine.
Drug I 25 38 42 65 41 52
Drug II 15 21 19 28
Drug III 44 64 58 73
At a 2.5% significance level, will you conclude that the mean time taken to provide relief from a headache
is the same for each of the three drugs?
Drug I 25 38 42 65 41 52
Drug II 15 21 19 28
Drug III 44 64 58 73
ANOVA Table
Source of Degrees of Sum of Mean Value of the Test
Variation freedom Squares Square Statistic
Treatments
Error
Total
6
STA408 Chapter 4: Analysis of Variance
Example 7
Below is the Minitab output for the data of Example 6. Test using the -value. Use
One-way ANOVA: Drug I, Drug II, Drug III
Analysis of Variance
Example 8
The following ANOVA table, based on information obtained for samples selected from four independent
populations that are normally distributed with equal variances, has a few missing values.
ANOVA table
Source of Degrees of Sum of Mean Value of the Test
Variation freedom Squares Square Statistic
Treatments
Error 9.2154
Total
(a) Find the missing values and complete the ANOVA table.
(b) Using , what is your conclusion for the test with the null hypothesis that the means of the
four populations are all equal against the alternative hypothesis that the means of the four
populations are not all equal?
7
STA408 Chapter 4: Analysis of Variance
Example 9
Response variable:
Treatment (factor) variable:
Block (confounding) variable:
8
STA408 Chapter 4: Analysis of Variance
Assumptions:
- The populations follow a normal distribution with means , .
- Equal variances for all combinations of treatments and blocks.
- The samples are independent random samples in independent blocks from each population.
Example 10
The cutting speed of four types of tools are being compared in an experiment. Five cutting materials of
varying degree of hardness are to be used. The data given the measurement of cutting time in seconds
appear in the table below.
Materials
Tools 1 2 3 4 5
1 12 2 8 1 7
2 20 14 17 12 17
3 13 7 13 8 14
4 11 5 10 3 6
9
STA408 Chapter 4: Analysis of Variance
(d)
Tools Materials (blocks)
(Treatments) 1 2 3 4 5 Total
1 12 2 8 1 7
2 20 14 17 12 17
3 13 7 13 8 14
4 11 5 10 3 6
Total
10
STA408 Chapter 4: Analysis of Variance
Example 11
Below is the output for the data given in Example 10.
Analysis of Variance
By using -value, we can show that the null hypotheses for the tool effects and material effects (part (e)
and (f) of example 10 respectively) are rejected.
Example 12
Four different machines , , and are being considered for the assembling of a particular
product. It was decided that six different operators would be used in a randomised block experiment to
compare the machines. The machines were assigned in a random order to each operator. The operation
of the machines requires physical dexterity, and it was anticipated that there would be a difference among
the operators in the speed with which they operated the machines. The amounts of time (in seconds)
required to assemble the product are shown in the table below.
Operator
Machine 1 2 3 4 5 6
1 42.5 39.3 39.6 39.9 42.9 43.6
2 39.8 40.1 40.5 42.3 42.5 43.1
3 40.2 40.5 41.3 43.4 44.9 45.1
4 41.3 42.2 43.5 44.2 45.9 42.3
The Minitab output of the data in the table above is given as follows.
Analysis of Variance
11
STA408 Chapter 4: Analysis of Variance
Example 13
Given a randomized block experiment with five groups and eight blocks, in the following ANOVA
summary table, fill in all the missing results.
Factors
Blocks 540
Error
Total
(a) At the 0.05 level of significance, is there evidence of a difference among the five group means?
(b) At the 0.05 level of significance, is there evidence of an effect due to blocks?
12
STA408 Chapter 4: Analysis of Variance
Example 14
Suppose a researcher wishes to test the effects of two different types of plant food and two different
types of soil on the growth of certain plants.
Two independent variables: - the type of plant food
- the type of soil
Dependent variable: - the plant growth
Other factors like water, temperature and sunlight are held constant.
To conduct this experiment, the researcher sets up four groups of plants as shown in the Figure 1.
13
STA408 Chapter 4: Analysis of Variance
14
STA408 Chapter 4: Analysis of Variance
Example 15
A researcher wishes to see whether the type of gasoline use and the type of automobile driven have any
effect on the gasoline consumption. Two types of gasoline, regular and high-octane, will be used, and two
types of automobile, two-wheel- and four-wheel-drive, will be used in each group. There will be two
automobiles in each group, for a total of eight automobiles used. Using a two-way analysis of variance,
the researcher will perform the following steps.
Step 1: State the hypotheses.
Step 2: Find the critical value for each F test, using
Step 3: Complete the summary table to get the test value.
Step 4: Make the decision.
Step 5: Conclude the results.
The data (in miles per gallon) are given in the table below.
Type of automobile
Gas Two-wheel-drive Four-wheel-drive
26.7 28.6
Regular
25.2 29.3
32.3 26.1
High-octane
32.8 24.2
8
3
15
STA408 Chapter 4: Analysis of Variance
Error
Total
Step 5: Conclusion.
Since for the interaction effect is rejected, it can be concluded that there is an interaction effect
between type of gasoline used and type of automobile driven on the gasoline consumption at 5%
significance level.
16
I
STA408 Chapter 4: Analysis of Variance
Example 16
Below is the Minitab output for Example 15.
Analysis of Variance
I
Note:
In the example above, the effect of the type of gasoline used and the effect of the type of automobile driven
are called the main effects.
Suppose that the interaction effect is not significant, the strategy of analysis is to proceed with the
analysis of main effect. Otherwise, it is not necessary to test on the main effects because the knowledge
on interaction when it is significant is more useful than the knowledge of the main effects.
Example 17
A contractor wishes to see whether there is a difference in the time (in days) it takes two subcontractors
to build three different types of homes. The data is as follows.
Home type
Subcontractor I II III
A 25, 28, 26, 30, 31 30, 32, 35, 29, 31 43, 40, 42, 49, 48
B 15, 18, 22, 21, 17 21, 27, 18, 15, 19 23, 25, 24, 17, 13
17