Wilcoxon Rank Sum Test
Perform the Wilcoxon rank sum test (Mann-Whitney U test) online. Compare two independent samples with nonparametric statistics. Get U statistic, Z-score, p-value, and effect size with charts.
About This Calculator
The Wilcoxon rank sum test (also known as the Mann-Whitney U test or Mann-Whitney-Wilcoxon test) is a nonparametric statistical test used to compare two independent samples. Unlike the independent t-test, it does not assume that the data follows a normal distribution, making it a robust alternative when normality assumptions are violated or when working with ordinal data.
To perform the test, all observations from both groups are combined and ranked from smallest to largest. Tied values receive the average of their rank positions. The sums of ranks for each group are then calculated, and the U statistic is derived from these rank sums. For larger samples (n1 + n2 greater than 20), the test uses a normal approximation with a tie correction factor. The result includes the U statistic, Z-score, p-value for hypothesis testing, mean rank for each group, and the AUC effect size which represents the probability that a randomly selected observation from group 1 exceeds one from group 2.
Researchers in medicine, psychology, biology, economics, and social sciences commonly use this test when their data does not meet the parametric assumptions required for a t-test. It is particularly useful for analyzing Likert scale responses, small sample studies, or data with outliers that would otherwise skew parametric results.
Frequently Asked Questions
What is the Wilcoxon Rank Sum Test?
The Wilcoxon rank sum test (also called the Mann-Whitney U test) is a nonparametric statistical test that compares two independent groups to determine whether their population distributions differ. It does not assume normality and works by ranking all observations from both groups together and comparing the sum of ranks between the groups.
What is the difference between Wilcoxon rank sum test and Wilcoxon signed-rank test?
The Wilcoxon rank sum test (Mann-Whitney U) is used for two independent samples, while the Wilcoxon signed-rank test is used for paired or matched samples. The rank sum test compares distributions between separate groups, whereas the signed-rank test compares differences within the same subjects measured twice.
What are the assumptions of the Wilcoxon rank sum test?
The test assumes: (1) observations are independent within and between groups, (2) the response variable is at least ordinal (can be ranked), and (3) under the null hypothesis, the two populations have identical distributions. It does not require normality or equal variances.
How do you interpret the p-value from a Wilcoxon rank sum test?
A p-value less than 0.05 indicates strong evidence against the null hypothesis, suggesting the two groups come from different distributions. A p-value greater than 0.05 suggests insufficient evidence to conclude a difference. The test also provides an effect size (AUC) that measures the probability a random observation from group 1 is larger than one from group 2.
When should I use the Wilcoxon rank sum test instead of a t-test?
Use the Wilcoxon rank sum test when your data violates the normality assumption of the independent t-test, especially with small sample sizes, ordinal data, or when outliers are present. It is also appropriate when data are measured on an ordinal scale. The t-test is more powerful when normality holds.
What is the U statistic in the Wilcoxon rank sum test?
The U statistic represents the number of pairwise comparisons where an observation from group 1 is greater than an observation from group 2. It ranges from 0 to n1 times n2. A U value near 0 or n1 times n2 suggests strong evidence of a difference between groups, while a value near the midpoint suggests no difference.
How do you calculate the effect size for the Wilcoxon rank sum test?
The common language effect size (AUC) is calculated as U1 divided by n1 times n2. It represents the probability that a randomly selected observation from group 1 is greater than one from group 2. Values near 0.5 indicate no effect, while values near 0 or 1 indicate a strong effect.
What sample size is needed for the Wilcoxon rank sum test?
The Wilcoxon rank sum test works well with small samples, and exact p-values can be computed for any sample size. For the normal approximation to be accurate, both groups should have at least 10-20 observations each. With smaller samples, the exact distribution of U should be used.