Sie sind auf Seite 1von 7

Levene's test

Explanations > Social Research > Analysis > Levene's test


Description | Discussion | See also

Description
Levene's test is used to assess Variance homogeneity, which is a precondition for parametric
tests such as the t-test and ANOVA.
The test can be used with two or more samples. With two samples, it provides the test of
variance homogeneity for the t-test. With more samples, it provides the test for ANOVA.
If the significance from this test is less than 0.05, then variances are significantly different and
parametric tests cannot be used (and a non-parametric test will probably have to be used).

Discussion
Levene's test works by testing the null hypothesis that the variances of the group are the same.
The output probability is the probability that at least one of the samples in the test has a
significantly different variance. If this is greater than a selected percentage (usually 5%) then it
is considered too great to be able to usefully apply parametric tests.
SPSS easily provides the Levene's test statistic for parametric tests that need it.
////////////////////////////

Levene Test for Equality of Variances


Statistics Definitions > Levene Test

What is the Levene Test?


Levene’s test is used to check that variances are equal for all samples when your data comes from a non
normal distribution. You can use Levene’s test to check the assumption of equal variances before running a
test like One-Way ANOVA.
If you’re fairly certain your data comes from a normal or nearly normal distribution, use Bartlett’s Test instead.
The null hypothesis for Levene’s is that the variances are equal across all samples. In more formal terms,
that’s written as:
H0: σ12 = σ22 = … = σk2.
The alternate hypothesis (the one you’re testing), is that the variances are not equal for at least one pair:
H0: σ12 ≠ σ22 ≠… ≠ σk2.
The test statistic is a little ugly:
Zi,j can take on three meanings, depending on if you use the mean, median, or trimmed mean of any subgroup.
The three choices actually determine the robustness and power of the test.
 Robustness, is a measure of how well the test does not falsely report unequal variances (when the
variances are actually equal).
 Power is a measure of how well the test correctly reports unequal variances.
According to Brown and Forsythe:

 Trimmed means work best with heavy-tailed distributions like the Cauchy distribution.
 For skewed distributions, or if you aren’t sure about the underlying shape of the distribution,
the median may be your best choice.
 For symmetric and moderately tailed distributions, use the mean.
Levene’s test is built into most statistical software. For example, the Independent Samples T Test in
SPSS generates a “Levene’s Test for Equality of Variances” column as part of the output. The result from the
test is reported as a p-value, which you can compare to your alpha level for the test. If the p-value is larger
than the alpha level, then you can say that the null hypothesis stands — that the variances are equal; if the p-
value is smaller than the alpha level, then the implication is that the variances are unequal.

//////////////////////////////

Levene's Test - What Is It?


If we want to compare 3(+) groups on a metric variable, we usually want to know if they
have different mean scores. In most cases, we'll run an ANOVA in order to find out.
However, this requires the homogeneity assumption which states that the population
variances are equal for all groups.
You can safely ignore this assumption if you have (roughly) equal sample sizes for
each group. However, if group sizes are (sharply) different, then you do need to make
sure that homogeneity of variances is met by your data. A test for finding this out is
Levene's test.

Null Hypothesis
The null hypothesis for Levene's test is thatthe groups we're comparing all have
similar population variances.If this is true, we'll probably find slightly different
variances in our samples from these populations. However, very different sample
variances suggests that the population variances weren't equal after all. In this case
we'll reject the null hypothesis of equal population variances.

Levene's Test - Assumptions

Levene's test basically requires two assumptions:


 independent observations and
 metric variables (the test variables are not nominal or ordinal).

Levene's Test - Example


A fitness company wants to know if 2 supplements for stimlating body fat loss actually
work. They test 2 supplements (a cortisol blocker and a thyroid booster) on 20 people
each and another 40 people receive a placebo. All 80 participants have body fat
measurements at the start of the experiment (week 11) and weeks 14, 17 and 20. This
results in fatloss_unequal.sav, part of which is shown below.

One approach to these data is comparing body fat percentages over the 3 groups
(placebo, thyroid, cortisol) for each week separately.* We can use an ANOVA for each
of the 4 body fat measurements. Since we've unequal sample sizes, we need to make
sure that each supplement group has the same variance on each of the 4
measurements first.

Running Levene's test in SPSS


Several SPSS commands contain an option for running Levene's test. The easiest
way to go -especially for multiple variables- is the One-Way ANOVA dialog.*
Right, so we navigate to Analyze Compare Means One-Way ANOVA and fill out the
dialog that pops up.
The Homogeneity of variance test under Options refers to Levene's test.

Clicking Paste results in the syntax below. Let's run it.

SPSS Levene's Test Syntax Example


*SPSS Levene's test syntax as pasted from Analyze - Compare
Means - One-Way ANOVA.

ONEWAY fat11 fat14 fat17 fat20 BY condition


/STATISTICS DESCRIPTIVES HOMOGENEITY
/MISSING ANALYSIS.

Output for Levene's test


On running our syntax, we get several tables, the second of which is Test of
Homogeneity of Variances. This holds the results of Levene's test.
As a rule of thumb, we conclude that the variances are not equal if “Sig.” < 0.05. The
body fat percentages in week 17 and week 20 have unequal population variances over
our 3 treatment groups. That is, these 2 variables violate the homogeity of variance
assumption needed for an ANOVA.

Descriptive Statistics Output


Remember that we don't need equal population variances if we have roughly equal
sample sizes. A sound way for evaluating if this holds is inspecting the Descriptives
table in our output.

As we see, our ANOVA is based on sample sizes of 40, 20 and 20 for all 4 dependent
variables. Because they're not (roughly) equal, we do need the homogeneity of variance
assumption but it's not met by 2 variables.
In this case, we'll report some alternative results (Welch and Games-Howell) but these
are beyond the scope of this tutorial.

Reporting Levene's test


Perhaps surprisingly, Levene's test is technically an ANOVA as we'll explain here. We
therefore report it like a basic ANOVA too. So we'll write something likeLevene's test
showed that the variances for body fat percentage in week 20 were not equal,
F(2,77) = 4.58, p = 0.013.

Levene's Test - How Does It Work?


Levene's test works very simply: a larger variance means that -on average- the data
values are “further away” from their mean. The figure below illustrates this: watch the
histograms become “wider” as the variances increase.

We therefore compute the absolute differences between all scores and their (group)
mean. The means of the absolute differences should be roughly equal over groups.
So technically, Levene's test is an ANOVA on the absolute differences. In other words:
we run an ANOVA (on absolute differences) to find out if we can run an ANOVA (on our
actual data).
If that just sounds too weird, then try running the syntax below. It does exactly what I
just explained.

“Manual” Levene's Test Syntax


*Add group means on fat20 to dataset.

aggregate outfile * mode addvariables


/break condition
/mfat20 = mean(fat20).

*Compute absolute differences between fat20 and group means.

compute adfat20 = abs(fat20 - mfat20).

*Run minimal ANOVA on absolute differences. F-test identical to


previous Levene's test.

ONEWAY adfat20 BY condition.

Result

As we see, these ANOVA results are identical to Levene's test in the previous
output. I hope this clarifies why we report it as an ANOVA as well.
/////////////////////////

Das könnte Ihnen auch gefallen