# Re: [R] Wilcoxon signed rank test and its requirements

From: Joris Meys <jorismeys_at_gmail.com>
Date: Fri, 25 Jun 2010 00:42:39 +0200

On Fri, Jun 25, 2010 at 12:17 AM, David Winsemius <dwinsemius_at_comcast.net> wrote:
>
> On Jun 24, 2010, at 6:09 PM, Joris Meys wrote:
>
>> I do agree that one should not trust solely on sources like wikipedia
>> and graphpad, although they contain a lot of valuable information.
>>
>> This said, it is not too difficult to illustrate why, in the case of
>> the one-sample signed rank test,
>
> That is a key point. I was assuming that you were using the paired sample
> version of the WSRT and I may have been misleading the OP. For the
> one-sample situation, the assumption of symmetry is needed but for the
> paired sampling version of the test, the location shift becomes the tested
> hypothesis, and no assumptions about the form of the hypothesis are made
> except that they be the same.

I believe you mean the form of the distributions. The assumption that the distributions of both samples are the same (or similar, it is a robust test) implies that the differences x_i - y_i are more or less symmetrically distributed. Key point here that we're not talking about the distribution of the populations/samples (as done in the OP) but about the distribution of the difference. I may not have been clear enough on that one.

Cheers
Joris

> Any consideration of median or mean (which
> will be the same in the case of symmetric distributions) gets lost in the
> paired test case.
>
> --
> David.
>
>
>> the differences should be not to far
>> away from symmetrical. It just needs some reflection on how the
>> statistic is calculated. If you have an asymmetrical distribution, you
>> have a lot of small differences with a negative sign and a lot of
>> large differences with a positive sign if you test against the median
>> or mean. Hence the sum of ranks for one side will be higher than for
>> the other, leading eventually to a significant result.
>>
>> An extreme example :
>>
>>> set.seed(100)
>>> y <- rnorm(100,1,2)^2
>>> wilcox.test(y,mu=median(y))
>>
>>       Wilcoxon signed rank test with continuity correction
>>
>> data:  y
>> V = 3240.5, p-value = 0.01396
>> alternative hypothesis: true location is not equal to 1.829867
>>
>>> wilcox.test(y,mu=mean(y))
>>
>>       Wilcoxon signed rank test with continuity correction
>>
>> data:  y
>> V = 1763, p-value = 0.008837
>> alternative hypothesis: true location is not equal to 5.137409
>>
>> Which brings us to the question what location is actually tested in
>> the wilcoxon test. For the measure of location to be the mean (or
>> median), one has to assume that the distribution of the differences is
>> rather symmetrical, which implies your data has to be distributed
>> somewhat symmetrical. The test is robust against violations of this
>> -implicit- assumption, but in more extreme cases skewness does matter.
>>
>> Cheers
>> Joris
>>
>> On Thu, Jun 24, 2010 at 7:40 PM, David Winsemius <dwinsemius_at_comcast.net>
>> wrote:
>>>
>>>
>>> You are being misled. Simply finding a statement on a statistics software
>>> website, even one as reputable as Graphpad (???), does not mean that it
>>> is
>>> necessarily true. My understanding (confirmed reviewing "Nonparametric
>>> statistical methods for complete and censored data" by M. M. Desu,
>>> Damaraju
>>> Raghavarao, is that the Wilcoxon signed-rank test does not require that
>>> the
>>> underlying distributions be symmetric. The above quotation is highly
>>> inaccurate.
>>>
>>> --
>>> David.
>>>
>>>>
>>
>> --
>> Joris Meys
>> Statistical consultant
>>
>> Ghent University
>> Faculty of Bioscience Engineering
>> Department of Applied mathematics, biometrics and process control
>>
>> tel : +32 9 264 59 87
>> Joris.Meys_at_Ugent.be
>> -------------------------------
>> Disclaimer : http://helpdesk.ugent.be/e-maildisclaimer.php
>
>

```--
Joris Meys
Statistical consultant

Ghent University
Faculty of Bioscience Engineering
Department of Applied mathematics, biometrics and process control

tel : +32 9 264 59 87
Joris.Meys_at_Ugent.be
-------------------------------
Disclaimer : http://helpdesk.ugent.be/e-maildisclaimer.php

______________________________________________
R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help