1.3.5.10. Levene Test for Equality of Variances (2024)

1.Exploratory Data Analysis
1.3.EDA Techniques
1.3.5.Quantitative Techniques

1.3.5.10.

Levene Test for Equality of Variances


Purpose:
Test for hom*ogeneity of Variances
Levene's test ( Levene 1960) is used to test if k samples have equal variances. Equal variances across samples is called hom*ogeneity of variance. Some statistical tests, for example the analysis of variance, assume that variances are equal across groups or samples. The Levene test can be used to verify that assumption.

Levene's test is an alternative to the Bartlett test. The Levene test is less sensitive than the Bartlett test to departures from normality. If you have strong evidence that your data do in fact come from a normal, or nearly normal, distribution, then Bartlett's test has better performance.

Definition The Levene test is defined as:
H0: \( \sigma_{1}^{2} = \sigma_{2}^{2} = \ldots = \sigma_{k}^{2} \)
Ha: \( \sigma_{i}^{2} \ne \sigma_{j}^{2} \) for at least one pair (i,j).
Test Statistic: Given a variable Y with sample of size N divided into k subgroups, where Ni is the sample size of the ith subgroup, the Levene test statistic is defined as:
    \[ W = \frac{(N-k)} {(k-1)} \frac{\sum_{i=1}^{k}N_{i}(\bar{Z}_{i.}-\bar{Z}_{..})^{2} } {\sum_{i=1}^{k}\sum_{j=1}^{N_i}(Z_{ij}-\bar{Z}_{i.})^{2} } \]
