• Tidak ada hasil yang ditemukan

The arithmetic of ANOVA calculations

Major topics covered in this chapter

Exercises 35 balance with a single internal reference weight.) Carefully considered procedures

F- test for the comparison of standard deviations 47

3.10 The arithmetic of ANOVA calculations

56 3: Significance tests

(Remember that each mean square is used so no further squaring is necessary.) The numerator has three degrees of freedom and the denominator has eight degrees of freedom, so from Table A.3 the critical value of F is 4.066 (P  0.05). Since the calculated value of F is much greater than this the null hypothesis is rejected: the sample means do differ significantly.

Such a significant difference can arise for several different reasons: for example, one mean may differ from all the others, all the means may differ from each other, the means may fall into two distinct groups, etc. A simple way of deciding the rea-son for a significant result is to arrange the means in increasing order and compare the difference between adjacent values with a quantity called the least significant difference. This is given by where s is the within-sample estimate of and is the number of degrees of freedom of this estimate. For the example above, the sample means arranged in increasing order of size are:

and the least significant difference is

Com-paring this value with the differences between the means suggests that conditions D and C give results which differ significantly from each other and from the results ob-tained in conditions A and B. However, the results obob-tained in conditions A and B do not differ significantly from each other. This confirms the indications of the dot-plot in Fig. 3.2, and suggests that it is exposure to light which affects the intensity of fluorescence.

The least significant difference method described above is not entirely rigorous: it can be shown that it leads to rather too many significant differences. However, it is a simple follow-up test when ANOVA has indicated that there is a significant differ-ence between the means. Descriptions of other more rigorous tests are given in the books in the Bibliography at the end of this chapter.

The arithmetic of ANOVA calculations 57

and degrees of freedom. Clearly the values for the total variation given in the last row of the table are the sums of the values in the first two rows for both the sum of squares and the degrees of freedom. This additive property holds for all the ANOVA calculations described in this book.

Just as in the calculation of variance, there are formulae which simplify the calcu-lation of the individual sums of squares. These formulae are summarised below:

Table 3.4 Summary of sums of squares and degrees of freedom

Source of variation Sum of squares Degrees of freedom

Between-sample Within-sample

Total a hn - 1 = 11

i a

j

1xij -x22 =210

h1n - 12 = 8 ai a

j 1xij -xi22 =24

h - 1 = 3 n ai 1xi- x22 =186

One-way ANOVA tests for a significant difference between means when there are more than two samples involved. The formulae used are:

where there are h samples each with n measurements.

N nh  total number of measurements Ti sum of the measurements in the ith sample T sum of all the measurements, the grand total

The test statistic is F  between-sample mean square/within-sample mean square and the critical value is Fh - 1, N - h.

Source of variation Sum of squares Degrees of freedom Between-samples

Within-samples by subtraction by subtraction

Total a N - 1

i a

j

x2ij -1T2>N2

h - 1 ai 1T2i>n2 - 1T2>N2

These formulae can be illustrated by repeating the ANOVA calculations for the data in Table 3.2. The calculation is given in full below.

Example 3.10.1

Test whether the samples in Table 3.2 are drawn from populations with equal means.

In the calculation of the mean squares all the values in Table 3.2 have had 100 subtracted from them, which simplifies the arithmetic considerably. Note that

58 3: Significance tests

SUMMARY

Groups Count Sum Average Variance

A 3 303 101 1

B 3 306 102 3

C 3 291 97 4

D 3 276 92 4

ANOVA

Source of Variation SS df MS F P-value F crit

Between Groups 186 3 62 20.66667 0.0004 4.06618

Within Groups 24 8 3

Total 210 11

The calculations for one-way ANOVA have been given in detail in order to make the principles behind the method clearer. In practice such calculations are normally made on a computer. Both Minitab® and Excel® have an option which performs one-way ANOVA and, as an example, the output given by Excel®is shown below, using the original values.

Anova: Single factor

this does not affect either the between- or within-sample estimates of variance because the same quantity has been subtracted from every value.

A 2 0 1 3 9

B 1 1 4 6 36

C -3 -5 -1 -9 81

D -10 -8 -6 -24 576

ai

T2i = 702 T = - 24

T2i

Ti

n = 3, h = 4, N = 12, a

i a

j

x2ij = 258

Source of variation Sum of squares Degrees of

freedom Mean square

Between-sample 3

Within-sample by subtraction  24 8

Total 11

F = 62>3 = 20.7 258 - 1-2422>12 = 210

24>8 = 3 186>3 = 62 702>3 - 1-2422>12 = 186

The critical value Since the calculated value is greater than this the null hypothesis is rejected: the sample means differ significantly.

F3,8 = 4.066 (P = 0.05).

The chi-squared test 59 Certain assumptions have been made in performing the ANOVA calculations in this chapter. The first is that the variance of the random error is not affected by the treat-ment used. This assumption is implicit in the pooling of the within-sample variances to calculate an overall estimate of the error variance. In doing this we are assuming what is known as the homogeneity of variance. In the particular example given above, where all the measurements are made in the same way, we would expect homogeneity of variance. Methods for testing for this property are given in the Bibliography at the end of this chapter.

A second assumption is that the uncontrolled variation is truly random. This would not be the case if, for example, there was an uncontrolled factor such as a temperature change which produced a trend in the results over a period of time. The effects of such uncontrolled factors can be overcome to a large extent by the tech-niques of randomisation and blocking which are discussed in Chapter 7.

An important part of ANOVA is clearly the application of the F-test. Use of this test (see Section 3.6) simply to compare the variances of two samples depends on the samples being drawn from a normal population. Fortunately, however, the F-test as applied in ANOVA is not too sensitive to departures from normality of distribution.