JarqueBeraALMTest

JarqueBeraALMTest[data]

tests whether data is normally distributed using the JarqueBera ALM test.

JarqueBeraALMTest[data,"property"]

returns the value of "property".

Details and Options

  • JarqueBeraALMTest performs the JarqueBera ALM goodness-of-fit test with null hypothesis that data was drawn from a NormalDistribution and alternative hypothesis that it was not.
  • By default, a probability value or -value is returned.
  • A small -value suggests that it is unlikely that the data is normally distributed.
  • The data can be univariate {x1,x2,} or multivariate {{x1,y1,},{x2,y2,},}.
  • The JarqueBera ALM test effectively compares the skewness and kurtosis of data to a NormalDistribution.
  • For univariate data, the test statistic is given by with b_1=Skewness[data], b_2=Kurtosis[data] and correction factors for finite sample sizes given by , , and .
  • For multivariate tests, the sum of the univariate marginal -values is used and is assumed to follow a UniformSumDistribution under .
  • JarqueBeraALMTest[data,dist,"HypothesisTestData"] returns a HypothesisTestData object htd that can be used to extract additional test results and properties using the form htd["property"].
  • JarqueBeraALMTest[data,dist,"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 Automaticthe 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", datasets of the same length as the input are generated under using the fitted distribution. The EmpiricalDistribution from JarqueBeraALMTest[si,"TestStatistic"] is then used to estimate the -value.

Examples

open allclose all

Basic Examples  (3)

Perform a JarqueBera ALM test for normality:

Perform a test for multivariate normality:

Extract the test statistic from a JarqueBera ALM test:

Scope  (6)

Testing  (3)

Perform a JarqueBera ALM test for normality:

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

Test for multivariate normality:

Create a HypothesisTestData object for repeated property extraction:

The properties available for extraction:

Reporting  (3)

Tabulate the results of the JarqueBera ALM test:

The full test table:

A -value table:

The test statistic:

Retrieve the entries from a JarqueBera ALM test table for custom reporting:

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

The conclusion may differ at a different significance level:

Options  (3)

Method  (3)

Use Monte Carlo-based methods or a computation formula:

Set the number of samples to use for Monte Carlo-based methods:

The Monte Carlo estimate converges to the true -value with increasing samples:

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:

Applications  (2)

A power curve for the JarqueBera ALM test:

Visualize the approximate power curve:

Estimate the power of the JarqueBera ALM test when the underlying distribution is a CauchyDistribution[0,1], the test size is 0.05, and the sample size is 12:

Create a JarqueBera ALM test statistic generalized for other distributions:

Finite-sample values for , , and :

A JarqueBera ALM test statistic for fitting to a LaplaceDistribution:

Perform the generalized test on some data:

The -values are uniform as expected:

The test is powerful against the alternative of a HyperbolicDistribution of similar mean and variance:

Properties & Relations  (4)

The Adjusted Lagrange Multiplier (ALM) method outperforms the traditional JarqueBera test:

The traditional JarqueBera test statistic:

The -values are not uniformly distributed:

The JarqueBera ALM test is superior for small samples:

The JarqueBera ALM test uses finite-sample values for the mean and variance of skewness and kurtosis, not the asymptotic values of 0, 6, 3, and 24 as in the traditional test:

The finite-sample values can be derived using MomentEvaluate and MomentConvert:

The test statistics have the same asymptotic distribution:

The JarqueBera ALM statistic under the null hypothesis follows ChiSquareDistribution:

Plot a histogram of the statistic and the probability density function of the distribution:

Test the fit to distribution:

The JarqueBera ALM test works with the values only when the input is a TimeSeries:

Possible Issues  (1)

The JarqueBera ALM test requires sample sizes larger than 9 for -values to be valid:

Neat Examples  (1)

Compute the statistic when the null hypothesis is true:

The test statistic given a particular alternative:

Compare the distributions of the test statistics:

Wolfram Research (2010), JarqueBeraALMTest, Wolfram Language function, https://reference.wolfram.com/language/ref/JarqueBeraALMTest.html.

Text

Wolfram Research (2010), JarqueBeraALMTest, Wolfram Language function, https://reference.wolfram.com/language/ref/JarqueBeraALMTest.html.

CMS

Wolfram Language. 2010. "JarqueBeraALMTest." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/JarqueBeraALMTest.html.

APA

Wolfram Language. (2010). JarqueBeraALMTest. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/JarqueBeraALMTest.html

BibTeX

@misc{reference.wolfram_2024_jarqueberaalmtest, author="Wolfram Research", title="{JarqueBeraALMTest}", year="2010", howpublished="\url{https://reference.wolfram.com/language/ref/JarqueBeraALMTest.html}", note=[Accessed: 12-October-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_jarqueberaalmtest, organization={Wolfram Research}, title={JarqueBeraALMTest}, year={2010}, url={https://reference.wolfram.com/language/ref/JarqueBeraALMTest.html}, note=[Accessed: 12-October-2024 ]}