What this calculator does
Rank-Based Tests is Module 8 of Analysis Studio, and it sits in the subscription set. It runs the standard rank-based comparisons:
- Mann-Whitney U for two independent groups
- Wilcoxon signed-rank for paired measurements
- Kruskal-Wallis for three or more independent groups, with Dunn follow-up comparisons
- Friedman for repeated measurements across three or more conditions
Each test replaces the values with their ranks and works on those, so a skewed distribution or a few large outliers cannot dominate the result the way they dominate a mean. Effect sizes come with the tests, and exact p values are reported where the sample size and the tie structure allow them, rather than an approximation presented as exact.
Promotion, stated with its date: through March 31, 2027, this module runs free on screen, like every module. Downloads and Copy Results stay with the subscription throughout. After the promotion, the module returns to the subscription set at $299 per year.
The method, in plain terms
Rank every observation from smallest to largest, then ask whether one group holds systematically higher ranks than another. The Mann-Whitney U counts how often a value from one group beats a value from the other. The Wilcoxon signed-rank test ranks the within-pair differences and weighs the positive ranks against the negative ones. Kruskal-Wallis compares the average ranks of several groups against what chance alone would produce, and the Friedman test does the same within each case across conditions. Ties share the average of the ranks they span, and the calculations correct for them.
Worked examples
Two groups of seven, scored on the same task. Group A scores 12, 15, 14, 18, 16, 20, 17. Group B scores 9, 11, 10, 13, 12, 14, 10.
- Rank sum for Group A: 74 of a possible 105
- Mann-Whitney U: 46 of a maximum of 49
- z: 2.69
- p: 0.0071
- Rank-biserial correlation: 0.88
Nearly every A score beats nearly every B score, which is what a U of 46 out of 49 says directly: pick one value from each group at random, and the A value comes out ahead, with a tie counting as half a win, about 94 times in 100.
Eight paired measurements, before and after, with differences of 3, -1, 4, 2, 5, -2, 6, 3 give a Wilcoxon signed-rank test with positive ranks summing to 32.5 of 36 and an exact p of 0.047. Six of the eight pairs improved, and the two declines are the smallest differences in the set.
Three groups of five, with rank sums of 39.5, 65.0, and 15.5, give a Kruskal-Wallis H of 12.28 on two degrees of freedom, with p = 0.0022. The Dunn follow-ups then locate the separation between the pairs of groups, with the family error rate held across the set.
When the calculator fits, and when it does not
It fits when:
- The outcome is ordinal, or continuous but heavily skewed, or the samples are small enough that the mean is a fragile summary.
- The question is about one group tending to score higher than another, rather than about a difference in means stated in the original units.
- Outliers are real data that should count, but should not count for more than their rank.
It does not fit when:
- The outcome is a clean continuous measure and the mean difference in original units is the quantity wanted. The t tests and ANOVA in Module 3 answer that question directly.
- Measurements repeat within the same cases under a design with covariates or missing occasions. That structure belongs to the mixed-effects models in Module 15.
- The data carry a survey design. The design-based forms in the survey modules take over once the design is declared.
Run it
Module 8: Rank-Based TestsOpen in Analysis Studio →Load your data, pick the outcome and the grouping or pairing variable, and read the rank sums next to the test statistic they produce.
Questions
Mann-Whitney or a t test: which should I use? If the outcome is ordinal, skewed, or the samples are small, Mann-Whitney. It asks whether one group tends to score higher, and it does not rest on the mean behaving well. If the mean difference in original units is the quantity the reader needs and the data support it, the t test in Module 3 is the direct answer.
Does Mann-Whitney compare medians? Only under an added assumption, that the two distributions have the same shape and differ by a shift. Without that assumption the test compares the full rank ordering, which the rank-biserial correlation states plainly: the probability that a random value from one group exceeds a random value from the other.
What does the rank-biserial correlation add? A size for the effect on a familiar scale. The p value says the ordering is distinguishable from chance at this sample size; the rank-biserial correlation says how strong the ordering is, from no separation at zero to complete separation at one.
My data are paired. Which test here is mine? The Wilcoxon signed-rank test, on the within-pair differences. For three or more repeated conditions on the same cases, the Friedman test is the paired analogue of Kruskal-Wallis.
When is the p value exact? When the sample is small enough for the full rank distribution to be enumerated and the tie structure allows it. The module reports the exact value in those cases and the tie-corrected approximation otherwise, and labels which one it printed.