BUILT-IN MATHEMATICA SYMBOL

# LeveneTest

LeveneTest[data]
tests whether the variance of data is 1.

LeveneTest[{data1, data2}]
tests whether the variances of and are equal.

LeveneTest[dspec, ]
tests a dispersion measure against .

LeveneTest[dspec, , "property"]
returns the value of .

## Details and OptionsDetails and Options

• LeveneTest performs a hypothesis test on data with null hypothesis that the true population variance , and alternative hypothesis that .
• Given and , LeveneTest tests against .
• By default a probability value or -value is returned.
• A small -value suggests that it is unlikely that is true.
• The data in dspec must be univariate .
• The argument can be any positive real number.
• The LeveneTest assumes the data is normally distributed and, for the two-sample case, is much less sensitive to this assumption than the FisherRatioTest.
• LeveneTest[data, , "HypothesisTestData"] returns a HypothesisTestData object htd that can be used to extract additional test results and properties using the form htd["property"].
• LeveneTest[data, , "property"] can be used to directly give the value of .
• Properties related to the reporting of test results include:
•  "DegreesOfFreedom" the degrees of freedom used in a test "PValue" list of -values "PValueTable" formatted table of -values "ShortTestConclusion" a short description of the conclusion of a test "TestConclusion" a description of the conclusion of a test "TestData" list of pairs of test statistics and -values "TestDataTable" formatted table of -values and test statistics "TestStatistic" list of test statistics "TestStatisticTable" formatted table of test statistics
• When one sample of size is given, the LeveneTest is equivalent to the FisherRatioTest.
• With {a1, ..., an}=Abs[data1-Mean[data1]] and {b1, ..., bm}=Abs[data2-Mean[data2]] the test statistic is given by where a=Mean[{a1, ...}], b=Mean[{b1, ...}], and c=Mean[{a1, ..., an, b1, ..., bm}]. The test statistic is assumed to follow FRatioDistribution[n-1, m-1] under .
• The following options can be used:
•  AlternativeHypothesis "Unequal" the inequality for the alternative hypothesis SignificanceLevel 0.05 cutoff for diagnostics and reporting VerifyTestAssumptions Automatic set which diagnostic tests to run
• For the LeveneTest, a cutoff is chosen such that is rejected only if . The value of used for the and properties is controlled by the SignificanceLevel option. This value is also used in diagnostic tests of assumptions, including tests for normality and symmetry. By default is set to .
• Named settings for VerifyTestAssumptions in LeveneTest include:
•  "Normality" verify that all data is normally distributed

## ExamplesExamplesopen allclose all

### Basic Examples (2)Basic Examples (2)

Test variances from two populations for equality:

 Out[2]=

Create a HypothesisTestData object for further property extraction:

 Out[3]=

Properties of the test:

 Out[4]=

Compare the variance of a population to a particular value:

 Out[2]=
 Out[3]=

Test against the alternative hypothesis :

 Out[4]=