3
$\begingroup$

The z-statistic is based on an approximation of the normal distribution.

When n samples are equal or greater than 25, it could be argued that a sample is asymptotically normal, and that a z-statistic can be used to report the Wilcoxon signed-rank test output.

For n < 25, where the summed rank value may not be approximated by the normal distribution, what would you report as the test statistic for the Wilcoxon signed-rank test?

To note: I am working in R and using the wilcox.test function, which reports the test statistic V.

$\endgroup$
2
  • $\begingroup$ Is your question really about reporting, or about which one to use for testing in small samples? $\endgroup$
    – jbowman
    Dec 29, 2019 at 23:07
  • $\begingroup$ Thanks for your reply. To clarify - I'm not clear whether the z-statistic can be used to report a Wilcoxon signed-rank test with sample sizes less than 25. And, if it is not, which test statistic should be reported (in general), and why. $\endgroup$ Dec 30, 2019 at 11:47

2 Answers 2

5
$\begingroup$

As long as you make it plain which statistic you use it shouldn't matter which of several equivalent statistics you use - including a standardized statistic. They're each giving the same information about the sample, and the exact p-value for each would be identical.

[Using a normal approximation for any of the versions of the statistic would give a slightly different p-value to the exact p-value, but this is a separate issue. The normal is pretty good down a fair bit smaller than n=25 - with a continuity correction.]

I'd suggest choosing to report whichever version of the statistic you expect that your intended audience will be most familiar with.

Unless there was a clear reason to do otherwise, I'd probably just report the statistic given by the package I was using (after specifying the statistic sufficiently clearly that it wasn't ambiguous).

$\endgroup$
2
  • $\begingroup$ That's very helpful. I have a further question: is there a good justification for using the z-statistic for sample sizes as low as 10? (would reporting a t statistic instead of a z-statistic be better here?). $\endgroup$ Dec 30, 2019 at 12:22
  • $\begingroup$ Whichever sample size you consider doing it at, you're dealing with an approximation, one which is (overall) worse the smaller the sample size. There's no universal standard of "close enough"; I might think it's just fine at 10 and you might not. (Or vice-versa.) And we could both be 100% correct, since our purposes and tolerance for inexactness of significance level would differ. $\endgroup$
    – Glen_b
    Dec 30, 2019 at 14:29
3
$\begingroup$

As a software note, the wilcox.test function in R does not return the Z value. If the sample size is less than 50 and there are no ties, by default the software computes the p value with an "exact" method, and doesn't compute a Z value at all. In other cases, the function computes the Z value but doesn't report it.

A = c(1,3,5,7,9)
B = c(2,4,6,8,10)

wilcox.test(A, B, exact=TRUE)

   ### Wilcoxon rank sum test
   ###
   ### W = 10, p-value = 0.6905

wilcox.test(A, B, exact=FALSE, correct=FALSE)

   ### Wilcoxon rank sum test
   ### 
   ###  W = 10, p-value = 0.6015

If one were interested in the Z value, I know a couple of methods to extract it in R. One is to use the coin package. Another is to use the rcompanion package (with the caveat that I am the author of that package.)

if(!require(coin)){install.packages("coin")}
if(!require(rcompanion)){install.packages("rcompanion")}

Y = c(A, B)
Group = c(rep("A", length(A)), rep("B", length(B)))
Data=data.frame(Group, Y)

library(coin)

wilcox_test(Y ~ Group, data=Data)

   ### Asymptotic Wilcoxon-Mann-Whitney Test
   ###
   ### Z = -0.52223, p-value = 0.6015

library(rcompanion)

wilcoxonZ(A, B, exact=FALSE, correct=FALSE)

   ###      z 
   ### -0.522

wilcoxonZ(A,B, exact=TRUE)

   ###      z 
   ###     NA

The Z value itself doesn't give any more information than the p value does. However, sometimes Z / sqrt(N) is used as an effect size statistic, often called r.

-0.522 / sqrt((length(A) + length(B)))

   ###  -0.1650709

library(rcompanion)

wilcoxonR(x=Y, g=Group)

   ###      r 
   ### -0.165 
$\endgroup$
2
  • $\begingroup$ Thanks very much. I have been using z <- qnorm(w$p.value/2) to calculate the z statistic, where w is the output of the wilcoxon signed rank test. I have not come across many papers which report the wilcoxon.test V-statistic, which is why I am converting to Z. $\endgroup$ Dec 30, 2019 at 17:47
  • 1
    $\begingroup$ That's fine. Though note that z is often reported with a sign, where it is negative if the second group has higher values than the first. Likewise, if the effect size statistic Z / sqrt(N) is used, it is also often reported as signed. $\endgroup$ Dec 30, 2019 at 17:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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