BaringhausHenzeTest
BaringhausHenzeTest[data]
tests whether data follows a MultinormalDistribution using the Baringhaus–Henze test.
BaringhausHenzeTest[data,MultinormalDistribution[μ,Σ]]
tests whether data follows the distribution with mean vector μ and covariance matrix Σ.
BaringhausHenzeTest[data,"property"]
returns the value of "property".
Details and Options
- BaringhausHenzeTest performs a goodness-of-fit test, with null hypothesis that data was drawn from a MultinormalDistribution and alternative hypothesis that it was not.
- BaringhausHenzeTest is also known as Baringhaus–Henze–Epps–Pulley multivariate normality test, or BHEP test.
- By default, a probability value or -value is returned.
- A small -value suggests that it is unlikely that the data came from a multivariate normal distribution.
- The data can be univariate {x1,…,xn} or multivariate {{x1,y1,…},…,{xn,yn,…}}.
- The Baringhaus–Henze test effectively uses a test statistic Tβ based on an distance between the empirical characteristic function of decorrelated standardized data and the standard multivariate Gaussian characteristic function Tβ=Expectation[n Abs[Ψemp[t]-Ψst[t]]2,{t1,…,td}], where =ProductDistribution[{NormalDistribution[0,β],d}]. »
- The β parameter is positive and determines the smoothing of the empirical distribution. It is automatically determined, but can be changed using a Method setting.
- BaringhausHenzeTest[data,MultinormalDistribution[μ,Σ],"HypothesisTestData"] returns a HypothesisTestData object htd that can be used to extract additional test results and properties using the form htd["property"].
- BaringhausHenzeTest[data,MultinormalDistribution[μ,Σ],"property"] can be used to directly give the value of "property".
- Properties related to the reporting of test results include:
-
"PValue" -value "PValueTable" formatted version of "PValue" "ShortTestConclusion" a short description of the conclusion of a test "TestConclusion" a description of the conclusion of a test "TestData" test statistic and -value "TestDataTable" formatted version of "TestData" "TestStatistic" test statistic "TestStatisticTable" formatted "TestStatistic" - The following properties are independent of which test is being performed.
- Properties related to the data distribution include:
-
"FittedDistribution" fitted distribution of data "FittedDistributionParameters" distribution parameters of data - The following options can be given:
-
Method Automatic the method to use for computing -values SignificanceLevel 0.05 cutoff for diagnostics and reporting - For a test for goodness of fit, 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. By default, is set to 0.05. »
- With the setting Method->"MonteCarlo", a number of datasets of the same length as the input are generated under using the fitted distribution. The EmpiricalDistribution from BaringhausHenzeTest[si,"TestStatistic"] is then used to estimate the -value. »
- The setting Method{method,"SmoothingParameter"β} allows for a custom smoothing parameter β. By default, , in which case the test is also known as the Henze–Zirkler test. »
Examples
open allclose allBasic Examples (3)
Scope (6)
Testing (3)
Perform a Baringhaus–Henze test for univariate normality:
The -value for the normal data is large compared to the -value for the non-normal data:
Perform a Baringhaus–Henze test for multivariate normality:
The -value for the normal data is large compared to the -value for the non-normal data:
Create a HypothesisTestData object for repeated property extraction:
Options (3)
Method (2)
Set the smoothing parameter β used in the Baringhaus–Henze test:
The smoothing parameter β has an effect on the resulting -value:
Set the random seed used in Monte Carlo-based methods:
The seed affects the state of the generator and has some effect on the resulting -value:
Find the -value using the Monte Carlo method and a custom setting of the test's parameter β:
Applications (4)
A power (the probability of rejecting when it is false) curve for the Baringhaus–Henze test:
Visualize the approximate power curve:
Estimate the power of the Baringhaus–Henze test when the underlying distribution is a MultivariateTDistribution, the test size is 0.05, and the sample size is 43:
Check whether a continuous-time random process is a Gaussian process. Fractional Brownian motion:
The difference of logarithm of geometric Brownian motion:
The difference of logarithm of the Cox–Ingersoll–Ross process:
The weights of patients before and after a treatment study were recorded. A multivariate test of means can be used as a check in discriminating between the control and experimental groups if the data that follows is multivariate normally distributed:
Use BaringhausHenzeTest to determine if the three groups of data are multivariate normal:
The data in the Cont and FT groups are not rejected by the Baringhaus–Henze test. Use TTest to check whether the means of these two groups are identical:
Test the hypothesis that the data follows a standard uncorrelated binormal distribution:
Properties & Relations (5)
The Baringhaus–Henze test is affine invariant, provided that the linear transformation applied on the data is nonsingular:
The Mardia combined test for normality also shares the same property:
Under the test statistic asymptotically follows a LogNormalDistribution:
Test whether the test statistic follows a distribution from the LogNormalDistribution family:
Show the histogram of the test statistic with the fitted lognormal density:
The BaringhausHenzeTest statistic is based on a distance between the sample empirical characteristic function and the characteristic function under the null hypothesis:
Define the empirical characteristic function and compute the distance:
Compare to the value of the test statistic reported by BaringhausHenzeTest:
For samples with degenerate sample covariance function, the test statistic gives its maximum value of 4 n:
The corresponding -value equals zero:
For small values of the smoothing parameter β, the Baringhaus–Henze test is more sensitive to the tail behavior:
The fraction of rejections of the multivariate normality hypothesis as a function of the smoothing parameter:
Neat Examples (1)
Text
Wolfram Research (2015), BaringhausHenzeTest, Wolfram Language function, https://reference.wolfram.com/language/ref/BaringhausHenzeTest.html.
CMS
Wolfram Language. 2015. "BaringhausHenzeTest." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/BaringhausHenzeTest.html.
APA
Wolfram Language. (2015). BaringhausHenzeTest. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/BaringhausHenzeTest.html