Dataplot Vol 1 Vol 2

# LEVENE TEST

Name:
LEVENE TEST
Type:
Analysis Command
Purpose:
Perform a k-sample Levene test for the homogeneity of variances across samples.
Description:
The F test used in analysis of variance problem with k factors can be sensitive to unequal standard deviations in the k factors. Levene's test is a test of the hypothesis that all factor standard deviations (or equivalently variances) are equal against the alternative that the standard deviations are not all equal.

The assumption of homogeneous variances arises in other contexts in addition to analysis of variance. Levene's test can be applied in these cases as well.

The Levene test is an alternative to the Bartlett test. Although it is more commonly used, the Bartlett test is known to be sensitive to departures from normality. The Levene test is less sensitive to non-normality than the Bartlett test.

The Levene test is defined as:

 H0: $$\sigma_{1} = \sigma_{2} = \ldots = \sigma_{k}$$ Ha: $$\sigma_{i} \neq \sigma_{j}$$    for at least one pair (i,j). Test Statistic: Given a variable Y with sample of size N divided into k sub-groups, where Ni is the sample size of the i-th sub-group, 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}(Z_{ij}-\bar{Z}_{i.})^{2} }$$ where Zij can have one of the following three definitions: $$Z_{ij} = |Y_{ij} - \bar{Y}_{i.}|$$ where $$\bar{Y}_{i.}$$ is the mean of the i-th subgroup. $$Z_{ij} = |Y_{ij} - \tilde{Y}_{i.}|$$ where $$Z_{ij} = |Y_{ij} - \tilde{Y}_{i.}|$$ is the median of the i-th subgroup. $$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 non-homogeneous groups when the underlying data is not normally distributed and the groups are in fact homogeneous. By power, we mean the ability of the test to detect non-homogeneous groups when the groups are in fact non-homogenous. The definition based on the median is recommended as the choice that provides good robustness against many types of non-normal data but retains good power. Significance Level: $$\alpha$$ (typically 0.05). Critical Region: The Levene test rejects the hypothesis that the variances are homogeneous if $$W > F_{(1 - \alpha,k-1,N-k)}$$ where $$F_{(1 - \alpha,k-1,N-1)}$$ is the upper critical value of the F distribution with k - 1 and N - 1 degrees of freedom at a significance level of $$\alpha$$.

Syntax 1:
LEVENE TEST <y> <tag> <SUBSET/EXCEPT/FOR qualification>
where <y> is a response variable;
<tag> is a factor identifier variable;
and where the <SUBSET/EXCEPT/FOR qualification> is optional.

This syntax computes the median based Levene test.

Syntax 2:
MEDIAN LEVENE TEST <y> <tag> <SUBSET/EXCEPT/FOR qualification>
where <y> is a response variable;
<tag> is a factor identifier variable;
and where the <SUBSET/EXCEPT/FOR qualification> is optional.

This syntax computes the median based Levene test.

Syntax 3:
MEAN LEVENE TEST <y> <tag> <SUBSET/EXCEPT/FOR qualification>
where <y> is a response variable;
<tag> is a factor identifier variable;
and where the <SUBSET/EXCEPT/FOR qualification> is optional.

This syntax computes the mean based Levene test.

Syntax 4:
TRIMMED MEAN LEVENE TEST <y> <tag> <SUBSET/EXCEPT/FOR qualification>
where <y> is a response variable;
<tag> is a factor identifier variable;
and where the <SUBSET/EXCEPT/FOR qualification> is optional.

This syntax computes the trimmed mean based Levene test. It trims the lowest 10% and the highest 10% of the data.

Examples:
LEVENE TEST Y1 GROUP
LEVENE TEST Y1 GROUP SUBSET GROUP > 2
MEDIAN LEVENE TEST Y1 GROUP
MEAN LEVENE TEST Y1 GROUP
TRIMMED MEAN LEVENE TEST Y1 GROUP
Note:
The various values printed by the LEVENE TEST command are saved as parameters that can be used later by the analyst. Enter the command STATUS PARAMETERS after the LEVENE TEST command to see a list of the saved parameters.
Note:
The HOMOGENEITY PLOT is a graphical technique for testing for unequal variances.
Default:
The default is to to compute the Levene test based on group medians.
Synonyms:
None
Related Commands:
 BARTLETT TEST = Compute Bartlett's test. HOMOSCEDASTICITY PLOT = Plot group standard deviations against group means. CONFIDENCE LIMITS = Compute the confidence limits for the mean of a sample. F TEST = Performs a two-sample F test. T TEST = Performs a two-sample t test. CHI-SQUARE TEST = Performs a one sample chi-square test that the standard deviation is equal to a given value. STANDARD DEVIATION = Computes the standard deviation of a variable.
Reference:
Levene, H. (1960). "Contributions to Probability and Statistics: Essays in Honor of Harold Hotelling," I. Olkin, et. al., eds. Stanford University Press, Stanford, CA, pp. 278-292.
Applications:
Analysis of Variance, Regression
Implementation Date:
1998/5
Program:
SKIP 25
.
LEVENE TEST Y X
STATUS PARAMETERS

Dataplot generated the following output:


**************************
**      LEVENE TEST Y X **
**************************
Levene F-Test for Shift in Variation
(Case: Test Based on Medians)

Response Variable: Y
Group-ID Variable: X

H0: Homogeneous Variances
Ha: Variances Are Not Homogeneous

Summary Statistics:
Total Number of Observations:                        45
Number of Groups:                                     3

Levene Test Statistic Value:                   10.88618
CDF of Test Statistic:                          0.99984
P-Value:                                        0.00016

Percent Points of the Reference Distribution
-----------------------------------
Percent Point               Value
-----------------------------------
0.0    =          0.000
50.0    =          0.705
75.0    =          1.433
90.0    =          2.434
95.0    =          3.220
97.5    =          5.149
99.0    =          5.149
99.9    =          8.179

Conclusions (Upper 1-Tailed Test)
----------------------------------------------
Alpha    CDF   Critical Value     Conclusion
----------------------------------------------
10%    90%            2.434      Reject H0
5%    95%            3.220      Reject H0
2.5%  97.5%            5.149      Reject H0
1%    99%            5.149      Reject H0


NIST is an agency of the U.S. Commerce Department.

Date created: 06/05/2001
Last updated: 09/11/2014