[SciPy-user] help with scipy.stats.mannwhitneyu
Thu Feb 5 10:39:19 CST 2009
On Thu, Feb 5, 2009 at 10:36 AM, <firstname.lastname@example.org> wrote:
> On Thu, Feb 5, 2009 at 9:38 AM, Sturla Molden <email@example.com> wrote:
>> On 2/5/2009 3:33 PM, firstname.lastname@example.org wrote:
>>> wilcoxon is a similar test for paired instead of independent samples,
>>> and there the recommendation in the docstring is for N>20.
>> There are two Wilcoxon tests. The signed-rank test for paired samples
>> and the rank-sum test for independent samples.
> According to wikipedia, Mann-Whitney-U is the Wilcoxon rank-sum test
> for independent samples, just a different name.
According to R:
Performs one and two sample Wilcoxon tests on vectors of data; the
latter is also known as 'Mann-Whitney' test.
I tried a normal random variable example ( no ties): the test
statistic returned is exactly the same as the one returned by
stats.mannwhitneyu(x,y) however the p-values differ. the pvalue in
stats is half of the one in R (up to 1e-17) as stated in the
docstring: one-tailed p-value.
In R the test statistic is the same for the two sided and the one
sided tests, but the reported p-values differ.
I used sample size 100.
So there is an inconsistency in the reporting in stats.mannwhitneyu,
the test statistic is for the two-sided test, but the p-value is half
of the two sided p-value and should be multiplied by two.
I haven't checked the tie handling.
More information about the SciPy-user