ArticleslgStudy

mathematics

Levene's test

Levene's test is a mathematics topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Levene's test rather than just read about it. In short: In statistics, Levene's test is an inferential statistic used to assess the equality of variances for a variable calculated for two or more groups. This test is used because some common statistical procedures assume that variances of the populations from which different samples are drawn are equal.

Key takeaways

  • Levene's test belongs to mathematics; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Levene's test to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Levene's test from memory before moving on to harder problems.

Reference excerpt

In statistics, Levene's test is an inferential statistic used to assess the equality of variances for a variable calculated for two or more groups. This test is used because some common statistical procedures assume that variances of the populations from which different samples are drawn are equal. Levene's test assesses this assumption. It tests the null hypothesis that the population variances are equal (called homogeneity of variance or homoscedasticity). If the resulting p-value of Levene's test is less than some significance level (typically 0.05), the obtained differences in sample variances are unlikely to have occurred based on random sampling from a population with equal variances. Thus, the null hypothesis of equal variances is rejected and it is concluded that there is a difference between the variances in the population. Levene's test has been used in the past before a comparison of means to inform the decision on whether to use a pooled t-test or the Welch's t-test for two sample tests or analysis of variance or Welch's modified oneway ANOVA for multi-level tests. However, it was shown that such a two-step procedure may markedly inflate the type 1 error obtained with the t-tests and thus is not recommended. Instead, the preferred approach is to just use Welch's test in all cases. Levene's test may also be used as a main test for answering a stand-alone question of whether two sub-samples in a given population have equal or different variances. Levene's test was developed by and named after American statistician and geneticist Howard Levene.

Definition Levene's test is equivalent to a 1-way between-groups analysis of variance (ANOVA) with the dependent variable being the absolute value of the difference between a score and the mean of the group to which the score belongs (shown below as Zij=|Yij−Y¯i⋅| ). The test statistic, W, is equivalent to the F statistic that would be produced by such an ANOVA, and is defined as follows:

W=(N−k)(k−1)⋅∑i=1kNi(Zi⋅−Z⋅⋅)2∑i=1k∑j=1Ni(Zij−Zi⋅)2, where

k is the number of different groups to which the sampled cases belong, Ni is the number of cases in the ith group, N is the total number of cases in all groups, Yij is the value of the measured variable for thejth case from the ith group, Zij={|Yij−Y¯i⋅|,Y¯i⋅ is a mean of the i-th group,|Yij−Y~i⋅|,Y~i⋅ is a median of the i-th group. (Both definitions are in use though the second one is, strictly speaking, the Brown–Forsythe test – see below for comparison.)

Zi⋅=1Ni∑j=1NiZij is the mean of the Zij for group i, Z⋅⋅=1N∑i=1k∑j=1NiZij is the mean of all Zij. The test statistic W is approximately F-distributed with k−1 and N−k degrees of freedom, and hence is the significance of the outcome w of W tested against F(1−α;k−1,N−k) where F is a quantile of the F-distribution, with k−1 and N−k degrees of freedom, and α is the chosen level of significance (usually 0.05 or 0.01).

Comparison with the Brown–Forsythe test The Brown–Forsythe test uses the median instead of the mean in computing the spread within each group (Y¯ vs. Y~, above). Although the optimal choice depends on the underlying distribution, the definition based on the median is recommended as the choice that provides good robustness against many types of non-normal data while retaining good statistical power. If one has knowledge of the underlying distribution of the data, this may indicate using one of the other choices. Brown and Forsythe performed Monte Carlo studies that indicated that using the trimmed mean performed best when the underlying data followed a Cauchy distribution (a heavy-tailed distribution) and the median performed best when the underlying data followed a chi-squared distribution with four degrees of freedom (a heavily skewed distribution). Using the mean provided the best power for symmetric, moderate-tailed, distributions.

Subgroup inconsistency and the dilution effect Like the analysis of variance (ANOVA) framework upon which it is built, Levene's test is susceptible to a "dilution effect" or subgroup inconsistency when applied to three or more groups. Specifically, the omnibus test can fail to reject the global null hypothesis of homoscedasticity across k≥3 populations while a localized pairwise comparison simultaneously rejects the equality of variances for a specific pair of groups. This counterintuitive paradox occurs because the introduction of additional well-behaved groups increases the degrees of freedom and stabilizes the pooled within-group variance, thereby masking severe localized variance discrepancies.

Software implementations Many spreadsheet programs and statistics packages, such as R, Python, Stata, Julia, and MATLAB include implementations of Levene's test.

See also Bartlett's test F-test of equality of variances Box's M test

References

External links Parametric and nonparametric Levene's test in SPSS http://www.itl.nist.gov/div898/handbook/eda/section3/eda35a.htm

Worked examples

Example 1 — a first encounter with Levene's test

Start with the simplest possible case. Write down what Levene's test claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In mathematics, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Levene's test before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Levene's test ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Levene's test

In research
Levene's test appears in mathematics research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Levene's test in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Levene's test is common in secondary-school and first-year university syllabi. It links to neighbouring topics Analysis of variance, Statistical tests, so understanding it makes those chapters shorter.
In everyday life
Look for Levene's test outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Levene's test” →

How to study Levene's test in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Levene's test means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Levene's test out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Levene's test in simple terms?

In statistics, Levene's test is an inferential statistic used to assess the equality of variances for a variable calculated for two or more groups. This test is used because some common statistical procedures assume that variances of the populations from which different samples are drawn are equal.

Why does Levene's test matter?

Because it connects several mathematics ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Levene's test?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Levene's test.

Tags

  • Analysis of variance
  • Statistical tests

Keep exploring