pub fn kuiper2_test<T>(
sample1: Vec<T>,
sample2: Vec<T>,
) -> Result<TestResult, TestError>where
T: PartialOrd + Copy,Expand description
Preform 2-sample Kuiper’s test
Kuiper’s test is the modification of the Kolmogorov-Smirnov test. Instead of searching for maximum deviation between empirical cdfs, it uses the following as the test statistic: $$ K = \max{[F_1(x) - F_2(x)]} + \min{[F_1(x) - F_2(x)]} $$
Where $F_i(x)$ is of course empirical cdf for the i-th sample.
The particularly interesting feature of the Kuiper’s test is, that if the support is a circle, the test statistic is invariant under rotation. Thus it is used particularly often for angular distributions. It is also said to be more sensitive ‘at the tails’ of the distribution than KS test.
§References
- Kuiper, N.H. (1960). Tests concerning random points on a circle. Indagationes Mathematicae (Proceedings), 63, 38-47. https://doi.org/10.1016/S1385-7258(60)50006-0