Statistics & Probability / Mann-Whitney & Wilcoxon Tests
FREE TO EXPLORE
LABORATORY 33 · STATISTICS & PROBABILITY

Mann-Whitney & Wilcoxon Tests theory

Understand mann-whitney & wilcoxon tests: probability distributions, theorems, estimation laws, and hypothesis tests.

Probabilistic foundations of Mann-Whitney & Wilcoxon Tests.

Non-parametric hypothesis testing provides robust, distribution-free statistical inference when classical normality assumptions fail. Formulated by Frank Wilcoxon, H. B. Mann, and D. R. Whitney, the Mann-Whitney U and Wilcoxon Rank-Sum tests replace raw metric measurements with global relative ranks, offering near-optimal efficiency for Gaussian data and immense superiority for heavy-tailed, skewed, or outlier-contaminated data. In this laboratory, we implement global rank transformations, evaluate U-statistic distributions, test asymptotic normal approximations, and confirm the rank shift scaling gradient m = 5.000. In mathematical statistics, empirical data science, and modern computational engineering, understanding the asymptotic sampling properties and theoretical behavior of Non-Parametric Hypothesis Testing: Mann-Whitney U Test and Wilcoxon Rank-Sum Evaluation provides crucial guarantees. Rigorous experimental validation connects foundational probability laws with observable empirical phenomena, ensuring that statistical inference remains valid under finite sample sizes and real-world data collection constraints.

y = 5.0000 · x

Viva voce questions & analytical theory

What is the Mann-Whitney U test, and how does it relate to the Wilcoxon Rank-Sum test?

The Wilcoxon Rank-Sum test (Frank Wilcoxon, 1945) and the Mann-Whitney U test (H. B. Mann and D. R. Whitney, 1947) are mathematically equivalent non-parametric tests for comparing two independent groups. Wilcoxon defined the test in terms of the sum of ranks assigned to group 1: W_1 = ∑_{i=1}^{n_1} R_{1, i}. Mann and Whitney formulated the test in terms of pairwise exceedances: U_1 = ∑_{i=1}^{n_1} ∑_{j=1}^{n_2} I(X_{1, i} > X_{2, j}). The two statistics are linked by the exact identity: U_1 = W_1 - [n_1(n_1 + 1) / 2]. Both test whether the probability that an observation from population 1 exceeds an observation from population 2 equals 0.5: P(X_1 > X_2) = 0.5.

Why is the Mann-Whitney test 'distribution-free', and what null hypothesis does it test?

The test is distribution-free because under the null hypothesis H_0 that both samples originate from the exact same continuous distribution F_1(x) = F_2(x), every permutation of ranks 1, 2, ..., N among the n_1 and n_2 positions is equally likely, with probability 1 / (N choose n_1). The null distribution of W and U depends solely on sample sizes n_1 and n_2, completely independent of the underlying population shape (Gaussian, Exponential, Cauchy, etc.). It tests the null hypothesis of stochastic equality against the alternative that one distribution is stochastically larger than the other.

What are the theoretical mean and variance of the Mann-Whitney U statistic under H_0?

Under H_0, the expected value of U is: E[U] = (n_1 n_2) / 2. Because each pairwise comparison I(X_i > Y_j) has probability 1/2 under independence, the sum of n_1 n_2 comparisons has expectation n_1 n_2 / 2. The variance of U (assuming no tied ranks) is: Var(U) = [n_1 n_2 (n_1 + n_2 + 1)] / 12. If ties are present, the variance is adjusted downward: Var(U) = [n_1 n_2 / 12] [N + 1 - ∑ (t_k^3 - t_k) / (N(N - 1))], where t_k is the number of tied observations in the k-th tie group.

How does the asymptotic normal approximation for the U statistic operate?

By the combinatorial central limit theorem, as sample sizes increase (typically n_1, n_2 ≥ 10 or N ≥ 20), the distribution of U rapidly converges to a Gaussian distribution. The standardized test statistic is Z_U = (U - E[U] ± 0.5) / √Var(U), where ±0.5 is a continuity correction. The p-value is computed directly from the standard normal cumulative distribution function Φ(Z_U), enabling rapid hypothesis testing without consulting extensive combinatorial critical value tables.

What is the Asymptotic Relative Efficiency (ARE) of Mann-Whitney U compared to Student's t-test?

The Pitman Asymptotic Relative Efficiency (ARE) of Mann-Whitney U relative to Student's t-test depends on the underlying population distribution: (1) Normal distribution: ARE = 3/π ≈ 0.955 (Mann-Whitney loses only 4.5% efficiency compared to the optimal t-test!); (2) Uniform distribution: ARE = 1.000; (3) Logistic distribution: ARE = π^2 / 9 ≈ 1.097 (Mann-Whitney beats the t-test by 9.7%); (4) Exponential / Laplace: ARE = 1.500 (Mann-Whitney is 50% more efficient); (5) Cauchy / Heavy-tailed: ARE = ∞ (Mann-Whitney succeeds while the t-test completely fails). The Hodges-Lehmann theorem proves that the ARE of Mann-Whitney U relative to Student's t can NEVER fall below 0.864 for any continuous distribution.

Does the Mann-Whitney test test for equality of medians?

A widespread misconception is that Mann-Whitney U is purely a test of medians. Mann-Whitney strictly tests stochastic dominance: P(X > Y) = 0.5. It can be interpreted as a test of the difference between medians IF AND ONLY IF the two distributions share the exact same shape and spread (the location-shift model F_2(x) = F_1(x - Δ)). If two distributions have different shapes or unequal variances, a significant Mann-Whitney test indicates general distributional inequality, not necessarily a difference in medians.

How is the Hodges-Lehmann location estimator computed from paired Walsh averages?

The Hodges-Lehmann estimator Δ̂_HL is the non-parametric point estimate of the location shift associated with the Mann-Whitney test. It is computed as the median of all n_1 n_2 pairwise differences: Δ̂_HL = median { X_{1, i} - X_{2, j} for all i, j }. It possesses high statistical efficiency, a 29% breakdown point, and provides the non-parametric center of the Moses confidence interval for location shift.

Experimental precautions and statistical checks

  • Ensure tied observations are assigned mid-ranks (average of tied positions) and apply the tie-corrected variance formula.
  • Verify that samples from both groups are statistically independent of one another.
  • Apply continuity correction (±0.5) when using the asymptotic normal Z-approximation for moderate sample sizes.
  • Do not interpret Mann-Whitney as a pure test of medians unless the two distributions share identical shape and variance.

Theoretical assumptions & limitations

  • The Mann-Whitney test evaluates stochastic dominance; differences in distribution variance or skewness can trigger significance.
  • When sample sizes are very small (e.g., n_1, n_2 ≤ 4), the minimum possible p-value is constrained and cannot reach α = 0.05.
↳
Connect theory to empirical data.

The empirical regression of expected U-statistics against location shift Δ confirms non-parametric scaling with slope m = 5.0000 and R² = 1.000000.