Skip to content
This repository was archived by the owner on Nov 19, 2020. It is now read-only.
This repository was archived by the owner on Nov 19, 2020. It is now read-only.

Mann-Whitney-U Test producing strange results #857

@hkoestin

Description

@hkoestin

Dear @cesarsouza

I just found out, that the MannWhitneyWilcoxonTest class may be buggy.

Given the following sample vector, when I pass it in as sample one and sample two vector, the Accord.NET implementation shows a p-Value of 0.41 or the like.
According to R, for the given vector, the p-Value should be 1 (exactly).

a <- c(250,200,450,400,250,250,350,0,200,400,300,600,200,200,
       550,100,300,250,350,200,550,200,450,400,200,400,450,
       200,400,400,500,450,300,250,200)
b <- c(250,200,450,400,250,250,350,0,200,400,300,600,200,200,
       550,100,300,250,350,200,550,200,450,400,200,400,450,
       200,400,400,500,450,300,250,200)

wilcox.test(a, b)

Gives the following output:

	Wilcoxon rank sum test with continuity correction

data:  a and b
W = 612.5, p-value = 1
alternative hypothesis: true location shift is not equal to 0

Warning message:
In wilcox.test.default(a, b) : cannot compute exact p-value with ties

I have other sample vectors, which show the same behavior. R always shows p-Value of 1 for them.

Thanks in advance,
Harald

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions