In this video I want to take a look, a little bit of a closer look, at Levene's
test of equality of variances. And, in fact, what exactly is Levene's test doing,
when we do a test for equal variances. And recall that Levene's test is a test to
see whether the variances for two or more groups are equal. Levene's test comes
up in the independent samples t-test and in the one-way ANOVA, as an assumption of
both of those procedures.
It also comes up in other procedures as well, but most people would be familiar
with it in these two tests. And what it's testing there is whether the population
variances for the two groups, if you're doing an independent t-test, or for three
or more groups for an ANOVA, whether those variances are equal in the population.
And the reason why Levene's test is used in the t-test and the ANOVA, is because it
is an assumption of both of those tests. So when we run those procedures we want
to make sure that the assumption appears to be satisfied, or if it's not satisfied,
then we want to do what's necessary to make sure that the test performs well.
But in this video I don't want to spend time so much on what to do if Levene's
test is violated, but rather to dive in and see what is it exactly that Levene's
test is doing.
First of all, how do we assess it and then see if we can figure out what
Levene's test really is a measure of. So in this example here you see on your
screen we have two variables. We have volume, our independent variable, and then
exam scores, our dependent variable. And there were 20 people in the study, with
10 people in the no volume group, which we have labeled a 1, and then 10 people
are in the high volume group, which is labeled a 2.
And then we have exam scores.
I could run an independent samples t-test, and let's go ahead and do that,
and take a look and see what Levene's test would look like there. So if I go
to Analyze, Compare Means, and then Independent Samples T Test and then move
our exam scores, our dependent variable, into the Test Variable(s) box, volume will
go into the Grouping Variable box and we'll enter 1s and 2s, since that's what
no volume and high volume correspond to. So click on Define groups. Group one
gets a 1, Group 2 gets a 2. And then click Continue and then OK. And here we
get the results, and just zeroing in on the Levene's test, you can see here that
Levene's Test for Equality of Variances is shown. And notice we have an F value,
Levene's test is an ANOVA, and we have an F of .078, with the p-value of .783. Now just
as a quick review here for Levene's test,
typically if you use an alpha .05, which is the most common value to use, you want
to compare the p-value to .05 and if the p-value, reported as Sig. in SPSS, is less
than or equal to .05, then we want to reject the null, it means the test
is significant, and this provides some evidence that the variances may be
unequal in the population. If p is greater than .05, this gives us
some evidence that the variances are equal in the population. So in terms of
trying to satisfy the assumption of equal variances, we want this value to be
greater than .05, and it is, so that looks good. I'll go ahead and close this
out. And then you also can access this assumption through the ANOVA procedure,
so let's go and take a quick look at that. If we go to Analyze and then Compare Means
and then One-Way ANOVA. And then here we want to move exam scores to our
Dependent List, and then volume to Factor, which is another name for independent
variable, and then click on Options, and then under Statistics we want to go
ahead and select Homogeneity of variance test. Click Continue and then OK.
And then notice in the One-Way ANOVA, we get a separate table for Test of
Homogeneity of Variances and it says Levine statistic .078 with the p-value
of .783, and it also reports the degrees of freedom, as you can see there. Now if
you compare this Levine statistic, .078, that's the same thing we have for
independent samples test under here, .078, as you can see there for Levene's
test. And the p-values also match, .783 for Sig., .783 for Sig. So this test can be
accessed either way, either through the Independent Samples T-Test, it comes out
by default here we don't even have to ask for it, or through the One-Way ANOVA
where we asked for it and it comes out as a separate table.
OK next let's go ahead and take a look and see if we can figure out what
Levene's test is actually testing. Recall that it's trying to test whether the
variances are equal. So it's testing some type of variability, some measure of
variability in our data. But let's go ahead and go to our Data Editor window
and take a look at that and see if we can figure this out here or see if we
can demonstrate how the Levene's test is calculated. Now what it does is, basically
Levene's test determines how far away each value, in a given group, such as the
no volume, how far away each value is from its own group mean.
so in other words we're going to subtract the mean of these values from
each score here, and then we're going to find a mean of these values, and subtract
that mean from each score here. So the first thing we need to do is find the
mean. And to do that we can go to Data and then Aggregate, and this is actually
a very interesting procedure here which can come in quite handy.