While the two-sample t-test (based on Student's t-distribution)
tests whether two variables are the same, the one-way AVOVA
(based on the F-distribution) tests whether groups
are the same. The null hypothesis is that all samples are
drawn from populations with the same means. For example, we
want to find out if any of the
different treatments for
a disease is on average superior or inferior to the others.
Specifically, let
be
groups each
containing
samples
.
The total number of samples is
. The null
hypothesis is
.
The method is based on the assumption that samples in each of
the groups have normal distributions
of possibly different unknown means but the same unknown variance.
We first find the following
(54) |
We further define the following mean-squares (MS) of
distributions
Now we can finally define the test statistic:
(56) |
If all samples are drawn from the populations having the
same means, SSB for between-group variation will be small
and is likely to be less than 1. But if the samples are
drawn from populations of different means, SSB will be larger
than SSW for within-group variation, and
is likely to be
greater than 1. Also, if the sample size
is large, i.e.,
there is a stronger evidence for different group means, then
is large and
is likely to be rejected.
Specifically, substituting the specific values obtained from
the data set into the expression above, we get the value
and the corresponding p-value from the F-distribution table
(Matlab function
1-fcdf(f,DFG,DFE)
), which are then
compared with the critical value corresponding to
the given significant level
(Matlab function
finv(1-alpha,DFG,DFE)
). If , or equivalently
, then we reject the null hypothesis
and
conclude that the
means are significantly different.
Otherwise, we accept
as there is not significant
evidence against it.
These can be summarized by the ANOVA table below:
Example: Given samples of each of the
groups
below, find if their means are the same,
,
for the significant level
.
This result is also illustrated in the plot below, where the
area to the right of
(red) is
,
while the area to the right of
is
, which
is inside the critical region,
is rejected.