起源故事 · 化学家的一张排名表
Origin Story · A Chemist's Ranking Sheet
1945 年,化学家 Frank Wilcoxon 在做农药试验时遇到麻烦:每组只有几个样本,数据还经常冒出怪值,
用 t 检验心里没底。他灵机一动 —— 既然具体数值不靠谱,那就只比名次。把两组数据合起来从小到大排序、标上秩,
再看每组的名次之和。两年后 Mann 和 Whitney 把它推广成 U 检验。从此"排名比大小"成了对付脏数据的标准武器。
In 1945 the chemist Frank Wilcoxon hit a wall while running pesticide trials: each group had only a handful of samples and the data kept throwing weird values, which made a t-test feel like a guess.
His insight was beautifully simple — if the numbers themselves can't be trusted, judge by their rank order. Pool both groups, sort smallest to largest, hand out ranks, then compare the sums.
Two years later Mann and Whitney generalized it into the U-test. From then on, "rank instead of measure" became the standard weapon against dirty data.
1 核心动作:把数值换成排名 The Core Move: Replace Values with Ranks
秩交错2 抗异常值:均值被拉飞,秩和不动 Outlier Resistance: The Mean Flies Off, the Rank Sum Doesn't
拖左边"拖一个 B 组点到极端":均值差会被这一个怪值拽得飞起(t 检验失真), 但秩和几乎不变 —— 因为再离谱也只是"最后一名",名次封顶。 Push the "drag a B-group point to the extreme" slider on the left: the mean difference is yanked sky-high by that single weird value (and the t-test goes with it), yet the rank sum barely flinches — no matter how absurd the outlier, it can only occupy "last place." Rank is capped.
3 现实里的非参数检验 Nonparametric Tests in the Real World
满意度评分:1-5 星是有序等级,不是真数值,求平均没意义 → 用秩检验比中位数。
Satisfaction ratings: 1–5 stars are ordinal categories, not real numbers. Averaging them is meaningless — use a rank test on medians instead.
偏态数据:收入、处理时长、维修费这类右偏数据,用秩比用均值更稳健。
Skewed data: income, handling time, repair cost — right-skewed distributions where rank-based tests are far more robust than mean-based ones.
小样本含异常值:每组只有几个点又冒出怪值,t 检验不可信,秩检验照样能用。
Small samples with outliers: only a handful of observations per group, and one of them is weird — the t-test gets shaky, but a rank test still holds.
不达正态假设:正态检验没过、又没法变换数据时,非参数是稳妥的退路。
Normality assumption fails: when the normality test rejects and no transformation cleans things up, nonparametric methods are the dependable fallback.
一句话In One Line
t 检验比的是均值,而均值天生怕异常值 —— 一个怪值就能把它拽跑。
秩检验把"数值大小"降级成"名次先后",于是极端值的破坏力被锁死在"最后一名"这一格里。
代价是损失了一点数值里的信息(同样有差异时,秩检验功效略低)。所以原则是:数据正态又干净,用 t 检验更敏感;偏态、有怪值、是等级数据,用秩检验更可靠。
A t-test compares means, and means are inherently allergic to outliers — one weird value can drag the whole thing off.
A rank test downgrades "how big" to "which place," locking the damage potential of any extreme into a single cell: "last." The cost is a small loss of information (when a real difference exists, the rank test has slightly less power).
So the rule of thumb is straightforward: if data is normal and clean, the t-test is more sensitive; if it's skewed, dirty, or ordinal, the rank test is the safer call.
常见误用Common Mistakes
把它当成万能挡箭牌。数据正态又干净时 t 检验功效更高,别无脑用秩检验。
Treating it as a universal shield. When data is clean and normal, the t-test has higher power — don't reach for a rank test out of habit.
以为它检验的是均值。Wilcoxon 比的是分布位置(中位数),不是均值。
Thinking the Wilcoxon test compares means. It compares the location of the distributions (think medians), not the arithmetic means.
给有序评分求算术平均。1-5 星之间间隔不等距,应比中位数、用秩检验。
Averaging ordinal ratings. The gaps between 1- and 5-star ratings aren't equal intervals — compare medians with a rank test instead.