SED navigation bar go to SED home page go to Dataplot home page go to NIST home page SED Home Page SED Contacts SED Projects SED Products and Publications Search SED Pages
Dataplot Vol 1 Auxiliary Chapter

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:
    Ha:    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 ith sub-group, the Levene test statistic is defined as:
    where Zij can have one of the following three definitions:
    1. where is the mean of the ith subgroup.

    2. where is the median of the ith subgroup.

    3. where is the 10% trimmed mean of the ith subgroup.

    are the group means of the Zij and 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: (typically 0.05).
    Critical Region: The Levene test rejects the hypothesis that the variances are homogeneous if
    where is the upper critical value of the F distribution with k - 1 and N - 1 degrees of freedom at a significance level of .

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.
    HOMOGENEITY 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
    READ VANGEL32.DAT Y X BATCH
    .
    LEVENE TEST Y X
    STATUS PARAMETERS

    Dataplot generated the following output:

     
           **************************
           **      LEVENE TEST Y X **
           **************************
      
                   LEVENE F-TEST FOR SHIFT IN VARIATION
                          (ASSUMPTION: NORMALITY)
      
     1. STATISTICS
           NUMBER OF OBSERVATIONS    =       45
           NUMBER OF GROUPS          =        3
           LEVENE F TEST STATISTIC   =    10.88619
      
      
        FOR LEVENE TEST STATISTIC
           0          % POINT    =          0.
           50         % POINT    =   0.7047137
           75         % POINT    =    1.433075
           90         % POINT    =    2.433564
           95         % POINT    =    3.219942
           99         % POINT    =    5.149141
           99.9       % POINT    =    8.179383
      
      
              99.98448       % Point:     10.88619
      
     3. CONCLUSION (AT THE 5% LEVEL):
           THERE IS A SHIFT IN VARIATION.
           THUS: NOT HOMOGENOUS WITH RESPECT TO VARIATION.
      
      
      
     PARAMETER INFINITY  HAS THE VALUE:     0.3402823E+39
     PARAMETER PI        HAS THE VALUE:     0.3141593E+01
     PARAMETER STATVAL   HAS THE VALUE:     0.1088619E+02
     PARAMETER STATCDF   HAS THE VALUE:     0.9998448E+00
     PARAMETER CUTOFF0   HAS THE VALUE:     0.0000000E+00
     PARAMETER CUTOFF50  HAS THE VALUE:     0.7047137E+00
     PARAMETER CUTOFF75  HAS THE VALUE:     0.1433075E+01
     PARAMETER CUTOFF90  HAS THE VALUE:     0.2433564E+01
     PARAMETER CUTOFF95  HAS THE VALUE:     0.3219942E+01
     PARAMETER CUTOFF99  HAS THE VALUE:     0.0000000E+00
     PARAMETER CUTOF999  HAS THE VALUE:     0.0000000E+00
        

Date created: 6/5/2001
Last updated: 4/4/2003
Please email comments on this WWW page to alan.heckert@nist.gov.