You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Icaro Cavalcante Dourado (JIRA)" <ji...@apache.org> on 2015/06/17 13:26:00 UTC

[jira] [Comment Edited] (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=14589646#comment-14589646 ] 

Icaro Cavalcante Dourado edited comment on MATH-1233 at 6/17/15 11:26 AM:
--------------------------------------------------------------------------

I think it is fine to produce NaN for identical vectors. In fact, in apache commons math's source I noticed the procedure differ from the original formulation in some ways (discarding ties as you mentioned is an example).
Two good baselines to take into account are wilcox.test from R, and scipy.stats.wilcoxon from Python.


was (Author: icarocd):
It is fine to produce NaN for identical vectors, but for almost similar vectors the expected result should be near 1 as I told before. In fact, in the apache commons math's source I noticed the procedure differ from the original formulation in some ways (discarding ties as you mentioned is an example).
Two good baselines to take into account are wilcox.test from R, and scipy.stats.wilcoxon from Python.

> 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)