VarianceEquivalenceTest
✖
VarianceEquivalenceTest
Details and Options



- VarianceEquivalenceTest performs a hypothesis test on the datai with null hypothesis
that the true population variances are identical to
, and alternative hypothesis
that at least one is different.
- By default, a probability value or
-value is returned.
- A small
-value suggests that it is unlikely that
.
- The datai must be univariate {x1,x2,…}.
- VarianceEquivalenceTest[{data1,…}] will choose the most powerful test that applies to the data.
- VarianceEquivalenceTest[{data1,…},All] will choose all tests that apply to the data.
- VarianceEquivalenceTest[{data1,…},"test"] reports the
-value according to "test".
- Most tests require normally distributed datai. If a test is less sensitive to a normality assumption, it is called robust. Some tests assume that datai is symmetric around its medians.
- The following tests can be used:
-
"Bartlett" normality modified likelihood ratio test "BrownForsythe" robust robust Levene test "Conover" symmetry Conover's squared ranks test "FisherRatio" normality based on "Levene" robust,symmetry compares individual and group variances - VarianceEquivalenceTest[{data1,…},"HypothesisTestData"] returns a HypothesisTestData object htd that can be used to extract additional test results and properties using the form htd["property"].
- VarianceEquivalenceTest[{data1,…},"property"] can be used to directly give the value of "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:
-
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 "TestConclusion" and "ShortTestConclusion" 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 0.05.
- Named settings for VerifyTestAssumptions in VarianceEquivalenceTest include:
-
"Normality" verify that all data is normally distributed "Symmetry" verify that all data is symmetric
Examples
open allclose allBasic Examples (2)Summary of the most common use cases
Test variances from two datasets for equivalence:

https://wolfram.com/xid/0bzrzndi2oci7h3za-kd5itj

https://wolfram.com/xid/0bzrzndi2oci7h3za-lpfld5

Create a HypothesisTestData object for further property extraction:

https://wolfram.com/xid/0bzrzndi2oci7h3za-ybn5y


https://wolfram.com/xid/0bzrzndi2oci7h3za-yfec

Compare the variances of multiple datasets simultaneously:

https://wolfram.com/xid/0bzrzndi2oci7h3za-lbi4hl

https://wolfram.com/xid/0bzrzndi2oci7h3za-eocrh

The variances of the datasets:

https://wolfram.com/xid/0bzrzndi2oci7h3za-b87w5s

Scope (12)Survey of the scope of standard use cases
Testing (8)
Compare the variances of two datasets:

https://wolfram.com/xid/0bzrzndi2oci7h3za-mk1rwj
The -values are typically large when the variances are equal:

https://wolfram.com/xid/0bzrzndi2oci7h3za-dcnktx

The -values are typically small when the variances are not equal:

https://wolfram.com/xid/0bzrzndi2oci7h3za-b15esj

Using Automatic applies the generally most powerful appropriate test:

https://wolfram.com/xid/0bzrzndi2oci7h3za-d8h646

https://wolfram.com/xid/0bzrzndi2oci7h3za-igjm8j

The property "AutomaticTest" can be used to determine which test was chosen:

https://wolfram.com/xid/0bzrzndi2oci7h3za-ciuhxp

Compare the variances of many datasets simultaneously:

https://wolfram.com/xid/0bzrzndi2oci7h3za-p37f5

https://wolfram.com/xid/0bzrzndi2oci7h3za-drkkbz

Compare the distributions of the datasets visually using SmoothHistogram:

https://wolfram.com/xid/0bzrzndi2oci7h3za-bi6j5a

Perform a particular test for equal variance:

https://wolfram.com/xid/0bzrzndi2oci7h3za-8xri

https://wolfram.com/xid/0bzrzndi2oci7h3za-c5sfpm

Any number of tests can be performed simultaneously:

https://wolfram.com/xid/0bzrzndi2oci7h3za-wyttw

Perform all tests, appropriate to the data, simultaneously:

https://wolfram.com/xid/0bzrzndi2oci7h3za-lasd82

https://wolfram.com/xid/0bzrzndi2oci7h3za-nu5yl

Use the property "AllTests" to identify which tests were used:

https://wolfram.com/xid/0bzrzndi2oci7h3za-gvjord

Create a HypothesisTestData object for repeated property extraction:

