This is documentation for Mathematica 8, which was
based on an earlier version of the Wolfram Language.

# VarianceTest

 VarianceTest[data] tests whether the variance of the data is one. VarianceTesttests whether the variances of and are equal. VarianceTesttests a dispersion measure against . VarianceTestreturns the value of .
• performs a hypothesis test on data with null hypothesis that the true population dispersion parameter , and alternative hypothesis that .
• By default a probability value or -value is returned.
• A small -value suggests that it is unlikely that is true.
• The data must be univariate .
• The argument can be any positive real number.
• VarianceTest will choose the most powerful test that applies to dspec.
• Most tests require normally distributed data. If a test is less sensitive to a normality assumption, it is called robust. Some tests assume that data is symmetric around its medians.
• The following tests can be used:
 "BrownForsythe" robust robust Levene test "Conover" symmetry based on squared ranks of data "FisherRatio" normality based on "Levene" robust,symmetry compare individual and group variances "SiegelTukey" symmetry based on ranks of pooled data
• VarianceTest returns a HypothesisTestData object htd that can be used to extract additional test results and properties using the form htd["property"].
• Properties related to the reporting of test results include:
 "AllTests" list of all applicable tests "AutomaticTest" test chosen if Automatic is used "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
• The following options can be given:
 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 tests of variance, 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 .
 "Normality" verify that all data is normally distributed "Symmetry" verify symmetry about a common median
Test variances from two populations for equality:
Create a HypothesisTestData object for further property extraction:
The full test table:
Compare the variance of a population to a particular value:
Test the ratio of the variances of two populations against a particular value:
Perform the test with alternative hypothesis :
Test variances from two populations for equality:
 Out[2]=
Create a HypothesisTestData object for further property extraction:
 Out[3]=
The full test table:
 Out[4]=

Compare the variance of a population to a particular value:
 Out[2]=
 Out[3]=

Test the ratio of the variances of two populations against a particular value:
 Out[2]=
 Out[3]=
Perform the test with alternative hypothesis :
 Out[4]=
 Scope   (14)
Test whether the variance of a population is one:
The -values are typically large under :
The -values are typically small when is false:
Compare the variance of a population to a particular value:
Compare the variances of two populations:
The -values are typically large when the variances are equal:
The -values are typically small when the variances are not equal:
Test whether the ratio of the variances of two populations is a particular value:
The following forms are equivalent:
The order of the datasets should be considered when determining :
Using Automatic applies the generally most powerful appropriate test:
The property can be used to determine which test was chosen:
Perform a particular test for equal variance:
Any number of tests can be performed simultaneously:
Perform all tests appropriate to the data simultaneously:
Use the property to identify which tests were used:
Create a HypothesisTestData object for repeated property extraction:
The properties available for extraction:
Extract some properties from a HypothesisTestData object:
The -value and test statistic from a Levene test:
Extract any number of properties simultaneously:
The -value and test statistic from the Brown-Forsythe test:
Tabulate the results from a selection of tests:
A full table of all appropriate test results:
A table of selected test results:
Retrieve the entries from a test table for customized reporting:
The -values are above 0.05, so there is not enough evidence to reject normality at that level:
Tabulate -values for a test or group of tests:
The -value from the table:
A table of -values from all appropriate tests:
A table of -values from a subset of tests:
Report the test statistic from a test or group of tests:
The test statistic from the table:
A table of test statistics from all appropriate tests:
 Options   (9)
A two-sided test is performed by default:
Test versus :
Perform a two-sided test or a one-sided alternative:
Test versus :
Test versus :
Test versus :
Perform tests with one-sided alternatives when a null value is given:
Test versus :
Test versus :
Set the significance level for diagnostic tests:
By default, is used:
Setting the significance level may alter which test is automatically chosen:
A rank-based test would have been chosen by default:
The significance level is also used for and :
Diagnostics can be controlled as a group using All or None:
Verify all assumptions:
Check no assumptions:
Diagnostics can be controlled independently:
Assume normality but check for symmetry:
Only check for normality:
It is often useful to bypass diagnostic tests for simulation purposes:
The assumptions of the test hold by design, so a great deal of time can be saved:
The results are identical:
 Applications   (2)
Test whether the variances of some populations are equivalent:
The first two populations have similar variances:
The third population differs in variance from the first:
An object with a length of 2.15 cm was measured with the same ruler by 25 grade-school students in two different classes:
The second group is superior in their precision:
Compare the accuracy of the groups using squared error:
The first group is significantly more accurate:
The -value suggests the expected proportion of false positives (Type I errors):
Setting the size of a test to results in an erroneous rejection of about 5% of the time:
The power of each test is the probability of rejecting when it is false:
The power of the tests at six different levels. The Siegel-Tukey has the lowest power:
The power of the tests is proportional to the sample size:
The power of the tests is lower than in the previous example:
A two-sided -value is twice the smaller of the two one-sided -values:
The Brown-Forsythe and Levene tests are equivalent to the Fisher ratio test for a single sample:
The Conover and Siegel-Tukey tests are not defined for a single sample:
Some tests assume the data is normally distributed:
Conover's test and the Siegel-Tukey test do not assume normality:
New in 8