You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Thomas Neidhart (JIRA)" <ji...@apache.org> on 2015/10/19 23:12:27 UTC

[jira] [Commented] (MATH-1233) Uncommon wilcoxon signed-rank p-values

    [ https://issues.apache.org/jira/browse/MATH-1233?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14964060#comment-14964060 ] 

Thomas Neidhart commented on MATH-1233:
---------------------------------------

The referenced wikipedia article explains the algorithm differently than it is implemented.
In our implementation, zero values are not discarded, but we calculate the signed rank as max of W+ and W-. I did not yet find a reference to this, but this subsequently leads to errors when calculating the p-value.

scipy allows 3 different zero handling strategies, see here http://docs.scipy.org/doc/scipy-0.15.1/reference/generated/scipy.stats.wilcoxon.html

> Uncommon wilcoxon signed-rank p-values
> --------------------------------------
>
>                 Key: MATH-1233
>                 URL: https://issues.apache.org/jira/browse/MATH-1233
>             Project: Commons Math
>          Issue Type: Bug
>    Affects Versions: 3.5
>            Reporter: Icaro Cavalcante Dourado
>         Attachments: MATH-1233-test.patch
>
>
> This implementation in WilcoxonSignedRankTest looks weird. For equal vectors, the correct pValue should be 1, because it is the probability of the vectors to come from same population.
> On the opposite, this implementation returns ~0 for equal vectors. So we need to analyze the returned pValue > significanceLevel to reject H0 hypothesis, while in R and many others tools we perform the opposite: pValue <= significanceLevel gives us an argument to reject null hypothesis.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)