Skip to content
Omnikalc

Wilcoxon signed-rank test: the non-parametric paired test

Enter the number of non-zero differences and the sum of positive ranks T⁺ to get z, the p-value from the normal approximation and the effect size r.

Updated on
Your inputs

Value out of range

Value out of range

Continuity correction

Results

p-value (normal approximation)

0.04377

Statistically significant: p is below α, so reject the null hypothesis
z statistic
2.016
Sum of negative ranks T⁻
96.0
W = min(T⁺, T⁻), for exact tables
24.0
Expected T⁺ under the null hypothesis
60.0
Standard deviation of T⁺
17.607
Effect size r = |z| ÷ √n
0.528
Fewer than 20 differences: check the exact critical value of W in a table

What the Wilcoxon signed-rank test does

The Wilcoxon signed-rank test compares two paired measurements, such as before and after a treatment, without assuming that the differences are normally distributed. It is the non-parametric alternative to the paired t-test. It is also used as a one-sample test of a median: subtract the hypothesized median from each value and test the differences.

How it works

  1. Compute the difference for each pair and drop the zero differences.
  2. Rank the absolute differences from 1 (smallest) to n; ties get the average rank.
  3. Add the ranks of the positive differences: that is T⁺. The ranks of the negative differences give T⁻, and T⁺ + T⁻ = n(n + 1) ÷ 2.

If there is no systematic change, T⁺ should be close to half of the total.

The formulas

  • Mean of T⁺ under the null hypothesis: n(n + 1) ÷ 4.
  • Standard deviation: √(n(n + 1)(2n + 1) ÷ 24).
  • z = (T⁺ − mean ± 0.5) ÷ SD, with the continuity correction, and the p-value from the normal distribution.
  • Effect size r = |z| ÷ √n.

Example

15 non-zero differences, with T⁺ = 24:

  • T⁻ = 120 − 24 = 96, so the negative differences dominate;
  • expected T⁺: 15 × 16 ÷ 4 = 60, with an SD of √(15 × 16 × 31 ÷ 24) ≈ 17.61;
  • z = (36 − 0.5) ÷ 17.61 ≈ 2.02;
  • two-tailed p ≈ 0.044: significant at α = 0.05;
  • r ≈ 0.53, a large effect.

With 15 pairs, the exact table gives a critical W of 25 at α = 0.05 two-tailed. W = min(T⁺, T⁻) = 24 is at or below it, so the exact test agrees.

Compared with other paired tests

  • The paired t-test is more powerful when the differences are roughly normal.
  • The sign test only uses the direction of each difference. The signed-rank test also uses their size, so it is usually more powerful, but it assumes the differences are roughly symmetric around their median.

Limits

  • Pairs must be independent of each other.
  • For fewer than about 20 differences, check the exact critical value of W in a table or with software.
  • Many tied absolute differences call for a tie correction to the standard deviation.

Frequently asked questions

When should I use the Wilcoxon signed-rank test?

For paired data when the differences are not normally distributed, or to test a median.

What are T⁺ and T⁻?

The sums of the ranks of the positive and the negative differences, ranked by absolute value.

What do I do with zero differences?

The standard method drops them and reduces n accordingly.

How is it different from the sign test?

The signed-rank test uses the size of the differences through their ranks, while the sign test only uses their direction.

Was this calculator helpful?

Thanks for your feedback!

Results are estimates provided for information purposes. They do not replace professional advice.