BaringhausHenzeTest

BaringhausHenzeTest[data]

tests whether data follows a MultinormalDistribution using the BaringhausHenze 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 BaringhausHenzeEppsPulley 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 BaringhausHenze 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:
  • MethodAutomaticthe method to use for computing -values
    SignificanceLevel0.05cutoff 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 HenzeZirkler test. »

Examples

open allclose all

Basic Examples  (3)

Perform a test for multivariate normality:

Extract the test statistic from the BaringhausHenze test:

Obtain a formatted test table:

Scope  (6)

Testing  (3)

Perform a BaringhausHenze test for univariate normality:

The -value for the normal data is large compared to the -value for the non-normal data:

Perform a BaringhausHenze 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:

The properties available for extraction:

Reporting  (3)

Tabulate the results of the BaringhausHenze test:

The full test table:

A -value table:

The test statistic:

Retrieve the entries from a BaringhausHenze test table for custom reporting:

Report test conclusions using "ShortTestConclusion" and "TestConclusion":

The conclusion may differ at a different significance level:

Options  (3)

Method  (2)

Set the smoothing parameter β used in the BaringhausHenze 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 β:

Compare with the -value obtained with the default method:

SignificanceLevel  (1)

Set the significance level used for "TestConclusion" and "ShortTestConclusion":

By default, 0.05 is used:

Applications  (4)

A power (the probability of rejecting when it is false) curve for the BaringhausHenze test:

Visualize the approximate power curve:

Estimate the power of the BaringhausHenze 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 CoxIngersollRoss 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 BaringhausHenze 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 BaringhausHenze 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 BaringhausHenze test is more sensitive to the tail behavior:

The fraction of rejections of the multivariate normality hypothesis as a function of the smoothing parameter:

Compare to the Mardia tests:

Neat Examples  (1)

Define a bivariate distribution with standard normal marginals:

Marginal distributions are standard Gaussians:

Sample from the bivariate distribution:

Plot the histograms of its components and compare them with the density function of standard normal:

The distribution is not jointly Gaussian:

Show the sampled random vectors on the plane:

Introduced in 2015
 (10.2)