Lesson 6.4 Simple Analysis of Variance Fin
Lesson 6.4 Simple Analysis of Variance Fin
Learning objectives:
After completing this lesson the student should be able to:
7. Do multiple comparisons using the HSD and the Newman-Keuls (NK) tests.
8. Rank order planned comparisons, the HSD and the NK tests with regard
to power.
Introduction
We have been using the mean as the basic statistic for evaluating the null
hypothesis. It’s also possible to use the variance of the data for hypothesis testing.
One of the most important tests that does this is called the F test, after R. A. Fisher,
the statistician who developed it. In using this test, we calculate the statistic Fobt,
which fundamentally is the ratio of two independent variance estimates of the
same population variance.
Discussion
F TEST AND THE ANALYSIS OF VARIANCE (ANOVA)
The F test is appropriate in any experiment in which the scores can be used
to form two independent estimates of the population variance. One quite
frequent situation in the behavioural sciences for which the F test is appropriate
occurs when analyzing the data from experiments that use more than two groups
or conditions.
Given that it is frequently desirable to do experiments with more than two
groups, you may wonder why these experiments aren’t analyzed in the usual way.
For example, if the experiment used four independent groups, why not simply
compare the group means two at a time using the t- test for independent groups?
That is, why not just calculate t values comparing group 1 with 2, 3, and 4; 2 with
3 and 4; and 3 with 4?
SSTotal
SSWithin
Computational Formula
(Σ𝑋)2
𝑆𝑆 𝑇𝑜𝑡𝑎𝑙 = Σ𝑋 2 − ,
𝑁
(Σ𝑋1 )2 (Σ𝑋2 )2 (Σ𝑋𝑎 )2 (Σ𝑋)2
SSBetween= + +⋯+ −
𝑛1 𝑛2 𝑛𝑎 𝑁
ANOVA Table
Source of Sum of
Variation Squares (SS) df MS Fcom F crit
Between Groups SS between C-1 SSB/C-1 MSB/MSW= from the table
(SSb/C-1)
Within Groups SS within N-C SSW/N-C /(SSW/N-C)
Total SS Total N-1
Example. Test if There is Significant differences among the three types of drugs
Placebo Drug A Drug B
9 5 2
8 4 4
8 5 3
6 8 1
9 3 5
Sum 40 25 15 80
Mean 8 5 3 5.333
Solution: six step rule
1. H0: μ1 = μ2 = μ3
Ha: at least one of the mean is different
2. 𝛼 = 0.05
3. ANOVA
4. Computation
(Σ𝑋)2
𝑆𝑆 𝑇𝑜𝑡𝑎𝑙 = Σ𝑋 2 − ,
𝑁
802
𝑆𝑆𝑇 = (92 + 82 + 82 + 62 + 92 + 52 + 42 +. . . + 12 + 5 2 ) −
15
=81+64+64+….+1+25-6400/15= 𝟗𝟑. 𝟑𝟑𝟑
Solution
1. Null hypothesis: The null hypothesis states that the different situations affect
stress equally. Therefore, the three sample sets of scores are random samples
from populations where
𝜇1 = 𝜇2 = 𝜇3
2. Alternative hypothesis: The alternative hypothesis states that at least one of
the situations affects stress differently than at least one of the remaining
situations. Therefore, at least one of the means 𝜇1 , 𝜇2 𝑎𝑛𝑑 𝜇3 differs from at
least one of the others.
3. Conclusion, using 𝛼 =0.05: The conclusion is reached in the same general way
as with the other inference tests. First, we calculate the appropriate statistic,
in this case , and then we evaluate based on its sampling distribution.
Computation:
ANOVA Table
RELATIONSHIP BETWEEN ANOVA AND THE t TEST
When a study involves just two independent groups and we are testing the
null hypothesis that μ1 = μ2 we can use either the t test for independent groups or
the analysis of variance. In such situations, it can be shown algebraically that
𝑡2 = 𝐹
SIZE OF EFFECT USING 𝜔2 (omega square) and 𝜼𝟐 (Eta Squared),
We have already discussed the size of the effect of the X variable on the Y
variable in conjunction with correlational research when we discussed the
coefficient of determination 𝑟 2 .You will recall that 𝑟 2 is a measure of the
proportion of the total variability of Y accounted for by X and hence is a measure
of the strength of the relationship between X and Y. If the X variable is causal with
regard to the Y variable, the coefficient of determination is also a measure of the
size of the effect of X on Y.
The situation is very similar when we are dealing with the one-way,
independent groups ANOVA. In this situation, the independent variable is the X
variable and the dependent variable is the Y variable. One of the statistics
computed to measure size of effect in the one-way, independent groups ANOVA
is omega squared (𝝎𝟐 ).The other is eta squared (𝜼𝟐 ), which we discuss in the next
section. Conceptually, 𝝎𝟐 and 𝜼𝟐 are like 𝑟 2 in that each provides an estimate of
the proportion of the total variability of Y that is accounted for by X. 𝝎𝟐 is a
relatively unbiased estimate of this proportion in the population, whereas the
estimate provided by 𝜼𝟐 is more biased. The conceptual equation for is given by
𝜎𝐵 2
𝜔2 =
𝜎𝐵 2 + 𝜎𝑊 2
Since we do not know the values of these population variances, we estimate them from the
sample data. The resulting equation is
𝑆𝑆𝐵 − (𝐶 − 1)𝑀𝑆𝑤
𝜔2 =
𝑆𝑆𝑇 + 𝑀𝑆𝑤
Example Stress Experiment
Let’s compute the size of effect 𝝎𝟐 using for the stress experiment.
ANOVA TABLE
Source of Variation SS df MS Fobt F crit
Between Groups 203.3333 2 101.6667 22.59259 3.885294
Within Groups 54 12 4.5
Total 257.3333 14
𝑺𝑺 −(𝑪−𝟏)𝑴𝑺 𝟐𝟓𝟕.𝟑𝟑𝟑−(𝟑−𝟏)(𝟒.𝟓)
𝝎𝟐 = 𝑩 𝒘
= =0.742
𝑺𝑺𝑻 +𝑴𝑺𝒘 𝟐𝟓𝟕.𝟑𝟑𝟑+𝟒.𝟓
Thus, the estimate provided 𝝎𝟐 by tells us that the stress situations account
for 0.742 or 74.2% of the variance in corticosterone levels. Referring to Table 15.4,
since the value of 𝝎𝟐 is greater than 0.14, this is considered a large effect.
Eta Squared, 𝜼𝟐
Eta squared is an alternative measure for determining size of effect in one-
way, independent groups ANOVA experiments. It also provides an estimate of the
proportion of the total variability of Y that is accounted for by X, and is very similar
to𝝎𝟐 . However, it gives a more biased estimate than 𝝎𝟐 , and the biased estimate
is usually larger than the true size of the effect. Nevertheless, it is quite easy to
calculate, has been around longer than𝝎𝟐 , and is still commonly used. Hence,
we have included a discussion of it here. The equation for computing 𝜼𝟐 is given
by
𝑺𝑺𝑩
𝜼𝟐 =
𝑺𝑺𝑻
Stress Experiment
This time, let’s compute 𝜼𝟐 for the data of the stress experiment
ANOVA TABLE
Source of Variation SS df MS Fobt F crit
Between Groups 203.3333 2 101.6667 22.59259 3.885294
Within Groups 54 12 4.5
Total 257.3333 14
Computing the value of 𝜼𝟐 for these data, we
𝑺𝑺𝑩 𝟐𝟎𝟑. 𝟑𝟑𝟑
𝜼𝟐 = = = 𝟎. 𝟕𝟗
𝑺𝑺𝑻 𝟐𝟓𝟕. 𝟑𝟑𝟑
Based on 𝜼𝟐 , the stress situations account for 0.790 or 79.0% of the variance
in corticosterone levels. According to Cohen’s criteria (see Table 15.4), this value
of 𝜼𝟐 also indicates a large effect. Note, however, that the value of 𝜼𝟐 is larger
than the value obtained for 𝝎𝟐 , even though both were calculated on the same
data. Because 𝝎𝟐 provides a more accurate estimate of the size of effect, we
recommend its use over 𝜼𝟐 .
MULTIPLE COMPARISONS
In one-way ANOVA, a significant F value indicates that all the conditions
do not have the same effect on the dependent variable. For example, in the
illustrative experiment presented earlier in the chapter that investigated the
amount of stress produced by three situations, a significant F value was obtained
and we concluded that the three situations were not the same in the stress levels
they produced. For pedagogical reasons, we stopped the analysis at this
conclusion.
However, in actual practice, the analysis does not ordinarily end at this
point. Usually, we are also interested in determining which of the conditions differ
from each other. A significant F value tells us that at least one condition differs
from at least one of the others. It is also possible that they are all different or any
combination in between may be true. To determine which conditions differ,
multiple comparisons between pairs of group means are usually made. In the
remainder of this chapter, we shall discuss two types of comparisons that may be
made: a priori comparisons and a posteriori comparisons.
A Priori, or Planned, Comparisons
A priori comparisons are planned in advance of the experiment and often
arise from predictions based on theory and prior research. With a priori
comparisons, we do not correct for the higher probability of a Type I error that
arises due to multiple comparisons, as is done with the a posteriori methods. This
correction, which we shall cover in the next section, in effect makes it harder for
the null hypothesis to be rejected. When doing a priori comparisons, statisticians
do not agree on whether the comparisons must be orthogonal (i.e.,
independent). We have followed the position taken by Keppel and Winer that
planned comparisons need not be orthogonal as long as they flow meaningfully
and logically from the experimental design and are few in number.
In doing planned comparisons, the t test for independent groups is used.
We could calculate tobt in the usual way. For example, in comparing conditions
1 and 2, we could use the equation for t-test
De f i n i t i o n s
■ The experiment-wise error rate is the probability of making one or more Type I
errors for the full set of possible comparisons in an experiment.
■ The comparison-wise error rate is the probability of making a Type I error for any
of the possible comparisons.
The Tukey Honestly Significant Difference (HSD) Test
The Tukey Honestly Significant Difference test is designed to compare all
possible pairs of means while maintaining the Type I error for making the complete
set of comparisons at a. Thus, the HSD test maintains the experiment-wise Type I
error rate at a. The statistic calculated for this test is Q. It is defined by the following
equation:
̅𝟏 − 𝑿
𝑿 ̅𝟐
𝑸𝑶𝒃𝒕 =
√𝟐𝑴𝑺𝒘
𝒏
Note that in calculating Qobt, the smaller mean is always subtracted from
the larger mean. This always makes Qobt positive. Otherwise, the Q statistic is very
much like the t statistic, except it uses the Q distributions rather than the t
distributions. To use the statistic, we calculate Qobt for the desired comparisons
and compare Qobt with Qcrit, determined from Table G. The decision rule states
that if Qobt ≤Qcrit, reject H0. If not, then retain H0.
To illustrate the use of the HSD test, we shall apply it to the data of the stress
experiment. For the sake of illustration, we shall assume that all three comparisons
are desired. There are two steps in using the HSD test. First, we must calculate the
Qobt value for each comparison and then compare each value with Qcrit.
ANOVA TABLE
Source of Variation SS df MS Fobt F crit
Between Groups 203.3333 2 101.6667 22.59259 3.885294
Within Groups 54 12 4.5
Total 257.3333 14