ks2_test

Function ks2_test 

Source
pub fn ks2_test<T>(
    sample1: Vec<T>,
    sample2: Vec<T>,
) -> Result<TestResult, TestError>
where T: PartialOrd + Copy,
Expand description

Preform two sample Kolmogorov-Smirnov test

Evaluates the Kolmogorov-Smirnov statistic:

$$ KS = \max |F_1(x) - F_2(x)| $$

Where both $F_1$ and $F_2$ are empirical cumulative distribution functions. The p-value is calculated from the statistic as prescribed in (Press 2007)

ยงReferences

  • Press W. H. , Teukolsky S. A., Vetterling W. T., Flannery B. P. (2007). Numerical Recipes 3rd Edition: The Art of Scientific Computing (3rd. ed.). Cambridge University Press, USA.