CHAPTER 12 Analysis of Variance
CHAPTER 12 Analysis of Variance
Analysis of Variance
LEARNING OBJECTIVES
12.1 INTRODUCTION
In other words, the null and alternative hypotheses of population means imply that
the null hypothesis should be rejected if any of the r sample means is different from
the others.
For example, the production level in three shifts in a factory can be compared to
answer questions such as: Is the production level higher/lower on any day of the
week? Is Wednesday morning shift's production better/worse than any other shift?
and so on. Production level can also be analysed using other days and shifts of the
week in combination.
The following are a few examples involving more than two populations where it is
necessary to conduct a comparative study to arrive at a statistical inference:
It is clear from the calculations in Table 12.1 that as the size of student population or
sample increases, the probability of error in statistical inference of population means
increases. Under certain assumptions, a method known as analysis of
variance (ANOVA) developed by R. A. Fisher is used to test the significance of the
difference between several population means.
The following are few terms that will be used during discussion on analysis of
variance:
A sampling plan or experimental design is the way that a sample is selected from the
population under study and determines the amount of information in the sample.
An experimental unit is the object on which a measurement or measurements is taken.
Any experimental conditions imposed on an experimental unit provides effect on the
response.
A factor or criterion is an indepenent variable whose values are controlled and varied by
the researcher.
A level is the intensity setting of a factor.
A treatment or population is a specific combination of factor levels.
The response is the dependent variable being measured by the researcher.
For example,
The first step in the analysis of variance is to partition the total variation in the
sample data into the following two component variations in such a way that it is
possible to estimate the contribution of factors that may cause variation.
1. The amount of variation among the sample means or the variation attributable to the
difference among sample means. This variation is either on account of difference in
treatment or due to element of chance. This difference is denoted by SSC or SSTR.
2. The amount of variation within the sample observations. This difference is considered
due to chance causes or experimental (random) errors. The difference in the values of
various elements in a sample due to chance is called an estimate and is denoted by SSE.
The observations in the sample data may be classified according to one
factor (criterion) or two factors (criteria). The classifications according to one factor
and two factors are called one-way classification and two-way classification,
respectively. The calculations for total variation and its components may be carried
out in each of the two-types of classifications by (i) direct method, (ii) short-cut
method, and (iii) coding method.
1. Each population under study is normally distributed with a mean µr that may or may not
be equal but with equal variances σ2r.
2. Each sample is drawn randomly and is independent of other samples.
As mentioned before, for all theoretical purposes we refer populations (i.e., several
groups classified based on single factor or criterion in a sample data) as treatments.
We will study the effect of a factor (criterion) such as flavour preference on the
dependent variable (i.e. sales) at different groups (i.e. variety of ice-creams). These
groups are the treatments in this particular example.
Suppose our aim is to make inferences about r population means µ1, µ2, µr based on
independent random samples of size n1, n2,…, nr, from normal populations with a
common variances <2. That is, each of the normal population has same shape but
their locations might be different. The null hypothesis to be tested is stated as:
The values of are called sample means and is the grand mean of all observations
(or measurements) in all the samples.
Since the same number of observations is obtained from each brand of tyres
(population), therefore the number of observations in the table is n = rk = 3×4 = 12.
The grand mean for all samples is
Step 1: State the null and alternative hypotheses to test the equality of population
means as:
α = level of significance
Step 2: Calculate total variation If a single sample of size n is taken from the
population, then estimate of the population variance based on the variance of
sampling distribution of mean is given by
The numerator in s2 is called sum of squares of deviations of sample values about the
sample mean and is denoted as SS. Consequently ‘sum of squares’ is a measure of
variation. Thus when SS is divided by df, the result is often called the mean
square which is an alternative term for sample variance.
3. Calculate difference between the mean of each sample and the grand mean as 1 − , 2 −
, − r − . Multiply each of these by the number of observations in the corresponding
sample and add. The total gives the sum of the squared differences between the sample
means in each group and is denoted by SSC or SSTR.
This sum is also called sum of squares for treatment (SSTR)
This sum is also called the sum of squares for error, SSE = SST − SSTR.
When these ‘sum of squares’ are divided by their associated degrees of freedom, we
get the following variances or mean square terms:
Step 6: Apply F-test statistic with r – 1 degrees of freedom for the numerator
and n – r degrees of freedom for the denominator
Reject H0 if the calculated value of F > its critical value Fα(r − 1, n − r)
Otherwise accept H0
If null hypothesis H0 is true, then the variance in the sample means measured by
MSTR = SSTR/(r − 1) provides an unbiased estimate of σ2. But if H0 is false, and
population means are different, then MSTR is large as shown in Fig 12.2
Table 12.4 shows the general arrangement of the ANOVA table for one-factor
analysis of variance.
Short-Cut Method The values of SSTR and SSE can be calculated by applying the
following short-cut methods:
Do the data indicate that the price in the three cities are significantly different?
The table value of F for df1 = 2, df2 = 9, and α = 5 per cent level of significance is 4.26.
Since calculated value of F is less than its critical (or table) value, the null hypothesis
is accepted. Hence we conclude that the prices of a commodity in three cities have no
significant difference.
6 5 6
5 5 7
4 4 6
5 4 5
6 5 6
4 4 6
The table value of F for df1 = 2, df2 = 15, and α = 0.05 is 3.68. Since calculated value
of F=7 is more than its table value, the null hypothesis is rejected. Hence we
conclude that there is significant difference in ethical values among individuals
specializing in marketing.
Can we infer that the mean lifetimes of the four brands of electric bulbs are equal?
Solution: Let us take the null hypothesis that the mean lifetime of the four brands
of electric bulbs is equal.
Substracting a common figure 20 from each observation. The calculations with code
data are as under:
Degrees of freedom: df1
The table value of F for df1 = 3, df2 = 8, and a = 0.05 is 4.07. Since the calculated
value of F = 1.67 is less than its table value, the null hypothesis is accepted. Hence we
conclude that the difference in the mean lifetime of four brands of bulbs is not
significant and we infer that the average lifetime of the four brands of bulbs is equal.
When null hypothesis H0 is rejected, it implies that all population means are not
equal. However, we may not be satisfied with this conclusion and may want to know
which population means differ. The answer to this question comes from the
construction of confidence intervals using the small sample procedures, based on t-
distribution.
where is the sample mean from a population. Similarly, confidence interval for the
difference between two population means µ1 and µ2 is given by
How to calculate s or s2, which is the best estimate of the common sample variance?
How many degrees of freedom are used for the critical value of t-test statistic?
To answer these questions, recall that in the analysis of variance, we assume that the
population variances are equal for all populations. This common value is the mean
square error MSE = SSE/(n − r) which provides an unbiased estimate of σ2,
regardless of test or estimation used. We use, s2 = MSE
or and tα/2 at specified level of
significance α to estimate σ , where n = n1 + n2 +…+ nr.
2
Mean square error (MSE): The mean of the squared errors used to
judge the quality of a set of errors.
Illustration
From Example 12.1 we know that, 1 = 5; 3 = 6, n = n1 + n2 + n3 = 18, s2 = MSE = 0.5
and α = 0.05 level of signifiance. So the confidence interval is computed as:
Since zero is included in this interval, we may conclude that there is no significant
difference in the selected population means. That is, there is no difference between
eithical values of marketing and advertising managers.
Remark: If the end points of the confidence interval have the same sign, then we
may conclude that there is a significant difference between the selected population
means.
12.2 There are three main brands of a certain powder. A sample of 120 packets sold
is examined and found to be allocated among four groups A, B, C, and D, and brands
I, II and III, as shown below:
Use analysis of variance and determine whether the machines are significantly
different in their mean speed.
12.5 The following figures related to the number of units of a product sold in five
different areas by four salesmen:
Do you think that there is significant difference in the performance of the four
machines?
[Kumaon Univ., MBA, 1998]
Divide each observation by 100 and use the code data for analysis of variance.
Since the calculated value of F = 1.83 is less than its table value F = 3.98 at df1 =
2, df2 = 11, and α = 0.05, the null hypothesis is accepted.
12.2 Let H0: There is no significant difference in brand preference.
Since calculated value of F = 3.69 is less than its table value F = 4.26 at df1 =
2, df2 = 9, and α = 0.05, the null hypothesis is accepted.
12.3 Given total number of observations, n = 24; Number of samples, r = 4
df = n − 1 = 24 − 1 = 23 (For between the groups-fertilizers)
df1 = r − 1 = 4 − 1 = 3; df2 = n − r = 24 − 4 = 20
Since the calculated value of F = 5.99 is more than its table value F = 3.10 at df1 =
3, df2 = 20, and α = 0.05, the null hypothesis is rejected.
12.4 Let H0 : Machines are not significantly different in their mean speed.
Since the calculated value of F = 7.50 is more than its table value F = 3.89
at df1 = 2, df2 = 12, and α = 0.05, the null hypothesis is rejected.
12.5 Let H0 : No significant difference in the performance of four salesmen.
Since the calculated value of F = 10.61 is greater its table value F = 3.24 at df1 =
3, df2 = 12, and α = 0.05, the null hypothesis is rejected.
12.6 Let H0 : Machines do not differ significantly in performance.
Since the calculated value of F = 25.207 is more than its table value F = 5.95
at df1 = 3, df2 = 12, and α = 0.05, the null hypothesis is rejected.
In one-way ANOVA, the partitioning of the total variation in the sample data is done
into two components: (i) Variation among the samples due to different samples (or
treatments) and (ii) Variation within the samples due to random error. However,
there might be a possibility that some of the variation left in the random error from
one-way analysis of variation was not due to random error or chance but due to
some other measurable factor. For instance, in Example 12.1 we might feel that part
of the variation in price was due to the inability in data collection or condensation of
data. If so, this accountable variation was deliberately included in the sum of squares
for error (SSE) and therefore caused the mean sum of squares for error (MSE) to be
little large. Consequently, F-Value would then be small and responsible for the
rejection of null hypothesis.
explore one criterion (or factor) of interest to partition the sample data so as to remove
the unaccountable variation, and arriving at a true conclusion.
investigate two criteria (factors) of interest for testing the difference between sample
means.
consider any interaction between two variables.
As stated above, total variation consists of three parts: (i) variation between
columns, SSTR; (ii) variation between rows, SSR; and (iii) actual variation due to
random error, SSE. That is
The degrees of freedom associated with SST are cr – 1, where c and r are the number
of columns and rows, respectively
Decision rule
Is there a significant difference in the sales made by the four salesmen? Is there a
significant difference in the sales made during different months?
(a) The table value of F = 4.75 for df1 = 3, df2 = 6, and α = 0.05. Since the calculated
value of Ftreatment = 1.018 is less than its table value, the null hypothesis is accepted.
Hence we conclude that sales made by the salesmen do not differ significantly
(b) The table value of F=5.14 for df1=2, df2 = 6, and α = 0.05. Since the calculated
value of Fblock = 3.327 is less than its table value, the null hypothesis is accepted.
Hence we conclude that sales made during different months do not differ
significantly.
Example 12.6: To study the performance of three detergents and three different
water temperatures, the following ‘whiteness’ readings were obtained with specially
designed equipment:
(a) Since calculated value of Ftreatment = 9.847 at df1 = 2, df2 = 4, and, α = 0.05 is greater
than its table value F = 6.94, the null hypothesis is rejected. Hence we conclude that
there is significant difference between the performance of the three detergents.
(b) Since the calculated value of Fblock = 2.380 at df1 = 2, df2 = 4, and α = 0.05 is less
than its table value F = 6.94, the null hypothesis is accepted. Hence we conclude that
the water temperature do not make a significant difference in the performance of the
detergent.
Use the coding method for subtracting 40 from the given numbers.
12.9 The following data represent the production per day turned out by 5 different
workers using 4 different types of machines:
1. Test whether the mean productivity is the same for the different machine types.
2. Test whether the 5 men differ with respect to mean productivity.
12.10 The following table gives the number of units of production per day turned
out by four different types of machines:
Using analysis of variance (a) test the hypothesis that the mean production is
same for four machines and (b) test the hypothesis that the employees do not
differ with respect to mean productivity.
[Osmania Univ., MCom, 1999]
12.13 Three varieties of potato are planted each on four plots of land of the same
size and type, each variety is treated with four different fertilizers. The yield in
tonnes are as follows:
Perform an analysis of variance and show whether (a) there is any significant
difference between the average yield of potatoes due to different fertilizers being
different used, and (b) there is any difference in the average yield of potatoes of
different varieties.
Since F1 = 1.619 < F0.05 (6, 3) = 4.76, accept null hypothesis.
Since F2 = 1.417 < F0.05(6, 2) = 5.14, accept null hypothesis.
12.8
1. F1 = 1.312 < F0.05 (3, 6) = 4.76, accept null hypothesis.
2. F2 = 1.218 < F0.05 (2, 6) = 5.14, accept null hypothesis.
12.9 Let H0 :(a) Mean productivity is same for all machines (b) Men do not differ
with respect to mean productivity Decoding the data by subtracting 40 from each
figure.
1. F0.05 = 3.49 at df1 = 3 and df2 = 12. Since the calculated value F1 = 18.387 is greater than the
table value, the null hypothesis is rejected.
2. F0.05 = 3.26 at df1 = 4 and df2 = 12. Since the calculated value F2 = 6.574 is greater than the
table value, the null hypothesis is rejected.
12.10 Let H0:
1. F0.05 = 3.86 at df1 = 3 and df2 = 9. Since the calculated value F1 = 9.72 is more than its table
value, reject the null hypothesis.
2. F0.05 = 3.86 at df1 = 3 and df2 = 9. Since the calculated value F2 = 8.27 is more than its table
value, reject the null hypothesis
12.11 Let H0 :
1. The calculated value of F1 = 1.24 is less than its table value F0.05 = 3.25 at df1 = 4 and df2 =
12, hence the null hypothesis is accepted.
2. The calculated value of F2 = 2.53 is less than its table value F0.05 = 3.49 at df1 = 3 and df2 =
12, hence the null hypothesis accepted.
12.12 Let H0:
1. Since the calculated value F1 = 1.15 is less than its table value F0.05 = 4.757 at df = (3, 6), the
null hypothesis is accepted.
2. Since the calculated value F2 = 11.20 is less than its table value F0.05 = 19.33 at df = (6, 2),
the null hypothesis is accepted.
12.13 Let H0 :
1. Fcal = 1.55 is less than its table value F0.05 = 5.14 at df = (2, 6), the null hypothesis is
accepted.
2. Fcal = 9.22 is more than its table value F0.05 = 4.67 at df = (3, 6), the null hypothesis is
rejected.
Formulae Used
1. One-way analysis of variance
Grand sample mean
Sum of squares of variations between samples due to treatment
Sum of squares of variations within samples or error sum of squares
Mean square between samples due to treatments
Mean square within samples due to error
Test statistic for equality of k population means
Degrees of freedom
Total df(n − 1) = Treatment df (r − 1) + Random
error df (n − r)
2. Two-way analysis of variance
Total sum of squares
Sum of squares of variances between columns due to treatments
Sum of squares between rows due to blocks
Sum of squares due to error
SSE =SST − (SSTR + SSR)
Degrees of freedom
dfc = c − 1; dfr = (r − 1)
df (residual error) = Blocks df + Treatments df
= (r − 1) (c − 1)
Mean squares between columns due to treatment
Mean square between rows due to blocks
Mean square of residual error
Test statistic
provided numerator is bigger than denominator.
True or False
1. Analysis of variance serves as the basis for a variety of statistical models related to the
design of experiments.
(T/F)
2. Analysis of variance is used to test the hypothesis that the means of several populations
do not differ.
(T/F)
3. Analysis of variance is used to test the hypothesis that the variances of several
populations do not differ.
(T/F)
5. For analysis of variance, samples drawn from populations need not be independent.
(T/F)
6. All populations need not be normally distributed to draw samples for analysis of variance.
(T/F)
7. If samples of size n each are drawn from k normal populations, the degrees of freedom for
variation within the samples is n (k – 1).
(T/F)
8. Analysis of variance is an extension of the tests for differences between two means.
(T/F)
9. In the analysis of variance the assumption that population variances are equal is called
homogeneity of variance.
(T/F)
10. The homogeneity of variance means that the test is concerned with the hypothesis that
the several means came from the same population.
(T/F)
Multiple Choice
11. The number of parts in which total variance in a one-way analysis of variance
partitioned is:
1. 2
2. 3
3. 4
4. none of these
1. 2
2. 3
3. 4
4. none of these
13. Any difference among the population means in the analysis of variance will
inflate the expected value of
1. SSE
2. MSTR
3. MSE
4. all of these
1. r − 1
2. c − 1
3. (r − 1)
4. (r − 1) (c − 1)
1. r –
2. n − 1
3. nr −
4. none of these
16. The degrees of freedom associated with the denominator of F-test in the analysis
of variance are:
1. r (n − 1)
2. n (r − 1)
3. nr − 1
4. none of these
1. SST + SSTR
2. SSTR – SST
3. SST – SSTR
4. none of these
1.
2.
3.
4. none of these
1. Binomial
2. Chi-square
3. Poisson
4. none of these
22. To test equality of proportions of more than two populations which of following
techniques is used
1. interval estimate
2. analysis of variance
3. chi-square test
4. none of these
23. Which of the following assumptions of ANOVA can be discarded in case the
sample size is large
1. MSTR/MSE
2. MSTR/MSR
3. MSR/MSE
4. none of these
12.15 A manager obtained the following data on the time (in days) needed to do a
job. Use these data to test whether the mean time needed to complete a job differs
for four persons. Use α = 0.05.
12.16 A leading oil company claims that its engine oil improves engine efficiency. To
verify this claim, the company's brand A is compared with three other competing
brands B, C, and D. The data of the survey consists of the km per litre consumption
for a combination of city and highway travel, and are as follows:
1. Is there any difference in the average mileage for these four brands?
2. Is there any difference in the average mileage for a combination of city and highway
travel?
12.17 A TV manufacturing company claims that the performance of its brand A TV
set is better than two other brands. To verify this claim, a sample of 5 TV sets are
selected from each brand and the frequency of repair during the first year of
purchase is recorded. The results are as under:
TV Brands
A B C
4 7 4
6 4 6
7 3 6
5 6 3
8 5 1
In view of this data, can it be concluded that all three varieties of coal have an
equal amount of ash content?
12.19 An Insurance Company wants to test whether three of its field officers, A, B,
and C in a given territory, meet equal number of prospective customers during a
given period of time. A record of the previous four months showed the following
results for the number of customers contacted by each field officer for each month:
Is there any significant difference in the average number of contacts made by the
three field officers per month?
12.20 A departmental store chain is considering opening a new store at one of three
locations. An important factor in making such a decision is the household income in
these areas. If the average income per household is similar, then the management
can choose any one of these three locations. A random survey of various households
in each location is undertaken and their annual combined income is recorded. This
data is as under:
Annual Household Income (Rs ’000s)
Area 1 Area 2 Area 3
70 100 60
72 110 65
75 108 57
80 112 84
83 113 84
– 120 70
– 100 –
Can the average income per household in these areas be considered to be the
same?
12.21 Four types of advertising displays were set up in twelve retail outlets, with
three outlets randomly assigned to each of the displays. The data on product sales
according to the advertising displays are as under:
Does the type of advertising display used at the point of purchase affect the
average level of sales?
12.15 Let H0:
1. Fcal = 47.64 is more than its table value F0.05 = 4.75 at df = (3, 6), the null hypothesis is
rejected.
2. Fcal = 11.42 is more than its table value F0.05 = 5.14 at df = (2, 6), the null hypothesis is
rejected.
12.16 Let H0 :
1. Fcal = 156 is more than its table value F0.05 = 3.862, for df = (3, 9), the null hypothesis is
rejected.
2. Fcal = 1.64 is less than its table value F0.05 = 3.862 for df = (3, 9), the null hypothesis is
accepted.
Since Fcal = 1.58 is less than its table value F0.05 = 3.89 at df = (2, 12), the null
hypothesis is accepted.
12.18 Let H0 : Ash content is equal in all varieties of coal.
Since Fcal = 2.69 is less than its table value F0.05 = 3.89 at df = (2, 12), the null
hypothesis is accepted.
12.19 Let H0 : All field officers met equal number of customers in the previous four
months.
Since Fcal = 3.95 is less than its table value F0.05 = 4.26 at df = (2, 9), the null
hypothesis is accepted.
12.20 Let H0 : No significant difference in the average income per household in all
the three areas.
Since Fcal = 38.96 is more than its table value F0.05 = 3.68 at df = (2, 15), the null
hypothesis is rejected.
12.21 Let H0 : Type of advertising display used at the point of purchase does not
affect the average level of sales.
Since Fcal = 4.53 is more than its table value F0.05 = 4.07 at df = (3, 8), the null
hypothesis is rejected.
Case Studies
A FMCG company wished to study the effects of four training programmes on the
sales abilities of their sales personnel. Thirty-two people were randomly divided into
four groups of equal size, and the groups were then subjected to the different sales
training programmes. Because there were some dropouts during the training
programmes due to illness, vacations, and so on, the number of trainees completing
the programmes varied from group to group. At the end of the training programmes,
each salesperson was randomly assigned a sales area from a group of sales areas that
were judge to have equivalent sales potentials. The sales made by each of the four
groups of salespeople during the first week after completing the training programme
are listed in the table:
Training Programme