故事 · Wilcoxon 与「不看数值看名次」 Origin Story · Wilcoxon and the "Forget the Values, Read the Ranks" Trick
1945 年,化学家 Frank Wilcoxon 受够了实验数据动不动就违反正态假设。他想出一个绝招:别管数值多大,只看排名。 把两组数据倒进同一个袋子里排序,原来的「12.3」「107」「3.0」统统变成「第 1 名」「第 8 名」「第 2 名」。 两年后 Mann 与 Whitney 把它推广成处理两个独立组的 U 检验。这套思路的魅力在于: 一个荒唐的离群点(比如仪器抽风读到 9999)也只能占一个名次,撼动不了结论;而且序数数据(满意度评分)天生就只有名次、没有「真实数值」,正好对口。 In 1945 the chemist Frank Wilcoxon was fed up with experimental data that refused to behave normally. He proposed a clever workaround: forget the magnitudes — just rank them. Pour both groups into one bag, sort them, and the original "12.3", "107", "3.0" become "1st", "8th", "2nd". Two years later, Mann and Whitney generalized the idea into the U-test for two independent samples. The beauty of the approach: an absurd outlier (an instrument spike reading 9999) still occupies just one rank — it cannot derail the conclusion. And ordinal data (satisfaction scores) come pre-ranked anyway, with no "true value" to lose. A perfect fit.

1 两组混合排序 · 每个点贴上它的秩 Pool both groups, sort, label each point with its rank

Δ=2.0

2 秩和对比:系统性偏高才算「显著」 Rank-sum showdown: only a systematic gap counts as "significant"

若两组没差异,秩会均匀洒落,两组秩和都应接近期望值 总秩和 ÷ 2。 一旦 B 组秩和远超 A 组,U 统计量就缩小、检验判为显著 If the two groups don't truly differ, ranks scatter evenly and each group's rank sum sits near the expected value total rank sum ÷ 2. Once B's rank sum pulls well clear of A's, the U statistic shrinks and the test reads significant.

3 现实里的非参数检验 Nonparametric Tests in the Real World

序数量表:满意度 1-5 分、痛感等级、李克特量表 —— 平均分没意义,比的就是名次,U 检验是首选。 Ordinal scales: 1-5 satisfaction ratings, pain levels, Likert scales — averaging them is meaningless; ranks are the only honest comparison, so the U-test is the default.
非正态数据:偏态、重尾、设备读数异常,t 检验会被拖偏;秩检验对分布形状不挑食。 Non-normal data: skewed, heavy-tailed, glitchy instrument reads all drag a t-test off course — rank-based tests are agnostic to distribution shape.
小样本稳健:样本量小到画不出钟形、又有离群点时,秩检验比 t 检验靠谱得多。 Robust at small n: when the sample is too small to even hint at a bell shape and an outlier sneaks in, the rank test holds up far better than the t-test.
配对前后:同一批人改善前后打分用 Wilcoxon 符号秩,只看每对差值的正负名次,不靠正态。 Paired before/after: for the same people scored pre- and post-improvement, use Wilcoxon signed-rank — it only inspects the signed ranks of paired differences, no normality required.
一句话In One Line
参数检验(t 检验)拿数据的真实数值算均值和方差,前提是数据得长成正态那个样子。 非参数检验干脆把数值换成名次 —— 第 1 名、第 2 名……名次只关心「谁比谁大」,不关心「大多少」, 于是分布形状、量纲、极端离群点统统失去杀伤力。Mann-Whitney U 问的是「把两组混排后,A 组赢了 B 组多少次对决」, Wilcoxon 符号秩 问的是「配对差值里,正向的名次和大还是负向的大」。代价是:当数据真的正态时, 秩检验比 t 检验损失约 5% 功效 —— 用一点灵敏度,换来了对假设的免疫力。 Parametric tests like the t-test work on the raw values — means and variances — and bank on the data behaving normally. Nonparametric tests sidestep that bet by swapping values for ranks: 1st, 2nd, 3rd. Ranks only care about "who beats whom", not "by how much", so distribution shape, units, and extreme outliers all lose their bite. Mann-Whitney U asks: after pooling and ranking, how often did A outrank B in head-to-head pairs? Wilcoxon signed-rank asks: among the paired differences, do the positive ranks outweigh the negative ranks? The cost: when the data really is normal, the rank tests forfeit roughly 5% of the t-test's power — a tiny sensitivity tax in exchange for immunity from distributional assumptions.
常见误用Common Mistakes
数据正态也无脑用秩检验数据真服从正态时 t 检验功效更高,秩检验白白损失灵敏度,该用参数检验就用。 Reaching for a rank test even when the data really is normal. Under genuine normality the t-test has more power — the rank test surrenders sensitivity for nothing. Use the parametric test when the assumption holds.
把「无显著差异」当成「两组相同」U 检验只比较中位数/分布位置;不显著仅说明证据不足,不等于两组完全一样。 Reading "no significant difference" as "the groups are identical". The U-test only compares medians/locations; a non-significant result means insufficient evidence, not proof of equivalence.
独立两组误用配对 Wilcoxon独立组用 Mann-Whitney U;只有同一对象前后/配对样本才用 Wilcoxon 符号秩。 Running Wilcoxon signed-rank on two independent groups. For independent samples use the Mann-Whitney U (a.k.a. Wilcoxon rank-sum); reserve Wilcoxon signed-rank for paired or before/after data on the same subjects.

Mann-Whitney U 与 Wilcoxon 符号秩