5
$\begingroup$

I performed a one-sided Wilcoxon signed-rank (WSR) test. I had a matched pair of continuous random variables, say $X_1, X_2, ..., X_n$ and $Y_1, Y_2, ..., Y_n$. For my system, it is safe to assume that under the null hypothesis, $X_i$ and $Y_i$ are identically distributed for all $i$. Hence, the difference, say $U_i = X_i - Y_i$ should have a symmetrical distribution around 0, i.e., under the null hypothesis. Also, $U_i$'s are independent. Hence, I believe that assumptions of Wilcoxon signed-rank test are satisfied. So, I performed a one-sided test to check if $U_i$ tend to be greater than 0.

I am writing a report on my analysis but I am a bit confused about how exactly to phrase the test. Following are a couple statements that I have considered.

  1. I performed Wilcoxon signed-rank test to test null hypothesis against one-sided alternative that population mean of $U_i>0$.

  2. I performed Wilcoxon signed-rank test to test null hypothesis against one-sided alternative that population median of $U_i>0$.

I have noticed that WSR null is generally reported in terms of median. For one, I am not clear on why that is. Second, my understanding is that since $U_i$'s are symmetrically distributed about 0 under the null hypothesis, mean and median should be the same. So perhaps, it should be ok to describe the test in terms of mean. If it is so, I'd prefer to report in terms of mean because a lot of my readers might not know WSR. If they read a statement in terms of mean, they might find it easy to relate to as simply an alternative to two sample t-test.

If you have a suggestion for a better way of reporting the test, please let me know.

I have read several answers over Stackexchange but could not find exactly what I was looking for. Also, I read a paper (Li and Johnson, 2014, Pharmaceutical Statistics; DOI: 10.1002/pst.1628) that describes two different null hypothesis - one for "test of median" and another for "test of symmetry" with the name of Wilcoxon signed-rank test.

I simply used wilcox.test function in R as wilcox.test(X, Y, alternative = "greater", paired = T). How do I know if my test was a "test of median" or a "test of symmetry"?

$\endgroup$
7
$\begingroup$

This answer has been revised after being accepted, as I did not adequately appreciate Wilcoxon's critique of the sign test to extend the null hypothesis. I address the difference between the revised and previous answer at the end

The Wilcoxon sign rank test has these null and alternative hypotheses:

$H_{0}$: The magnitude of paired rank differences are symmetrically distributed about zero.

$H_{A}$: The magnitude of paired rank differences are either not symmetrically distributed, or are not distributed about zero, or both.

(The symmetric distribution about zero rapidly approaches a normal distribution as the sample size increases. See Belera, 2010.)

Many introductory texts motivate the signed rank test as a test of median difference, or more rarely in my experience, mean difference, without mentioning that two fairly strict assumptions are required for this interpretation:

  1. The distribution of both groups must have the same shape.

  2. The variance of both groups must be equal.

If both these assumptions are true, then the signed rank test can validly be interpreted as having a null hypothesis of equal medians (or equal means).

References
Bellera, C. A., Julien, M., and Hanley, J. A. (2010). Normal approximations to the distributions of the Wilcoxon statistics: Accurate to what $n$? Graphical insights. Journal of Statistics Education, 18(2):1–17.

Wilcoxon, F. (1945). Individual comparisons by ranking methods. Biometrics Bulletin, 1(6):80–83.


Motivation for my revised answer

My previously accepted answer was that the null and alternative hypotheses were in paired observations:

$$H_0:P(X_A>X_B)=0.5;H_A:P(X_A>X_B)≠0.5$$

These are null and alternative hypotheses about relative stochastic size (sometimes zeroth-order stochastic dominance). In plain language the null hypothesis is that the probability of a random observation from group $A$ exceeding the paired observation drawn from group $B$ is one half (i.e. a random observation in group $A$ has just as much probability of being greater than, as being less than its paired observation in group $B$).

