[
https://issues.apache.org/jira/browse/MATH-1240?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Thomas Neidhart resolved MATH-1240.
-----------------------------------
Resolution: Fixed
Fix Version/s: 3.6
Fixed in the following commits:
* 3.6: a019162481161757555c99f3cbce157cc9b1a41b
* 4.0: 5cfd99f0dcd0d10689e480f0854e859079f125d0
> Kolmogorov-Smirnov 2-sample test returns wrong p-value if input data is
> identical
> ---------------------------------------------------------------------------------
>
> Key: MATH-1240
> URL: https://issues.apache.org/jira/browse/MATH-1240
> Project: Commons Math
> Issue Type: Sub-task
> Reporter: Thomas Neidhart
> Fix For: 4.0, 3.6
>
>
> Depending on the method used, wrong results are returned:
> * exact -> correct
> * monteCarlo -> wrong (returns a very small p-value)
> * approximate -> wrong (returns 0 instead of 1)
> The problem for the approximate version is due to this code snippet in ksSum
> {code}
> if (t == 0.0) {
> return 1.0;
> }
> {code}
> should rather return 0 in this case, but needs to be verified.
> This problem was hidden (due to wrong statistic calculation) in previous
> versions of commons-math or resulted in a TooManyIterationsException (if
> statistic is 0 as correct in case of identical values).
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)