A TestRes with the Kolmogorov-Smirnov D value and a P value for the null that Femp is a sample from F against the alternative that it isn't. This implementation uses a signed D value to indicate the direction of the difference between distributions. To get the D value used in standard notation, simply take the absolute value of this D value.
Exact calculation not implemented. Uses asymptotic approximation.
auto stdNormal = parametrize!(normalCDF)(0.0, 1.0); auto empirical = [1, 2, 3, 4, 5]; auto res = ksTest(empirical, stdNormal);
References: http://en.wikipedia.org/wiki/Kolmogorov%E2%80%93Smirnov_test
One-sample Kolmogorov-Smirnov test against a reference distribution. Takes a callable object for the CDF of refernce distribution.