In plain language the alternative hypothesis is that this probability is not one half (i.e. one of the groups is more likely to be greater than the other than less than the other).

But the sign rank can be false due to asymmetry (because of the magnitude of rank differences are larger in one direction than the other), so that even when $P(X_A>X_B)=0.5$ we reject the null if the magnitudes when $X_{A}>X_{B}$ are, say, much larger than when $X_{A}<X_{B}$. Magnitude of rank difference is therefore why the sign rank test must incorporate symmetry into the null as in my revision. My thanks to @SalMangiafico for his patient tutelage.

$\endgroup$
  • 2
    $\begingroup$ Hmm. Aren't you describing Wilcoxon rank sum test here? OP @MrK was asking about Wilcoxon sign rank test which is a paired test. Its null cannot be about random observations in A and in B, because the observations are paired. $\endgroup$ – amoeba Aug 23 '18 at 22:16
  • 1
    $\begingroup$ @SalMangiafico +1 to both comments. Alexis, see en.wikipedia.org/wiki/Wilcoxon_signed-rank_test#Test_procedure, where H0 is stated as "difference between the pairs follows a symmetric distribution around zero". In contrast, en.wikipedia.org/wiki/Sign_test#Method states H0 as "Pr(X > Y) = 0.5". $\endgroup$ – amoeba Aug 24 '18 at 15:25
  • 1
    $\begingroup$ 1) Yes, the example I gave is one where P(A>B) = 0.05, and Wilcoxon rejects the null. Maybe to make this more clear, for another example, consider, A = c(1,2,3,4, 5, 6, 7, 8, 9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24); B = c(2,4,6,8,10,12,14,16,18,20,22,24, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1); sum(A>B); sum(B>A); wilcox.test(A,B, paired=T) $\endgroup$ – Sal Mangiafico Aug 24 '18 at 16:14
  • 1
    $\begingroup$ They're not the same. You can have the same number of observations on each side of zero, but they can be non-symmetrical, say, if on the negative side they're all around -1 and on the positive side, they're all around 10. This is the the point of my examples. This is the difference between the signed-rank and the sign test. $\endgroup$ – Sal Mangiafico Aug 24 '18 at 16:24
  • 2
    $\begingroup$ @SalMangiafico I just worked through your example, and beyond a bit. The null of the sign rank can be false due to asymmetry (because of the magnitude of rank differences), so that even when $P(X_{A}>X_{B}) = 0.5$ we reject the null. Magnitude of rank difference is why the sign rank test must incorporate symmetry into the null. Thank you! I have learned something here, and am gonna edit my answer. :) $\endgroup$ – Alexis Aug 24 '18 at 16:27
3
$\begingroup$

In the general case, the Wilcoxon ranked-sum test (WRS) doesn't address either the mean or the median, so I think I would avoid mentioning either of these when describing the test.

It is easy to think of cases where the median of the differences is 0 but that the WRS rejects the null hypothesis. (One such case is given in my comments to the answer by @Alexis). If you really want a test of the median of the differences, the sign test is the appropriate test.

How you want to describe the test, I think, depends on your audience.

The null hypothesis (of the two-sided case) is that the rank of differences are symmetric about 0. This will likely make sense to an audience if you are able to present a histogram of the actual differences and are able to say, "See? the ranks of the differences are basically symmetric, centered around 2." Or, "See, they are not symmetric; there are many higher values on the positive side and fewer on the lower side, suggesting...."

But this may not translate well to what you are actually trying to point out, like that some intervention increased some measured thing.

Depending on the audience, it may be better to be vague about the test, e.g. "I performed WRS to see if there was an increase from Time 1 to Time 2." If you feel bad about that, you could add a footnote describing the test.

There are some visual ways to present the results that may make a lot sense to the audience. For example, here is the same data:

As a scatter plot with a 1:1 line

As a series of bars of the differences

And as a histogram of the differences

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.