Wilcoxon Signed-Rank Test Calculator
Perform the Wilcoxon signed-rank test, a non-parametric statistical test for comparing paired samples or testing a single sample against a hypothesized median. The test ranks the absolute differences between paired observations, then sums the ranks of positive and negative differences to determine whether there is a statistically significant difference.
What Is the Wilcoxon Signed-Rank Test?
The Wilcoxon signed-rank test is a non-parametric statistical test used to compare two related samples, matched pairs, or a single sample against a hypothesized median. It was developed by Frank Wilcoxon in 1945 and is a robust alternative to the paired t-test when the normality assumption is violated.
How the Test Works
The test calculates the differences between paired observations, ranks the absolute differences, then sums the ranks of positive and negative differences:
- Calculate differences: For paired data, dᵢ = xᵢ − yᵢ. For one-sample, dᵢ = xᵢ − m₀.
- Discard zero differences: Pairs with d = 0 are excluded from the analysis.
- Rank absolute differences: Rank |dᵢ| from smallest to largest. Ties receive the average rank.
- Sum the ranks: Calculate W⁺ (sum of ranks with positive differences) and W⁻ (sum of ranks with negative differences).
- Test statistic: T = min(W⁺, W⁻).
Critical Values & Decision Rule
For small samples (n ≤ 30), the test statistic T is compared to a critical value from the Wilcoxon signed-rank distribution. For larger samples (n > 30), a z-score approximation is used:
The decision rule is: T ≤ critical value → reject H₀.
Applications
- Pre-test / post-test designs (e.g., before and after treatment)
- Matched pairs studies (e.g., twins, case-control)
- Testing whether a sample median differs from a hypothesized value
- When data is ordinal or not normally distributed
Why Use This Calculator?
- Complete Analysis: Get test statistic, critical value, p-value, and decision.
- Step-by-Step: See the ranking process for each pair.
- Critical Values Table: Reference critical values for any n up to 30.
- Visual: Paired comparison and difference charts.
- Free & Private: No registration, no data storage.
❓ Wilcoxon Signed-Rank Test FAQ
What is the Wilcoxon signed-rank test?
It is a non-parametric test used to compare two related samples or a single sample against a hypothesized median. It ranks the absolute differences between paired observations and sums the ranks of positive and negative differences.
When should I use the Wilcoxon signed-rank test instead of the paired t-test?
Use the Wilcoxon test when your data is not normally distributed, is ordinal, or when the paired t-test assumptions are violated. It is a robust non-parametric alternative.
What is the test statistic for the Wilcoxon signed-rank test?
The test statistic is T = min(W⁺, W⁻), where W⁺ is the sum of ranks with positive differences and W⁻ is the sum of ranks with negative differences.
How do I interpret the critical value?
For small samples (n ≤ 30), you reject the null hypothesis if your test statistic T is less than or equal to the critical value from the Wilcoxon table.
What happens to ties in the data?
Pairs with a difference of zero are excluded from the analysis. Ties in absolute differences receive the average rank.
What is the difference between one-tailed and two-tailed tests?
A one-tailed test checks for a difference in a specific direction (greater than or less than). A two-tailed test checks for any difference in either direction. For one-tailed tests, use the critical value at α/2.
How is the p-value calculated?
For small samples, the p-value is derived from the exact distribution of the Wilcoxon signed-rank statistic. For large samples (n > 30), a normal approximation is used.
Can I use this test for ordinal data?
Yes, the Wilcoxon signed-rank test is appropriate for ordinal data because it uses ranks rather than the actual values.
Is this calculator free?
Yes, this calculator is completely free to use. No registration or personal data storage is required. All calculations are performed in your browser.