BUILT-IN WOLFRAM LANGUAGE SYMBOL
tests whether data is normally distributed using the Cramér–von Mises test.
tests whether data is distributed according to dist using the Cramér–von Mises test.
- CramerVonMisesTest performs the Cramér–von Mises goodness-of-fit test with null hypothesis that data was drawn from a population with distribution dist 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 came from dist.
- The dist can be any symbolic distribution with numeric and symbolic parameters or a dataset.
- The data can be univariate or multivariate .
- The Cramér–von Mises test assumes that the data came from a continuous distribution.
- The Cramér–von Mises test effectively uses a test statistic based on the expectation value of where is the empirical CDF of data and is the CDF of dist.
- For univariate data, the test statistic is given by .
- For multivariate tests, the sum of the univariate marginal -values is used and is assumed to follow a UniformSumDistribution under .
- CramerVonMisesTest[data,dist,"HypothesisTestData"] returns a HypothesisTestData object htd that can be used to extract additional test results and properties using the form htd["property"].
- CramerVonMisesTest[data,dist,"property"] can be used to directly give the value of .
- Properties related to the reporting of test results include:
|"PValueTable"||formatted version of |
|"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 |
- 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:
- For a test for goodness of fit, a cutoff is chosen such that is rejected only if . The value of used for the and properties is controlled by the SignificanceLevel option. By default is set to .
- With the setting Method->"MonteCarlo", datasets of the same length as the input are generated under using the fitted distribution. The empirical distribution from CramerVonMisesTest[si,dist,"TestStatistic"] is then used to estimate the -value.
Perform a Cramér–von Mises test for normality:
Confirm the result using QuantilePlot:
Test the fit of some data to a particular distribution:
Compare the distributions of two datasets: