KuiperTest
✖
KuiperTest
Details and Options



- KuiperTest performs the Kuiper 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 {x1,x2,…} or multivariate {{x1,y1,…},{x2,y2,…},…}.
- The Kuiper test assumes that the data came from a continuous distribution.
- The Kuiper test effectively uses a test statistic based on
where
is the empirical CDF of data and
is the CDF of dist.
- For multivariate tests, the sum of the univariate marginal
-values is used and is assumed to follow a UniformSumDistribution under
.
- KuiperTest[data,dist,"HypothesisTestData"] returns a HypothesisTestData object htd that can be used to extract additional test results and properties using the form htd["property"].
- KuiperTest[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 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",
datasets of the same length as the input
are generated under
using the fitted distribution. The EmpiricalDistribution from KuiperTest[si,dist,"TestStatistic"] is then used to estimate the
-value.
Examples
open allclose allBasic Examples (4)Summary of the most common use cases
Perform a Kuiper test for normality:

https://wolfram.com/xid/0c0sh6jv3d8w2-e2z9oi

https://wolfram.com/xid/0c0sh6jv3d8w2-b6snhw

Test the fit of some data to a particular distribution:

https://wolfram.com/xid/0c0sh6jv3d8w2-erxs41

https://wolfram.com/xid/0c0sh6jv3d8w2-dofsl4

Compare the distributions of two datasets:

https://wolfram.com/xid/0c0sh6jv3d8w2-b8s07g

https://wolfram.com/xid/0c0sh6jv3d8w2-ckwifh

https://wolfram.com/xid/0c0sh6jv3d8w2-ht6wkq

Extract the test statistic from a Kuiper test:

https://wolfram.com/xid/0c0sh6jv3d8w2-m3chh3

https://wolfram.com/xid/0c0sh6jv3d8w2-cm7ucc

Scope (9)Survey of the scope of standard use cases
Testing (6)
Perform a Kuiper test for normality:

https://wolfram.com/xid/0c0sh6jv3d8w2-lqxbgq
The -value for the normal data is large compared to the
-value for the non-normal data:

https://wolfram.com/xid/0c0sh6jv3d8w2-mks25


https://wolfram.com/xid/0c0sh6jv3d8w2-kjd2s

Test the goodness-of-fit to a particular distribution:

https://wolfram.com/xid/0c0sh6jv3d8w2-budcm8

https://wolfram.com/xid/0c0sh6jv3d8w2-dtqxca


https://wolfram.com/xid/0c0sh6jv3d8w2-ci5vf

Compare the distributions of two datasets:

https://wolfram.com/xid/0c0sh6jv3d8w2-f1whrm

https://wolfram.com/xid/0c0sh6jv3d8w2-2qof

The two datasets do not have the same distribution:

https://wolfram.com/xid/0c0sh6jv3d8w2-inhd0f

https://wolfram.com/xid/0c0sh6jv3d8w2-bbarau

Test for multivariate normality:

https://wolfram.com/xid/0c0sh6jv3d8w2-67n6h

https://wolfram.com/xid/0c0sh6jv3d8w2-eooal3


https://wolfram.com/xid/0c0sh6jv3d8w2-cn5yan

Test for goodness-of-fit to any multivariate distribution:

https://wolfram.com/xid/0c0sh6jv3d8w2-gtwavq

https://wolfram.com/xid/0c0sh6jv3d8w2-n3thk6

https://wolfram.com/xid/0c0sh6jv3d8w2-hlhupv


https://wolfram.com/xid/0c0sh6jv3d8w2-ut5c

Create a HypothesisTestData object for repeated property extraction:

https://wolfram.com/xid/0c0sh6jv3d8w2-cdnr2n

https://wolfram.com/xid/0c0sh6jv3d8w2-bolz27

The properties available for extraction:

https://wolfram.com/xid/0c0sh6jv3d8w2-e40fsc

Reporting (3)
Tabulate the results of the Kuiper test:

https://wolfram.com/xid/0c0sh6jv3d8w2-cqxopz

https://wolfram.com/xid/0c0sh6jv3d8w2-be6kk1

https://wolfram.com/xid/0c0sh6jv3d8w2-ef4et7


https://wolfram.com/xid/0c0sh6jv3d8w2-bfqugt


https://wolfram.com/xid/0c0sh6jv3d8w2-oi9r56

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

https://wolfram.com/xid/0c0sh6jv3d8w2-s3qsd

https://wolfram.com/xid/0c0sh6jv3d8w2-ga3bij


https://wolfram.com/xid/0c0sh6jv3d8w2-gg2n22


https://wolfram.com/xid/0c0sh6jv3d8w2-65k71

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

https://wolfram.com/xid/0c0sh6jv3d8w2-bkir6y

https://wolfram.com/xid/0c0sh6jv3d8w2-cd96sm

https://wolfram.com/xid/0c0sh6jv3d8w2-ggy9zn


https://wolfram.com/xid/0c0sh6jv3d8w2-el9mb

The conclusion may differ at a different significance level:

https://wolfram.com/xid/0c0sh6jv3d8w2-c53cri

https://wolfram.com/xid/0c0sh6jv3d8w2-byyexa


https://wolfram.com/xid/0c0sh6jv3d8w2-bc67bi

Options (3)Common values & functionality for each option
Method (3)
Use Monte Carlo-based methods for a computation formula:

https://wolfram.com/xid/0c0sh6jv3d8w2-b56tvj

https://wolfram.com/xid/0c0sh6jv3d8w2-eyrfe


https://wolfram.com/xid/0c0sh6jv3d8w2-evuhgg

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

https://wolfram.com/xid/0c0sh6jv3d8w2-xg6xc

https://wolfram.com/xid/0c0sh6jv3d8w2-499mh
The Monte Carlo estimate converges to the true -value with increasing samples:

https://wolfram.com/xid/0c0sh6jv3d8w2-eli8sg

https://wolfram.com/xid/0c0sh6jv3d8w2-ba5c5u

Set the random seed used in Monte Carlo-based methods:

https://wolfram.com/xid/0c0sh6jv3d8w2-ccet45

https://wolfram.com/xid/0c0sh6jv3d8w2-ip8pt1
The seed affects the state of the generator and has some effect on the resulting -value:

https://wolfram.com/xid/0c0sh6jv3d8w2-go8plt

https://wolfram.com/xid/0c0sh6jv3d8w2-pfg0ok

Applications (2)Sample problems that can be solved with this function
A power curve for the Kuiper test:

https://wolfram.com/xid/0c0sh6jv3d8w2-f9ry9j

https://wolfram.com/xid/0c0sh6jv3d8w2-bhp5v

https://wolfram.com/xid/0c0sh6jv3d8w2-fyqopk
Visualize the approximate power curve:

https://wolfram.com/xid/0c0sh6jv3d8w2-eel2vq

Estimate the power of the Kuiper test when the underlying distribution is a UniformDistribution[{-4,4}], the test size is 0.05, and the sample size is 12:

https://wolfram.com/xid/0c0sh6jv3d8w2-z6f7c

Spatial signs transform bivariate data to points on a unit circle and are often used in tests of location. The null hypothesis can be tested by determining whether the spatial signs are significantly clustered:

https://wolfram.com/xid/0c0sh6jv3d8w2-crkf30

https://wolfram.com/xid/0c0sh6jv3d8w2-h23jph
Clustering occurs for nonzero mean vectors:

https://wolfram.com/xid/0c0sh6jv3d8w2-bxzy6

A bivariate test for location using spatial signs and Kuiper's test:

https://wolfram.com/xid/0c0sh6jv3d8w2-bfom3s

https://wolfram.com/xid/0c0sh6jv3d8w2-dx71bz

The test does not reject when the mean is close to the null value:

https://wolfram.com/xid/0c0sh6jv3d8w2-jru3mf

The test rejects the null hypothesis when the mean is not close to the null value:

https://wolfram.com/xid/0c0sh6jv3d8w2-d7ae2n

Properties & Relations (7)Properties of the function, and connections to other functions
By default, univariate data is compared to a NormalDistribution:

https://wolfram.com/xid/0c0sh6jv3d8w2-in3dv2

https://wolfram.com/xid/0c0sh6jv3d8w2-loot1k

https://wolfram.com/xid/0c0sh6jv3d8w2-ekgpjw

The parameters have been estimated from the data:

https://wolfram.com/xid/0c0sh6jv3d8w2-f3jfr4

Multivariate data is compared to a MultinormalDistribution by default:

https://wolfram.com/xid/0c0sh6jv3d8w2-dhffw

https://wolfram.com/xid/0c0sh6jv3d8w2-cddu5a

https://wolfram.com/xid/0c0sh6jv3d8w2-hpjfy5


https://wolfram.com/xid/0c0sh6jv3d8w2-bstr67

The parameters of the test distribution are estimated from the data if not specified:

https://wolfram.com/xid/0c0sh6jv3d8w2-d47mlh

https://wolfram.com/xid/0c0sh6jv3d8w2-io3pky

Specified parameters are not estimated:

https://wolfram.com/xid/0c0sh6jv3d8w2-hxkimc


https://wolfram.com/xid/0c0sh6jv3d8w2-nx9q2m

Maximum-likelihood estimates are used for unspecified parameters of the test distribution:

https://wolfram.com/xid/0c0sh6jv3d8w2-ob999

https://wolfram.com/xid/0c0sh6jv3d8w2-ccvtx8


https://wolfram.com/xid/0c0sh6jv3d8w2-lczwnz

If the parameters are unknown, KuiperTest applies a correction when possible:

https://wolfram.com/xid/0c0sh6jv3d8w2-cyr6pp

https://wolfram.com/xid/0c0sh6jv3d8w2-cdmjix

The parameters are estimated but no correction is applied:

https://wolfram.com/xid/0c0sh6jv3d8w2-j8jo0o


https://wolfram.com/xid/0c0sh6jv3d8w2-e87ev
The fitted distribution is the same as before and the -value is corrected:

https://wolfram.com/xid/0c0sh6jv3d8w2-voh29


https://wolfram.com/xid/0c0sh6jv3d8w2-bx464

Independent marginal densities are assumed in tests for multivariate goodness-of-fit:

https://wolfram.com/xid/0c0sh6jv3d8w2-et8fgp

https://wolfram.com/xid/0c0sh6jv3d8w2-plqmfp

The test statistic is identical when independence is assumed:

https://wolfram.com/xid/0c0sh6jv3d8w2-fpwagd

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

https://wolfram.com/xid/0c0sh6jv3d8w2-7py5sj

https://wolfram.com/xid/0c0sh6jv3d8w2-57bf57


https://wolfram.com/xid/0c0sh6jv3d8w2-vvd88

Possible Issues (3)Common pitfalls and unexpected behavior
The Kuiper test is not intended for discrete distributions:

https://wolfram.com/xid/0c0sh6jv3d8w2-ij76p8

https://wolfram.com/xid/0c0sh6jv3d8w2-lhq85x



The test tends to be quite conservative:

https://wolfram.com/xid/0c0sh6jv3d8w2-c4yi92

https://wolfram.com/xid/0c0sh6jv3d8w2-btzbk7

https://wolfram.com/xid/0c0sh6jv3d8w2-ckrxq

Use Monte Carlo methods or PearsonChiSquareTest in these cases:

https://wolfram.com/xid/0c0sh6jv3d8w2-lr0kz




https://wolfram.com/xid/0c0sh6jv3d8w2-c82uj5

The Kuiper test is not valid for some distributions when parameters have been estimated from the data:

https://wolfram.com/xid/0c0sh6jv3d8w2-bfm9lx

https://wolfram.com/xid/0c0sh6jv3d8w2-bhkslk


Provide parameter values if they are known:

https://wolfram.com/xid/0c0sh6jv3d8w2-ciyvsi

Alternatively, use Monte Carlo methods to approximate the -value:

https://wolfram.com/xid/0c0sh6jv3d8w2-fwsfhy


https://wolfram.com/xid/0c0sh6jv3d8w2-xhttu

https://wolfram.com/xid/0c0sh6jv3d8w2-haz18n



https://wolfram.com/xid/0c0sh6jv3d8w2-bj6nv9

Differences may be more apparent with larger numbers of ties:

https://wolfram.com/xid/0c0sh6jv3d8w2-73kvm



https://wolfram.com/xid/0c0sh6jv3d8w2-di9kaw

Neat Examples (1)Surprising or curious use cases
Compute the statistic when the null hypothesis is true:

https://wolfram.com/xid/0c0sh6jv3d8w2-2qqg3c

https://wolfram.com/xid/0c0sh6jv3d8w2-ywy3ty
The test statistic given a particular alternative:

https://wolfram.com/xid/0c0sh6jv3d8w2-c5cy2n
Compare the distributions of the test statistics:

https://wolfram.com/xid/0c0sh6jv3d8w2-87eb6q

Wolfram Research (2010), KuiperTest, Wolfram Language function, https://reference.wolfram.com/language/ref/KuiperTest.html.
Text
Wolfram Research (2010), KuiperTest, Wolfram Language function, https://reference.wolfram.com/language/ref/KuiperTest.html.
Wolfram Research (2010), KuiperTest, Wolfram Language function, https://reference.wolfram.com/language/ref/KuiperTest.html.
CMS
Wolfram Language. 2010. "KuiperTest." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/KuiperTest.html.
Wolfram Language. 2010. "KuiperTest." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/KuiperTest.html.
APA
Wolfram Language. (2010). KuiperTest. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/KuiperTest.html
Wolfram Language. (2010). KuiperTest. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/KuiperTest.html
BibTeX
@misc{reference.wolfram_2025_kuipertest, author="Wolfram Research", title="{KuiperTest}", year="2010", howpublished="\url{https://reference.wolfram.com/language/ref/KuiperTest.html}", note=[Accessed: 19-June-2025
]}
BibLaTeX
@online{reference.wolfram_2025_kuipertest, organization={Wolfram Research}, title={KuiperTest}, year={2010}, url={https://reference.wolfram.com/language/ref/KuiperTest.html}, note=[Accessed: 19-June-2025
]}