Wilcoxon Signed-Rank Test

Advanced Statistical Tests

A non-parametric test to compare two related samples or repeated measurements on a single sample to assess whether their population mean ranks differ.

Practical Examples

Use these examples to see how the calculator works with different datasets.

Blood Pressure Medication Trial

Medical Study

Measuring blood pressure in 10 patients before and after a new medication.

Sample 1: 140, 135, 150, 160, 130, 145, 155, 138, 148, 152

Sample 2: 132, 130, 142, 151, 125, 137, 145, 130, 140, 148

Anxiety Score Improvement

Psychology

Comparing anxiety scores of 8 individuals before and after a therapy program.

Sample 1: 8, 7, 6, 9, 8, 7, 8, 9

Sample 2: 6, 5, 5, 7, 6, 6, 7, 7

Student Test Scores

Education

Evaluating the effectiveness of a new teaching method by comparing test scores of 12 students on a pre-test and post-test.

Sample 1: 75, 80, 82, 79, 88, 90, 76, 85, 89, 92, 78, 84

Sample 2: 80, 85, 85, 83, 90, 94, 81, 88, 92, 95, 81, 89

Handling Tied Ranks

Dataset with Ties

A dataset designed to show how the calculator handles tied values in the differences.

Sample 1: 10, 12, 15, 11, 20, 14, 18, 16

Sample 2: 12, 13, 15, 14, 22, 17, 19, 18

Other Titles
Understanding the Wilcoxon Signed-Rank Test: A Comprehensive Guide
Dive deep into the concepts, applications, and calculations behind this powerful non-parametric statistical test.

What is the Wilcoxon Signed-Rank Test?

  • Core Concept
  • When to Use It
  • Assumptions of the Test
The Wilcoxon Signed-Rank Test is a non-parametric statistical hypothesis test used for comparing two related samples, matched samples, or repeated measurements on a single sample. It serves as an alternative to the paired t-test when the assumption of normality for the differences between pairs is not met. The test assesses whether the median difference between pairs of observations is zero.
Core Concept
Instead of using the raw data values, the test ranks the absolute differences between the paired observations. The test statistic, W, is based on the sum of the ranks assigned to the positive and negative differences. A small W value suggests that the null hypothesis (that the median difference is zero) should be rejected.
When to Use It
You should consider using this test when you have two related samples (e.g., 'before' and 'after' measurements) and your data is not normally distributed. It's suitable for ordinal or continuous data.
Assumptions of the Test
  • The data consists of paired samples (X, Y).
  • The differences D = Y - X are continuous.
  • The distribution of the differences is symmetric around the median.
  • The observations are independent.

Step-by-Step Guide to Using the Calculator

  • Data Entry
  • Calculation
  • Interpreting the Results
Data Entry
Input your two sets of paired data into the 'Sample 1' and 'Sample 2' fields. Ensure that the numbers are separated by commas and that both samples have the exact same number of entries. The calculator will automatically handle the rest.
Calculation
Click the 'Calculate' button. The tool will compute the differences, rank them, calculate the W statistic, Z-score, and the crucial p-value.
Interpreting the Results
  • W Statistic: The smaller of the sum of positive or negative ranks. It's the core test statistic.
  • Z-Score: A standardized score that indicates how many standard deviations the W statistic is from the mean. Used for larger samples.
  • P-Value: The probability of observing your data, or something more extreme, if the null hypothesis is true. A p-value less than 0.05 is typically considered statistically significant, suggesting a real difference between the groups.

Real-World Applications

  • Medical Research
  • Psychological Studies
  • Business and Marketing
Medical Research
Assessing the effectiveness of a new drug by measuring a specific biomarker in patients before and after treatment. Since biological data often doesn't follow a normal distribution, the Wilcoxon test is an ideal choice.
Psychological Studies
Evaluating the impact of a therapy program by comparing participants' scores on a psychological scale (e.g., an anxiety index) before and after the intervention.
Business and Marketing
Determining if a new advertising campaign significantly changed customer satisfaction scores by surveying the same group of customers before and after the campaign launch.

Mathematical Derivation and Example

  • The Null Hypothesis
  • Calculation Steps
  • Manual Example
The Null Hypothesis (H₀)
The null hypothesis (H₀) states that the median of the differences between the paired observations is zero. The alternative hypothesis (H₁) can be two-tailed (the median difference is not zero) or one-tailed (the median difference is greater or less than zero).
Calculation Steps
    1. For each pair, calculate the difference: di = yi - xi.
    1. Exclude any pairs with a difference of zero.
    1. Rank the absolute values of the differences, |di|. Assign average ranks for ties.
    1. Sum the ranks of the positive differences (W+) and the ranks of the negative differences (W-).
    1. The test statistic W is the minimum of W+ and W-.
Manual Example
Sample 1: [10, 15, 12], Sample 2: [12, 16, 15]. Differences: [2, 1, 3]. Absolute Differences: [2, 1, 3]. Ranks: [2, 1, 3]. All differences are positive, so W+ = 1+2+3 = 6 and W- = 0. The W statistic is min(6, 0) = 0.