Open In App

Wilcoxon Signed Rank Test

Last Updated : 03 Apr, 2025
Comments
Improve
Suggest changes
Like Article
Like
Report

The Wilcoxon Signed Rank Test is a non-parametric statistical test used to compare two related groups. It is often applied when the assumptions for the paired t-test (such as normality) are not met. This test evaluates whether there is a significant difference between two paired observations, making it especially useful for non-normally distributed or ordinal data. It is widely used in fields like medicine, psychology, and social sciences, where normality assumptions are often violated.

Key Features of the Wilcoxon Signed Rank Test

  • Non-parametric Nature: The test does not assume that the data follows any specific distribution, making it ideal for non-normal data or ordinal variables.
  • W-Statistic: It calculates the W-statistic, which approximates a normal distribution for larger samples (n > 10).

When to Use the Wilcoxon Signed Rank Test?

The test is appropriate when:

  • The data consists of paired (dependent) observations.
  • The differences between pairs are continuous or ordinal.
  • The distribution of differences is not normal but symmetric.

Example

To evaluate the effectiveness of a new teaching method, researchers measure literacy levels of 20 children before and after applying the method. Since the data is non-normal, the Wilcoxon Signed Rank Test is ideal.

Hypotheses

  • Null Hypothesis (H₀): The median difference between paired samples is zero (no significant difference).
  • Alternative Hypothesis (H₁): The median difference is not zero (there is a significant difference).

Steps to Perform the Wilcoxon Signed Rank Test

  1. Formulate Hypotheses:
    • H0: There is no significant difference between the pairs.
    • H1: There is a significant difference between the pairs.
  2. Find the Difference (D) between paired observations (i.e., D = B − A).
  3. Calculate the Absolute Difference (|D|) for each pair.
  4. Assign Ranks to the absolute differences from lowest to highest. For tied ranks (duplicate absolute differences), assign them the average rank.
    Example for ties:
    • If two absolute differences are both 3, assign them a rank of \frac{3 + 4}{2} = 3.5.
  5. Calculate the Sum of Ranks:
    • T+: Sum of ranks for positive differences.
    • T-: Sum of ranks for negative differences.
  6. Find the Wilcoxon Rank Statistic (Wcalc): Wcalc = min⁡ (T+ ,T−)
  7. Compare Wcalc to Wtable:
    • Use the sample size n and the significance level α (commonly 0.05) to find the critical value Wtable from a table of critical values for the Wilcoxon Signed Rank Test.
  8. Interpret the Result:
    • If Wcalc < Wtable ​, reject H0​.
    • If Wcalc > Wtable ​, accept H0​.

Interpretation of Results

  • Rejecting H0: If Wcalc​ is less than the critical value Wtable​, it indicates that the two groups are not identically distributed, and there is a significant difference.
  • Accepting H0: If Wcalc​ is greater than Wtable​, it means the two groups are identically distributed, and there is no significant difference.

Example: Smog Concentration Comparison

Let's consider an example where we compare smog concentrations in India from May to December. The data is presented for 13 states with measurements in both months.

States

Smog 
in May
(A)

Smog 
in December
(B)

Difference
[D]


Absolute 
Difference
[Abs-D]


Rank

 

Delhi

13.3

11.1

-2.2

2.2

5

Mumbai

10.0

16.2

6.2

6.2

9

Chennai

16.5

15.3

-1.2

1.2

3

Kerala 

7.9

19.9

12.0

12.0

11

Karnataka

9.5

10.5

1.0

1.0

2

Tamil Nadu

8.3

15.5

7.2

7.2

10

Orissa

12.6

12.7

0.1

0.1

1

UP

8.9

14.2

5.3

5.3

7

MP

13.6

15.6

2.0

2.0

4

Rajasthan 

8.1

20.4

12.3

12.3

12

Gujarat

18.3

12.7

-5.6

5.6

8

West Bengal

8.1

11.2

3.1

3.1

6

Jammu 

13.4

36.8

23.4

23.4

13

Step 5: Calculate T+ and T−

  • Sum of positive ranks (T+): T+ = 9 + 11 + 2 + 10 + 1 + 7 + 4 + 12 + 8 + 6 + 13 = 82
  • Sum of negative ranks (T-): T- = 5 + 3 = 8

Step 6: Calculate Wcalc

Wcalc = min⁡(T+ ,T−) = min⁡(82 ,8) = 8

Step 7: Find Wtable

Using the sample size n = 13 and α = 0.05 for a two-tailed test, we look up the critical value Wtable in a Wilcoxon signed rank table. For n=13, the critical value is 17.

Step 8: Interpret the Result

Since Wcalc = 8 is less than Wtable = 17, we reject the null hypothesis H0​. This means that there is a significant difference in the smog concentrations between May and December.

Conclusion

The Wilcoxon Signed Rank Test shows that the smog concentration has significantly changed from May to December.

Difference Between the Wilcoxon Signed Rank Test and Wilcoxon Rank-Sum Test

Aspect

Wilcoxon Signed Rank Test

Wilcoxon Rank-Sum Test (Mann-Whitney U test)

Data Type

Paired (related) data

Independent (unrelated) data

Purpose

Compares two related groups or measurements

Compares two independent groups to determine if they come from the same distribution

Assumption

Data is paired and dependent (e.g., before and after measurement)

Data is independent (e.g., comparing two different groups)

Test Statistic

Based on the difference between pairs of data points

Based on the ranks of data points from two groups combined

Null Hypothesis

The median difference between paired samples is zero

The two groups come from the same distribution

Example

Comparing the effect of a drug on patients before and after treatment

Comparing the test scores of two independent groups of students

Test Type

Non-parametric test for paired data

Non-parametric test for independent data


Next Article
Article Tags :
Practice Tags :

Similar Reads