Course contentsShow
← Mathematics
Lesson 3105 of 3,12160. Statistics — ModelingFree lesson

Wilcoxon Signed-Rank Test

Testing paired differences or single-sample location using ranks of absolute differences.

Wilcoxon Signed-Rank Test

What you'll learn: You'll discover how to test whether paired differences or a single sample's median differs from a target value using ranked absolute differences—a more powerful nonparametric alternative to the sign test.

The Core Idea

The Wilcoxon Signed-Rank Test builds on the sign test by incorporating not just the direction of differences, but also their magnitude. Instead of simply counting how many differences are positive or negative, we:

  1. Calculate differences (paired observations, or sample values minus hypothesized median)
  2. Take the absolute values of these differences
  3. Rank them from smallest to largest (ignoring zeros)
  4. Restore the original signs (+ or –) to each rank
  5. Sum the ranks separately for positive and negative differences

The test statistic is typically W⁺, the sum of ranks for positive differences. If the null hypothesis (no difference, or median = target) is true, we'd expect positive and negative ranks to balance out. A very large or very small W⁺ suggests a real shift in location.

Why Use Ranks of Magnitudes?

Think of it as giving "votes" weighted by strength. The sign test treats a tiny difference and a huge difference identically—both just count as +1 or –1. The Wilcoxon test says: "A large difference should carry more weight in our decision." By ranking absolute differences, we respect magnitude while staying robust to outliers (since ranks cap extreme values' influence).

When to Use It

  • Paired data (e.g., before/after measurements) or single-sample location tests
  • When normality assumptions fail, making the paired t-test inappropriate
  • When you want more power than the sign test by using magnitude information

Key Takeaway: The Wilcoxon Signed-Rank Test ranks absolute differences to test location shifts, balancing robustness with sensitivity to effect size.