where Zij can have one of the following three definitions:
  1. \(Z_{ij} = |Y_{ij} - \bar{Y}_{i.}|\)

    where \(\bar{Y}_{i.}\) is the mean of the i-th subgroup.

  2. \(Z_{ij} = |Y_{ij} - \tilde{Y}_{i.}|\)

    where \(\tilde{Y}_{i.}\) is the median of the i-th subgroup.

  3. \(Z_{ij} = |Y_{ij} - \bar{Y}_{i.}'|\)

    where \(\bar{Y}_{i.}'\) is the 10% trimmed mean of the i-th subgroup.

\(\bar{Z}_{i.}\) are the group means of the Zij and \(\bar{Z}_{..}\) is the overall mean of the Zij.

The three choices for defining Zij determine the robustness and power of Levene's test. By robustness, we mean the ability of the test to not falsely detect unequal variances when the underlying data are not normally distributed and the variables are in fact equal. By power, we mean the ability of the test to detect unequal variances when the variances are in fact unequal.

Levene's original paper only proposed using the mean. Brown and Forsythe (1974)) extended Levene's test to use either the median or the trimmed mean in addition to the mean. They performed Monte Carlo studies that indicated that using the trimmed mean performed best when the underlying data followed a Cauchy distribution (i.e., heavy-tailed) and the median performed best when the underlying data followed a \(\chi^{2}_{4}\) (i.e., skewed) distribution. Using the mean provided the best power for symmetric, moderate-tailed, distributions.

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 power. If you have knowledge of the underlying distribution of the data, this may indicate using one of the other choices.

Significance Level: α
Critical Region: The Levene test rejects the hypothesis that the variances are equal if
    W > Fα, k-1, N-k
where Fα, k-1, N-k is the upper critical value of the F distribution with k-1 and N-k degrees of freedom at a significance level of α.

In the above formulas for the critical regions, the Handbook follows the convention that Fα is the upper critical value from the F distribution and F1-α is the lower critical value. Note that this is the opposite of some texts and software programs.


Levene's Test Example
Levene's test, based on the median, was performed for the GEAR.DAT data set. The data set includes ten measurements of gear diameter for each of ten batches for a total of 100 measurements.
H0: σ12 = ... = σ102Ha: σ12 ≠ ... ≠ σ102

Test statistic: W = 1.705910Degrees of freedom: k-1 = 10-1 = 9 N-k = 100-10 = 90Significance level: α = 0.05Critical value (upper tail): Fα,k-1,N-k = 1.9855 Critical region: Reject H0 if F > 1.9855

We are testing the hypothesis that the group variances areequal. We fail to reject the null hypothesis at the 0.05 significance level since the value of the Levene test statistic is less than the critical value. We conclude that there is insufficient evidence to claim that the variancesare not equal. Question Levene's test can be used to answer the following question:
  • Is the assumption of equal variances valid?
Related Techniques Standard Deviation Plot
Box Plot
Bartlett Test
Chi-Square Test
Analysis of Variance
Software The Levene test is available in some general purpose statistical software programs. Both Dataplot code and R code can be used to generate the analyses in this section. These scripts use the GEAR.DAT data file.
1.3.5.10. Levene Test for Equality of Variances (2024)

FAQs

How to interpret Levene's test for equality of variances? ›

Levene's Test tells us if we have met the assumption that the two groups have approximately equal variances on the dependent variable. If Levene's Test is significant (“Sig.” is less than . 05), the two variances are significantly different.

How do I report the results of Levene's test? ›

Levene's test indicated unequal variances (F = 3.56, p = . 043), so degrees of freedom were adjusted from 734 to 340. ANOVAs have two degrees of freedom to report. Report the between-groups df first and the within-groups df second, separated by a comma and a space (e.g., F(1, 237) = 3.45).

What to do if Levene's test is significant? ›

Levene's test is often used before a comparison of means. When Levene's test is significant, modified procedures are used that do not assume equality of variance. Levene's test may also test a meaningful question in its own right if a researcher is interested in knowing whether population group variances are different.

When the Levene test yields AP value of less than 0.05 we report? ›

For this test, a p-value of less than 0.05 indicates that there is, in fact, enough variance in the sample to account for possible mean differences. The p-value reported for Levene's Test for Equality of Variance in the table above is p = 0.000, which is well below the 0.05 threshold.

What does a statistically significant Levene's test indicate? ›

> As the Levene's test for equality of variance is significant, it indicates that the group variances are unequal in the population. > Due to the significance of the Levene's test, the hom*ogeneity of variance is violated, meaning there is a greater probability of rejecting the null hypothesis.

What should Levene's test result to indicate the equal variance assumed of an independent samples t-test? ›

We are primarily concerned with the significance value – if it is greater than 0.05 (i.e., p > . 05), our group variances can be treated as equal. However, if p < 0.05, we have unequal variances and we have violated the assumption of hom*ogeneity of variances.

What does a non significant value of Levene's test indicate? ›

Green: The first thing you should examine is Levene's test. If this test is nonsignificant, that means you have hom*ogeneity of variance between the two groups on the dependent or outcome variable.

What is a violation of the Levene's test? ›

The Levene's test uses an F-test to test the null hypothesis that the variance is equal across groups. A p value less than . 05 indicates a violation of the assumption. If a violation occurs, it is likely that conducting the non-parametric equivalent of the analysis is more appropriate.

What to do if Levene's test is significant in independent t-test? ›

Levene test is only a kind of signal whether to go for a parametric or non-parametric test of association. In case it shows a significant P-value it means we need to run a non-parametric. Even if we don't find the hom*ogeneity of variance due to uneven sample size between the groups, we can go for Welch's T test.

What to do if hom*ogeneity of variance is significant? ›

There are two tests that you can run that are applicable when the assumption of hom*ogeneity of variances has been violated: (1) Welch or (2) Brown and Forsythe test. Alternatively, you could run a Kruskal-Wallis H Test. For most situations it has been shown that the Welch test is best.

How to fix unequal variance? ›

This type of variance inequality may be handled by making “transformations” on the data, which employ the analysis of some function of the y 's, such as log y , rather than the original values. The transformed data may have equal variances and the pooled t test can then be used.

Is Levene's test the same as ANOVA? ›

Don't know about Fligner, but Levene's test is actually an ANOVA of absolute deviations from group means (or group medians, this would be Brown-Forsythe test). ANOVA is called "analysis of variance" because it decomposes the total variance into variance within groups (the "error") and variance among the group means.

What would you conclude if Levene's test had a tiny p-value? ›

So if this ANOVA comes up with a small P value then it must be confused by different scatter (SD) in different groups. If the Levene P value is small then don't believe the results of the overall one-way ANOVA. See an example on pages 325-327 of Glantz.

What is the null hypothesis of the Levene's test? ›

The null hypothesis for Levene's test is that the variance among groups is equal. The alternative hypothesis is that the variance among different groups is not equal (for at least one pair the variance is not equal to others). where, k: number of different groups to which the sampled cases belong.

What if the p-value is less than 0.05 in the Mann Whitney test? ›

A significance level of 0.05 indicates a 5% risk of concluding that a difference exists when there is no actual difference. If the p-value is less than or equal to the significance level, the decision is to reject the null hypothesis.

What is Levene's test of equality of error variances in Manova? ›

Levene's Test of Equality of Variance: Used to examine whether or not the variance between independent variable groups are equal; also known as hom*ogeneity of variance Non-significant values of Levene's test indicate equal variance between groups.

Does Levene's test need to be significant? ›

Levene's Test tests whether variances of two samples are approximately equal. Ideally, you want a non significant result for this test — that means your variances meet the assumption of equal variances.

What does the Levene's test of equal variances test for chegg? ›

Levene's Test of equality of variance tests the null hypothesis that the two groups are drawn from the same sampling distribution, which we want to support. Thus, a significance (p) value larger than . 05 is good. This means the variances for the groups DO NOT differ from each other, which is what we want.

Top Articles
Latest Posts
Article information

Author: Fredrick Kertzmann

Last Updated:

Views: 5957

Rating: 4.6 / 5 (66 voted)

Reviews: 89% of readers found this page helpful

Author information

Name: Fredrick Kertzmann

Birthday: 2000-04-29

Address: Apt. 203 613 Huels Gateway, Ralphtown, LA 40204

Phone: +2135150832870

Job: Regional Design Producer

Hobby: Nordic skating, Lacemaking, Mountain biking, Rowing, Gardening, Water sports, role-playing games

Introduction: My name is Fredrick Kertzmann, I am a gleaming, encouraging, inexpensive, thankful, tender, quaint, precious person who loves writing and wants to share my knowledge and understanding with you.