故事 · 一把尺子量不了所有波动 Story · No Single Ruler Measures Every Kind of Spread
最早人们只用极差衡量波动 —— 简单、直观,最大减最小完事。可它有个致命弱点:只听两个最极端的声音, 只要一个录入错误或一只"黑天鹅",它就被彻底带偏。于是统计学家 John Tukey 在 1970 年代推广箱线图, 用 IQR(四分位距)把注意力收回到中间 50% 的"群众"身上,异常值再也左右不了它。 而当要跨单位比较时,把标准差除以均值得到变异系数 CV —— 它脱去了量纲的外衣,让大象与老鼠终于能同台竞技。 Originally, analysts measured spread with the range alone — simple, intuitive, just max minus min. But the range has a fatal flaw: it listens only to the two loudest voices. One typo or one black-swan event yanks it wildly off course. In the 1970s, the statistician John Tukey popularised the box plot and the interquartile range (IQR), which keep their attention on the central 50% of the data — outliers can rant all they want, the IQR will not move. And when comparison must cross units, dividing the standard deviation by the mean gives the coefficient of variation (CV). By shedding its units, CV finally lets an elephant and a mouse compete on the same stage.

1 箱线图:异常值能拉爆极差,却拉不动 IQR Box plot: outliers blow up the range but leave the IQR untouched

无异常值no outlier

2 变异系数:让大象和老鼠同台比波动 Coefficient of variation: putting an elephant and a mouse on the same stage

大象体重 ±50kg、老鼠体重 ±5g,单看标准差大象"波动大得多"。可换成 CV = 标准差 / 均值, 去掉量纲后才看清:谁的相对波动更大,谁的过程更不稳。 ±50 kg on an elephant looks enormous next to ±5 g on a mouse if you stare at the raw standard deviation. But switch to CV = standard deviation / mean: once the units are gone, you can finally see which species has the larger relative wobble — and the noisier process.

3 现实里的三把尺子 The Three Rulers in the Real World

稳健离散度:含异常值或重尾的数据,报 IQR / 中位数比报极差 / 均值更靠谱,不会被一两个怪点带歪。 Robust dispersion: for data with outliers or heavy tails, report the IQR with the median rather than the range with the mean — one or two odd points cannot pull the summary off course.
跨量纲比较:比较不同单位、不同量级的过程稳定性(毫米件 vs 米级件),只能用无量纲的 CV。 Cross-scale comparison: when you are comparing process stability across units or magnitudes (millimetre parts vs metre-scale parts), only the unit-free CV is a fair yardstick.
箱线图体检:一张箱线图同时给出中位数、IQR、须线和离群点,是探索性数据分析的第一眼工具。 Box-plot health check: one box plot delivers the median, IQR, whiskers, and flagged outliers at a glance — the first-look tool of exploratory data analysis.
异常值检测:超出 Q₁ − 1.5·IQR 或 Q₃ + 1.5·IQR 的点常被标为离群点,IQR 是判定的标尺。 Outlier detection: points outside Q₁ − 1.5·IQR or Q₃ + 1.5·IQR are routinely flagged as outliers — IQR is the official measuring stick behind that rule.
一句话In One Line
三把尺子量的是同一件事 —— 数据有多散 —— 却各有脾气。极差只问两端,敏感而脆弱; IQR只问中间 50%,迟钝却稳健;CV把波动除以均值,脱去单位,让"波动大小"变成可跨场景比较的相对量。 选哪把尺子,取决于你怕什么:怕被异常值骗,就用 IQR;想跨量纲比,就用 CV;只要个粗略上下限,极差也够。 All three rulers measure the same thing — how spread out your data are — but each has its own temperament. Range only listens to the extremes: sensitive and fragile. IQR only listens to the middle 50%: slow to react, but rock-solid. CV divides spread by the mean, strips the units away, and turns "how much it wobbles" into a number you can compare across very different scales. Pick a ruler by the failure mode you fear: scared of outliers, reach for IQR; need cross-unit comparison, reach for CV; happy with a rough upper-and-lower bound, the plain range is enough.
常见误用Common Mistakes
含异常值还用极差描述波动极差只看两端,一个怪点就失真;改用 IQR 更稳健。 Reporting the range on data that contains outliers. Range only watches the extremes — one rogue point distorts it. Switch to the IQR for a robust read.
对均值接近 0 的数据算 CV分母趋近 0 时 CV 会爆炸失去意义;CV 只适合正值、均值远离 0 的量。 Computing CV when the mean sits near zero. As the denominator approaches zero, CV explodes and stops being meaningful. Use CV only for strictly positive quantities whose mean is comfortably away from zero.
用标准差直接跨量纲比波动带单位的标准差不可比;先除以均值换成无量纲的 CV 再比。 Comparing standard deviations directly across different units. A standard deviation that carries units cannot be compared across scales — divide by the mean first to obtain a unit-free CV.

极差