Understand the idea
Rank-based tests (Mann-Whitney, Wilcoxon, Kruskal-Wallis, Spearman correlation) work by replacing raw values with their RANKS: 1st smallest, 2nd smallest, and so on. That is straightforward when every value is distinct, but real data, especially rounded measurements, ratings on a fixed scale, or count data, often have several rows sharing the exact same value.
The standard fix is to give tied values the AVERAGE of the ranks they would have occupied: if two observations are tied for 3rd and 4th place, both get rank 3.5. This keeps the total of all ranks correct and lets the calculation proceed, but it does slightly change how much the rank totals would naturally vary by chance, compared to the tie-free formula the exact theory was built on.
With many ties (a coarse rating scale with only a few possible values, applied to a large sample), the standard large-sample approximation formulas need a TIE CORRECTION to keep the reported p-value accurate; without it, the p-value comes out somewhat too LARGE (the test is overly cautious and can miss a real difference), because ties make the rank statistic less variable than the untied formula assumes.
Equal values get tied ranks: each receives the mid-rank, the average of the ranks they take up together, so two values sharing places 4 and 5 both get 4.5.
Practitioner explanation
Mid-rank assignment (averaging tied ranks) is the standard convention; the normal approximation's variance formula for Mann-Whitney U, Wilcoxon W, and Kruskal-Wallis H all require an explicit tie-correction term (subtracting a function of the tied-group sizes from the variance) to remain valid; ties SHRINK the null variance of the statistic, so omitting the correction overstates the variance and makes the test conservative (p-values too large, power lost), not anti-conservative.
Exact (permutation-based) p-values are also affected by ties: the standard exact null distribution assumes no ties, so exact methods either restrict to the tie-free case or use a specialized exact algorithm that accounts for the actual tie pattern, which is more conservative computationally but correct.
KernelStats applies the standard tie correction automatically and names the p-value route on each card: Mann-Whitney uses the exact null only when a group has n <= 8 and there are no ties, otherwise the tie-corrected normal approximation; Wilcoxon signed-rank uses the exact null without ties or zeros, an exact enumeration of all sign flips when there are ties and n <= 13, and otherwise the tie-corrected normal approximation; Kruskal-Wallis H and the Friedman statistic are tie-corrected before being referred to chi-square. Heavily tied data (Likert ratings, rounded measurements) therefore does not get a needlessly conservative p-value.
When to use it
Consider it when
Whenever running a rank-based test on data with a coarse measurement scale, rounded values, or count data, where repeated identical values are likely.
Use caution when
Do not apply a tie-free exact p-value formula to data with substantial ties; use the tie-corrected normal approximation or a tie-aware exact method instead.
Common misconceptions
Misconception
Ties only matter for very large datasets and can be ignored in smaller studies.
Correction
Tie correction matters whenever the PROPORTION of tied values is substantial relative to the sample, regardless of absolute sample size: a coarse rating scale applied to even a modest sample can have many ties.
References
- NIST/SEMATECH e-Handbook of Statistical Methods, §1.3.5.16 Wilcoxon rank-sum test (ties), NIST/SEMATECH (2012), §1.3.5.16.
