Re: [R] What are ties? Wilcox u-test

From: Ted Harding <>
Date: Wed, 30 Apr 2008 09:25:01 +0100 (BST)

On 30-Apr-08 07:47:56, Uwe Ligges wrote:
> Dirkheld wrote:

>> Hi,
>> When I execute a Wilcox u-test on two variables I receive a
>> warning : 'cannot compute exact p-value with ties'
>> - What are ties? What does this mean for my data?

> If you have two identical values in your data, these are called
> ties. Now the ranks are not unique anymore and hence exact
> p-values cannot be calculated.
> And since you do not know this, it might be worth to note that
> the Wilcoxon test also assumes a non-skewed distribution.

For the sake of clarification, it should be emphasised that "assumes a non-skewed distribution" applies only to the paired two-sample case ("signed-rank") or the single sample case. In this case the Wilcoxon test is in effect a test of symmetry.

I think this is reasonably clear from ?wilcox.test.

Dirkheld did not state that he was using the "paired" test, and may well simply have been comparing two samples (possibly of different sizes) of values of X and Y.

When the Wilcoxon test is used to compare two samples of values which are not paired, it makes no assumption about the shape of the distribution, only that (as null hypothesis) the distribution from which X is sampled is the same as the distribution from which Y is sampled. It is, in effect, based on an estimate of P(X < Y).

In this respect, I think ?wilcox.test is misleading. While people commonly think that the Wilcoxon test (or its equivalent the Mann-Whitney U test) is a test of "shift in location", this is only a special case of the class of alternatives (to the null hypothesis that the distributions are the same) to which the Wilcoxon (or Mann-Whitney) test is sensitive.

In particular, the expected value of the Wilxoxon (or the Mann-Whitney) test statistic is a linear function of P(X < Y).

Hoping this helps,

>> - Is that a problem for significance testing?

> If there are just a few ties, you should not worry, but re-check how
> your data looks like. It is a warning, not an error message.
>> - is there a way to overcome this problem?

> If you need to, use an appropriate test for your data.
>> I have different threads in this forum but it hard to find what the
>> exact
>> meaning of this warning message is.

> Read some textbook?
> Uwe Ligges
> ______________________________________________
> mailing list
> PLEASE do read the posting guide
> and provide commented, minimal, self-contained, reproducible code.

E-Mail: (Ted Harding) <> Fax-to-email: +44 (0)870 094 0861
Date: 30-Apr-08                                       Time: 09:24:57
------------------------------ XFMail ------------------------------

______________________________________________ mailing list PLEASE do read the posting guide and provide commented, minimal, self-contained, reproducible code. Received on Wed 30 Apr 2008 - 08:35:05 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 30 Apr 2008 - 10:30:37 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.

list of date sections of archive