https://wolfram.com/xid/0bzrzndi2oci7h3za-0x5m5

https://wolfram.com/xid/0bzrzndi2oci7h3za-cc8eh1
The properties available for extraction:

https://wolfram.com/xid/0bzrzndi2oci7h3za-frvg20

Extract some properties from a HypothesisTestData object:

https://wolfram.com/xid/0bzrzndi2oci7h3za-c03go

https://wolfram.com/xid/0bzrzndi2oci7h3za-bpn9dr
The -value and test statistic from a Levene test:

https://wolfram.com/xid/0bzrzndi2oci7h3za-365dq


https://wolfram.com/xid/0bzrzndi2oci7h3za-bn5rjv

Extract any number of properties simultaneously:

https://wolfram.com/xid/0bzrzndi2oci7h3za-bycagv

https://wolfram.com/xid/0bzrzndi2oci7h3za-dmu6hk
The -value and test statistic from a Brown–Forsythe test:

https://wolfram.com/xid/0bzrzndi2oci7h3za-i6fwj7

Reporting (4)
Tabulate the results from a selection of tests:

https://wolfram.com/xid/0bzrzndi2oci7h3za-ba6zb1

https://wolfram.com/xid/0bzrzndi2oci7h3za-hb1mu5

https://wolfram.com/xid/0bzrzndi2oci7h3za-hh3kq

A full table of all appropriate test results:

https://wolfram.com/xid/0bzrzndi2oci7h3za-c83kyd

A table of selected test results:

https://wolfram.com/xid/0bzrzndi2oci7h3za-gxraq6

Retrieve the entries from a test table for customized reporting:

https://wolfram.com/xid/0bzrzndi2oci7h3za-cg07e5

https://wolfram.com/xid/0bzrzndi2oci7h3za-98x7a

https://wolfram.com/xid/0bzrzndi2oci7h3za-fq0ubv

https://wolfram.com/xid/0bzrzndi2oci7h3za-72dsk

The -values are above 0.05, so there is not enough evidence to reject normality at that level:

https://wolfram.com/xid/0bzrzndi2oci7h3za-evyuso

Tabulate -values for a test or group of tests:

https://wolfram.com/xid/0bzrzndi2oci7h3za-fr3ezf

https://wolfram.com/xid/0bzrzndi2oci7h3za-blo8x

https://wolfram.com/xid/0bzrzndi2oci7h3za-g8i1dt


https://wolfram.com/xid/0bzrzndi2oci7h3za-o0wuj

A table of -values from all appropriate tests:

https://wolfram.com/xid/0bzrzndi2oci7h3za-d225dd

A table of -values from a subset of tests:

https://wolfram.com/xid/0bzrzndi2oci7h3za-zutii

Report the test statistic from a test or group of tests:

https://wolfram.com/xid/0bzrzndi2oci7h3za-dv0ouz

https://wolfram.com/xid/0bzrzndi2oci7h3za-bsvl57

https://wolfram.com/xid/0bzrzndi2oci7h3za-kx4361

The test statistic from the table:

https://wolfram.com/xid/0bzrzndi2oci7h3za-bitsqd

A table of test statistics from all appropriate tests:

https://wolfram.com/xid/0bzrzndi2oci7h3za-dw7vzl

Options (6)Common values & functionality for each option
SignificanceLevel (3)
Set the significance level for diagnostic tests:

https://wolfram.com/xid/0bzrzndi2oci7h3za-fn2ahc

https://wolfram.com/xid/0bzrzndi2oci7h3za-dwfi1


https://wolfram.com/xid/0bzrzndi2oci7h3za-cod4ca


Setting the significance level may alter which test is automatically chosen:

https://wolfram.com/xid/0bzrzndi2oci7h3za-tvs8p

https://wolfram.com/xid/0bzrzndi2oci7h3za-gbpe5z

A rank-based test would have been chosen by default:

https://wolfram.com/xid/0bzrzndi2oci7h3za-d5nssu

The significance level is also used for "TestConclusion" and "ShortTestConclusion":

https://wolfram.com/xid/0bzrzndi2oci7h3za-bhkod7

https://wolfram.com/xid/0bzrzndi2oci7h3za-lasldz

https://wolfram.com/xid/0bzrzndi2oci7h3za-hykroc

https://wolfram.com/xid/0bzrzndi2oci7h3za-bvt7nt


https://wolfram.com/xid/0bzrzndi2oci7h3za-hpqqgh


https://wolfram.com/xid/0bzrzndi2oci7h3za-flavjg


https://wolfram.com/xid/0bzrzndi2oci7h3za-m2oyg2

VerifyTestAssumptions (3)
Diagnostics can be controlled as a group using All or None:

https://wolfram.com/xid/0bzrzndi2oci7h3za-ma0mld

https://wolfram.com/xid/0bzrzndi2oci7h3za-bg3dnp



https://wolfram.com/xid/0bzrzndi2oci7h3za-foxivl

Diagnostics can be controlled independently:

https://wolfram.com/xid/0bzrzndi2oci7h3za-btjvx7
Assume normality but check for symmetry:

https://wolfram.com/xid/0bzrzndi2oci7h3za-e6eshh


https://wolfram.com/xid/0bzrzndi2oci7h3za-djybum


Test assumption values can be explicitly set:

https://wolfram.com/xid/0bzrzndi2oci7h3za-fsso4k

https://wolfram.com/xid/0bzrzndi2oci7h3za-blew9l


https://wolfram.com/xid/0bzrzndi2oci7h3za-hh8mmo

The Conover test was previously chosen because the data is not normally distributed:

https://wolfram.com/xid/0bzrzndi2oci7h3za-gp604


Applications (2)Sample problems that can be solved with this function
Test whether a group of populations shares a common variance:

https://wolfram.com/xid/0bzrzndi2oci7h3za-bd2iql

https://wolfram.com/xid/0bzrzndi2oci7h3za-izmf6

https://wolfram.com/xid/0bzrzndi2oci7h3za-gsmkci

The first group of datasets was drawn from populations with very different variances:

https://wolfram.com/xid/0bzrzndi2oci7h3za-d0db27

Populations represented by the second group all have similar variances:

https://wolfram.com/xid/0bzrzndi2oci7h3za-556bk

LocationEquivalenceTest can be used to compare the means of several datasets simultaneously but requires that the datasets have common variance:

https://wolfram.com/xid/0bzrzndi2oci7h3za-ceariv

https://wolfram.com/xid/0bzrzndi2oci7h3za-blltym

Use VarianceEquivalenceTest to determine if the variances are equivalent:

https://wolfram.com/xid/0bzrzndi2oci7h3za-bw9g63

LocationEquivalenceTest can be used to compare the means:

https://wolfram.com/xid/0bzrzndi2oci7h3za-ep9jp0

Properties & Relations (5)Properties of the function, and connections to other functions
The Brown–Forsythe and Levene tests are equivalent but use different standardizing functions:

https://wolfram.com/xid/0bzrzndi2oci7h3za-iihiy9

https://wolfram.com/xid/0bzrzndi2oci7h3za-91x6y
The Levene test uses Mean to standardize the data:

https://wolfram.com/xid/0bzrzndi2oci7h3za-cnija


https://wolfram.com/xid/0bzrzndi2oci7h3za-d5blv

The Brown–Forsythe test typically uses Median:

https://wolfram.com/xid/0bzrzndi2oci7h3za-gzrhou


https://wolfram.com/xid/0bzrzndi2oci7h3za-eoaj68

For heavy-tailed data, the 10% TrimmedMean is used instead:

https://wolfram.com/xid/0bzrzndi2oci7h3za-m6v3w

https://wolfram.com/xid/0bzrzndi2oci7h3za-exvj0l


https://wolfram.com/xid/0bzrzndi2oci7h3za-hjy38e

For datasets and
total observations, the Brown–Forsythe and Levene test statistics both follow FRatioDistribution[k-1,n-k] under
:

https://wolfram.com/xid/0bzrzndi2oci7h3za-c43eb2

https://wolfram.com/xid/0bzrzndi2oci7h3za-jbuxa2

https://wolfram.com/xid/0bzrzndi2oci7h3za-kbzcjn


https://wolfram.com/xid/0bzrzndi2oci7h3za-d68fhv


https://wolfram.com/xid/0bzrzndi2oci7h3za-bkf78g


https://wolfram.com/xid/0bzrzndi2oci7h3za-dk1ck5


https://wolfram.com/xid/0bzrzndi2oci7h3za-c5td22

