Skip Menu |

This queue is for tickets about the Statistics-Test-WilcoxonRankSum CPAN distribution.

Report information
The Basics
Id: 48055
Status: resolved
Worked: 2 hours (120 min)
Priority: 0/
Queue: Statistics-Test-WilcoxonRankSum

People
Owner: Nobody in particular
Requestors: gh74 [...] columbia.edu
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: p-values > 1 returned
Date: Tue, 21 Jul 2009 11:09:37 -0400 (EDT)
To: bug-Statistics-Test-WilcoxonRankSum [...] rt.cpan.org
From: Gabor Halasz <gh74 [...] columbia.edu>
Hi- The Mann-Whitney test returns a probability greater than 1. The bug is fairly simple to reproduce: perl -e 'use Statistics::Test::WilcoxonRankSum; $w_test = Statistics::Test::WilcoxonRankSum->new(); my @d1 = qw(0.735 0.745 0.828 0.826); my @d2 = qw(0.847 0.837 0.719 0.668); $w_test->load_data(\@d1, \@d2); my $prob = $w_test->probability(); print "$prob\n"; $w_test->summary();' This happily returns a probability greater than 1, which is a problem. I'm using module version Statistics-Test-WilcoxonRankSum-0.0.5. Is there a more recent one? Thanks, Gabor
On Tue Jul 21 11:10:22 2009, gh74@columbia.edu wrote: Show quoted text
> > Hi- > > The Mann-Whitney test returns a probability greater than 1. The bug > is fairly simple to reproduce: > > perl -e 'use Statistics::Test::WilcoxonRankSum; $w_test = > Statistics::Test::WilcoxonRankSum->new(); > my @d1 = qw(0.735 0.745 0.828 0.826); my @d2 = qw(0.847 0.837 0.719 > 0.668); > $w_test->load_data(\@d1, \@d2); > my $prob = $w_test->probability(); > print "$prob\n"; > $w_test->summary();' > > This happily returns a probability greater than 1, which is a problem. >
Yes, definitly ;-I Show quoted text
> I'm using module version Statistics-Test-WilcoxonRankSum-0.0.5. Is > there > a more recent one?
No, if you got it from CPAN, it's the most recent one (I didn't check the version nbr. though). I don't have the time right now to work on this, but a work around would be to use the (normal) approximate probability like this: my $prob_approx = $w_test->probability_normal_approx(); The background is that the module computes the exact probability (by counting) for N < 20 and approximates it for greater N. I obviously skrewed up the computation of the exact probabilities (I'm not an expert in this kind of computations). Thanks for reporting this, I'll see to it at soon as possible. Ingrid
ok, so I did a scanty fix and uploaded a new version to CPAN - it may take some days until it is available on the mirrors. In the mean time though I discovered the R project (http://www.r-project.org/) - it's open source code for statistical computing and also has various versions of the Wilcoxon/Mann-Whitney test which look much more "professional". So, I would suggest you use those - if possible ;-) Best regards, Ingrid