WOLFRAM

tests whether data follows a MultinormalDistribution using the Mardia combined test.

MardiaCombinedTest[data,"property"]

returns the value of "property".

Details and Options

  • MardiaCombinedTest performs a goodness-of-fit test with null hypothesis that data was drawn from a MultinormalDistribution 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 Mardia combined test effectively pools the results from MardiaSkewnessTest and MardiaKurtosisTest.
  • MardiaCombinedTest[data,dist,"HypothesisTestData"] returns a HypothesisTestData object htd that can be used to extract additional test results and properties using the form htd["property"].
  • MardiaCombinedTest[data,dist,"property"] can be used to directly give the value of "property".
  • Properties related to the reporting of test results include:
  • "DegreesOfFreedom"the degrees of freedom used in a test
    "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
    SignificanceLevel 0.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 MardiaCombinedTest[si,"TestStatistic"] is then used to estimate the -value.

Examples

open allclose all

Basic Examples  (3)Summary of the most common use cases

Perform a test for multivariate normality:

Out[2]=2
Out[3]=3

Extract the test statistic from the Mardia combined test:

Out[2]=2

Obtain a formatted test table:

Out[2]=2

Scope  (5)Survey of the scope of standard use cases

Testing  (2)

Perform a Mardia test for multivariate normality:

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

Out[3]=3
Out[4]=4

Create a HypothesisTestData object for repeated property extraction:

Out[2]=2

The properties available for extraction:

Out[3]=3

Reporting  (3)

Tabulate the results of the Mardia combined test:

The full test table:

Out[3]=3

A -value table:

Out[4]=4

The test statistic:

Out[5]=5

Retrieve the entries from a Mardia combined test table for custom reporting:

Out[2]=2
Out[3]=3
Out[4]=4

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

Out[3]=3

The conclusion may differ at a different significance level:

Out[6]=6

Options  (4)Common values & functionality for each option

Method  (3)

Use Monte Carlo-based methods or a computation formula:

Out[2]=2
Out[3]=3

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

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

Out[4]=4

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:

Out[4]=4

SignificanceLevel  (1)

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

Out[5]=5
Out[6]=6

By default, 0.05 is used:

Applications  (2)Sample problems that can be solved with this function

A power curve for the Mardia combined test:

Visualize the approximate power curve:

Out[4]=4

Estimate the power of the Mardia combined test when the underlying distribution is a MultivariateTDistribution, the test size is 0.05, and the sample size is 12:

Out[5]=5

Five morphological measures were recorded for two separate varieties of a crab species. A researcher hopes to simultaneously compare all the measures across the species using multivariate analysis of variance, which requires that the data is multivariate normal:

Out[2]=2

Use MardiaCombinedTest to determine if both sets of data are multivariate normal:

Out[4]=4
Out[5]=5

Univariate density estimates of the five measures for each species:

Out[7]=7

The deviation from normality appears to be in the skewness:

Out[8]=8
Out[9]=9

Properties & Relations  (3)Properties of the function, and connections to other functions

The multivariate test statistic:

Out[10]=10
Out[11]=11

Under , the test statistic asymptotically follows a ChiSquareDistribution:

Out[14]=14

For univariate data, the test is equivalent to the JarqueBeraALMTest:

Out[2]=2
Out[3]=3

The Mardia combined test works with the values only when the input is a TimeSeries:

Out[2]=2
Out[3]=3
Out[4]=4

Possible Issues  (1)Common pitfalls and unexpected behavior

If the covariance matrix of the data is not positive definite, the test will fail:

Out[2]=2
Out[3]=3

The number of data points must be greater than the dimension of the data:

Out[5]=5
Out[6]=6
Out[7]=7

Neat Examples  (1)Surprising or curious use cases

Compute the statistic when the null hypothesis is true:

The test statistic given a particular alternative:

Compare the distributions of the test statistics:

Out[5]=5
Wolfram Research (2010), MardiaCombinedTest, Wolfram Language function, https://reference.wolfram.com/language/ref/MardiaCombinedTest.html.
Wolfram Research (2010), MardiaCombinedTest, Wolfram Language function, https://reference.wolfram.com/language/ref/MardiaCombinedTest.html.

Text

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

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

CMS

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

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

APA

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

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

BibTeX

@misc{reference.wolfram_2025_mardiacombinedtest, author="Wolfram Research", title="{MardiaCombinedTest}", year="2010", howpublished="\url{https://reference.wolfram.com/language/ref/MardiaCombinedTest.html}", note=[Accessed: 30-April-2025 ]}

@misc{reference.wolfram_2025_mardiacombinedtest, author="Wolfram Research", title="{MardiaCombinedTest}", year="2010", howpublished="\url{https://reference.wolfram.com/language/ref/MardiaCombinedTest.html}", note=[Accessed: 30-April-2025 ]}

BibLaTeX

@online{reference.wolfram_2025_mardiacombinedtest, organization={Wolfram Research}, title={MardiaCombinedTest}, year={2010}, url={https://reference.wolfram.com/language/ref/MardiaCombinedTest.html}, note=[Accessed: 30-April-2025 ]}

@online{reference.wolfram_2025_mardiacombinedtest, organization={Wolfram Research}, title={MardiaCombinedTest}, year={2010}, url={https://reference.wolfram.com/language/ref/MardiaCombinedTest.html}, note=[Accessed: 30-April-2025 ]}