kuiper(data, cdf=<function <lambda>>, args=())¶
Compute the Kuiper statistic.
Use the Kuiper statistic version of the Kolmogorov-Smirnov test to find the probability that a sample like
datawas drawn from the distribution whose CDF is given as
This will not work correctly for distributions that are actually discrete (Poisson, for example).
The Kuiper statistic resembles the Kolmogorov-Smirnov test in that it is nonparametric and invariant under reparameterizations of the data. The Kuiper statistic, in addition, is equally sensitive throughout the domain, and it is also invariant under cyclic permutations (making it particularly appropriate for analyzing circular data).
Returns (D, fpp), where D is the Kuiper D number and fpp is the probability that a value as large as D would occur if data was drawn from cdf.
The fpp is calculated only approximately, and it can be as much as 1.5 times the true value.
Stephens 1970 claims this is more effective than the KS at detecting changes in the variance of a distribution; the KS is (he claims) more sensitive at detecting changes in the mean.
If cdf was obtained from data by fitting, then fpp is not correct and it will be necessary to do Monte Carlo simulations to interpret D. D should normally be independent of the shape of CDF.
Stephens, M. A., “Use of the Kolmogorov-Smirnov, Cramer-Von Mises and Related Statistics Without Extensive Tables”, Journal of the Royal Statistical Society. Series B (Methodological), Vol. 32, No. 1. (1970), pp. 115-122.