Σ
SDCalc
进阶应用·9 min

利用标准差检测异常值

学习如何使用标准差识别数据中的异常值。掌握 3σ 法则、IQR 方法,以及何时应该剔除异常值。

什么是异常值?

异常值是与其他观测值差异显著的数据点。它们可能由测量误差、数据录入错误引起,也可能代表值得调查的真正异常情况。

位于 (10, 50) 的橙色点是一个异常值

3σ 法则

对于正态分布数据,偏离均值超过 3 个标准差的数据点被视为异常值。这种情况随机发生的概率不到 0.3%。

异常值判定条件

x < μ - 3σ OR x > μ + 3σ

示例

假设考试成绩的 μ = 75,σ = 10: - 下界:75 - 30 = 45 - 上界:75 + 30 = 105 - 低于 45 分或高于 105 分即为异常值

Z 分数法

计算每个数据点的 Z 分数。若 |z| > 3(有时为 2.5),则判定为异常值。

Z 分数

z = (x - μ) / σ

阈值选择

- |z| > 3:保守标准(识别的异常值较少) - |z| > 2.5:适中标准 - |z| > 2:宽松标准(识别的异常值较多)

IQR 方法(替代方案)

四分位距(IQR)方法对异常值更具稳健性,因为它不使用均值和标准差。

1

第一步

找到 Q1(第 25 百分位数)和 Q3(第 75 百分位数)
2

第二步

计算 IQR = Q3 - Q1
3

第三步

下界 = Q1 - 1.5 × IQR
4

第四步

上界 = Q3 + 1.5 × IQR
5

第五步

落在上下界之外的点即为异常值

异常值的处理

不要自动删除!

异常值不一定都是错误。在删除之前,请先调查: - 是否为数据录入或测量错误? - 是否为真实的极端值? - 是否代表一个重要的边界情况?

何时删除

- 确认的数据录入错误 - 测量设备故障 - 超出数据可能的取值范围

何时保留

- 反映了真实的变异性 - 对你的分析很重要 - 删除会导致结果偏差

Further Reading

How to Read This Article

A statistics tutorial is a practical interpretation guide, not just a formula dump. It refers to the assumptions, notation, and reporting language that analysts need when they explain a result to a teacher, manager, client, or reviewer. The article body covers the specific topic, while the sections below create a common interpretation frame that readers can reuse across related metrics.

Reading goalWhat to focus onCommon mistake
DefinitionWhat the metric is and what quantity it summarizesTreating the formula as self-explanatory
Formula choiceSample versus population assumptions and notationUsing n when n-1 is required or vice versa
InterpretationWhether the result indicates concentration, spread, or riskCalling a large value good or bad without context

Frequently Asked Questions

How should I interpret a high standard deviation?

A high standard deviation means the observations are spread farther from the mean on average. Whether that spread is acceptable depends on the context: wide dispersion might signal risk in finance, instability in manufacturing, or genuine natural variation in scientific data.

Why do some articles mention n while others mention n-1?

The denominator reflects the difference between population and sample formulas. Population variance and population standard deviation use N because the full dataset is known. Sample variance and sample standard deviation often use n-1 because Bessel’s correction reduces bias when estimating population spread from a sample.

What is a statistical interpretation guide?

A statistical interpretation guide is a page that moves beyond arithmetic and explains meaning. It tells you what a metric is, when the formula applies, and how to describe the result in plain English without overstating certainty.

Can I cite this article in a report?

You should cite the underlying authoritative reference for formal work whenever possible. This page is best used as an explanatory bridge that helps you understand the concept before quoting the original standard or handbook.

Why include direct citations on every article page?

Direct citations give readers a route to verify the definition, notation, and assumptions. That improves trust and reduces the chance that a simplified explanation is mistaken for the entire technical standard.

Authoritative References

These sources define the concepts referenced most often across our articles. Bessel's correction is a sample adjustment, variance is a squared measure of spread, and standard deviation is the square root of variance expressed in the same units as the data.