After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 772718 - Wrong Wilcoxon sign rank test results
Wrong Wilcoxon sign rank test results
Status: RESOLVED FIXED
Product: Gnumeric
Classification: Applications
Component: Statistics Tools
unspecified
Other Linux
: Normal major
: ---
Assigned To: Andreas J. Guelzow
Andreas J. Guelzow
Depends on:
Blocks:
 
 
Reported: 2016-10-10 21:04 UTC by gfwpioda
Modified: 2016-10-10 22:24 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Example of wrong Wilcoxon rank test (2.71 KB, application/x-gnumeric)
2016-10-10 21:04 UTC, gfwpioda
Details

Description gfwpioda 2016-10-10 21:04:13 UTC
Created attachment 337356 [details]
Example of wrong Wilcoxon rank test

The Wilcoxon rank test (for paired samples) delivers wrong values. The S+ sum is correct, but the S- sum (which is in most cases the lowest, thus the used) is often wrong due to the fact that the total number of cases N is not correct (should be the number of data minus the number of eliminated ties).

Checking same data with gnumeric and R the difference is huge.

In the attachement a .gnumeric with some test data. Correct solutions are: 

S+=87.5
S-=17.5
N=14 (and not 12 as stated in gnumeric). Look at the attachment

Output of R for
wilcox.test(soliani$DataA,soliani$DataB,paired=TRUE,corrected=FALSE):

V = 17.5, p-value = 0.03012

Regards

The example is taken from cap. 8 of the on-line manual of Prof. Soliani pag. 26 and f.

http://www.dsa.unipr.it/soliani/capu8.pdf
Comment 1 Andreas J. Guelzow 2016-10-10 21:51:57 UTC
The problem is that the formula in B5 refers to B3 (the observed median difference) rather than to B4 (the predicted median difference).
Comment 2 Andreas J. Guelzow 2016-10-10 22:24:50 UTC
This problem has been fixed in our software repository. The fix will go into the next software release. Once that release is available, you may want to check for a software upgrade provided by your Linux distribution.