https://wolfram.com/xid/0bzrzndi2oci7h3za-e7i4w0

https://wolfram.com/xid/0bzrzndi2oci7h3za-xb1ec

https://wolfram.com/xid/0bzrzndi2oci7h3za-eyc09v


https://wolfram.com/xid/0bzrzndi2oci7h3za-btngqa

Under , the test statistic follows ChiSquareDistribution[k-1]:

https://wolfram.com/xid/0bzrzndi2oci7h3za-of95jx

https://wolfram.com/xid/0bzrzndi2oci7h3za-es5cf4

https://wolfram.com/xid/0bzrzndi2oci7h3za-klpwcg


https://wolfram.com/xid/0bzrzndi2oci7h3za-dc4a3o

The variance equivalence test ignores the time stamps when the input is a TimeSeries:

https://wolfram.com/xid/0bzrzndi2oci7h3za-7py5sj

https://wolfram.com/xid/0bzrzndi2oci7h3za-0467fg

https://wolfram.com/xid/0bzrzndi2oci7h3za-57bf57


https://wolfram.com/xid/0bzrzndi2oci7h3za-vvd88

The variance equivalence test recognizes the path structure of a TemporalData:

https://wolfram.com/xid/0bzrzndi2oci7h3za-qry3ls

https://wolfram.com/xid/0bzrzndi2oci7h3za-b1l4g0


https://wolfram.com/xid/0bzrzndi2oci7h3za-jdvl55

Possible Issues (2)Common pitfalls and unexpected behavior
The Fisher ratio test requires two datasets:

https://wolfram.com/xid/0bzrzndi2oci7h3za-ewcizk

https://wolfram.com/xid/0bzrzndi2oci7h3za-ga955u


Use any of the other tests instead:

https://wolfram.com/xid/0bzrzndi2oci7h3za-dfuadx

Conover's test is the only test that does not assume the data is normally distributed:

https://wolfram.com/xid/0bzrzndi2oci7h3za-rl5yd

https://wolfram.com/xid/0bzrzndi2oci7h3za-dt4yl



https://wolfram.com/xid/0bzrzndi2oci7h3za-qw5pi

Neat Examples (1)Surprising or curious use cases
Compute the statistic when the null hypothesis is true:

https://wolfram.com/xid/0bzrzndi2oci7h3za-2qqg3c

https://wolfram.com/xid/0bzrzndi2oci7h3za-ywy3ty
The test statistic given a particular alternative:

https://wolfram.com/xid/0bzrzndi2oci7h3za-qxgi9j

https://wolfram.com/xid/0bzrzndi2oci7h3za-c5cy2n
Compare the distributions of the test statistics:

https://wolfram.com/xid/0bzrzndi2oci7h3za-87eb6q

Wolfram Research (2010), VarianceEquivalenceTest, Wolfram Language function, https://reference.wolfram.com/language/ref/VarianceEquivalenceTest.html.
Text
Wolfram Research (2010), VarianceEquivalenceTest, Wolfram Language function, https://reference.wolfram.com/language/ref/VarianceEquivalenceTest.html.
Wolfram Research (2010), VarianceEquivalenceTest, Wolfram Language function, https://reference.wolfram.com/language/ref/VarianceEquivalenceTest.html.
CMS
Wolfram Language. 2010. "VarianceEquivalenceTest." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/VarianceEquivalenceTest.html.
Wolfram Language. 2010. "VarianceEquivalenceTest." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/VarianceEquivalenceTest.html.
APA
Wolfram Language. (2010). VarianceEquivalenceTest. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/VarianceEquivalenceTest.html
Wolfram Language. (2010). VarianceEquivalenceTest. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/VarianceEquivalenceTest.html
BibTeX
@misc{reference.wolfram_2025_varianceequivalencetest, author="Wolfram Research", title="{VarianceEquivalenceTest}", year="2010", howpublished="\url{https://reference.wolfram.com/language/ref/VarianceEquivalenceTest.html}", note=[Accessed: 17-May-2025
]}
BibLaTeX
@online{reference.wolfram_2025_varianceequivalencetest, organization={Wolfram Research}, title={VarianceEquivalenceTest}, year={2010}, url={https://reference.wolfram.com/language/ref/VarianceEquivalenceTest.html}, note=[Accessed: 17-May-2025
]}