Σ
SDCalc
高级高级·14 min

多组数据的合并标准差

学习如何在 t 检验和方差分析中计算多组数据的合并标准差。

什么是合并标准差?

合并标准差将两个或多个组的方差估计合并为一个加权估计。它在假设方差齐性的双样本 t 检验中不可或缺。

其原理很直观:如果我们相信两组来自具有相同底层变异性的总体,就可以合并它们的数据以获得更好的变异性估计。更多的数据意味着更精确的估计。

可以这样理解:如果组 A 有 20 个观测值,组 B 有 30 个,而两组的真实方差相同,那么你现在有 50 个观测值来估计该方差,而不是分别用较小的样本单独估计。

何时合并

只有在有理由相信底层总体方差相等时才应合并标准差。在合并之前,可以使用 Levene 检验或 F 检验来验证这一假设。

合并标准差公式

对于两组数据,合并标准差为:

两组合并标准差

sp = √[((n₁-1)s₁² + (n₂-1)s₂²) / (n₁+n₂-2)]

其中 n₁ 和 n₂ 为样本量,s₁ 和 s₂ 为样本标准差。

对于 k 组数据(如在方差分析中),公式推广为:

多组合并标准差

sp = √[Σ(nᵢ-1)sᵢ² / Σ(nᵢ-1)]

注意公式在分子和分母中都使用了 (n-1) 项。这种加权确保较大的样本对合并估计贡献更多,这是合理的,因为较大样本提供的方差估计更可靠。

前提假设

合并标准差假设方差齐性——即所有组共享相同的总体方差。当以下情况出现时,这一假设尤为重要:

  • 样本量不等(若较大组方差较小,问题尤其突出)
  • 最大方差与最小方差之比超过 2-3 倍
  • 样本量较小(大样本对方差不等更具稳健性)

方差不等时怎么办

如果方差不等,请使用韦尔奇 t 检验而非合并 t 检验,或使用各组各自的方差估计。韦尔奇 t 检验不假设方差相等,通常被推荐作为默认方法。

计算示例

场景:比较两个班级的考试成绩:

  • 班级 A:n₁ = 25,均值 = 78,s₁ = 12
  • 班级 B:n₂ = 30,均值 = 82,s₂ = 14

合并标准差计算过程:

sp = √[((25-1)(12)² + (30-1)(14)²) / (25+30-2)] sp = √[(24×144 + 29×196) / 53] sp = √[(3456 + 5684) / 53] sp = √[9140 / 53] = √172.45 = 13.13

合并标准差 13.13 介于两个单独标准差(12 和 14)之间,偏向样本量更大的一方。这个合并值将用于 t 检验公式或 Cohen's d 的计算。

统计学中的应用

  • 独立样本 t 检验:合并标准差用于计算两组均值差的标准误差。
  • Cohen's d 效应量:效应量使用合并标准差进行标准化:d = (M₁ - M₂) / sp
  • 方差分析 (ANOVA):ANOVA 中的均方误差 (MSE) 本质上就是所有组的合并方差估计。
  • 荟萃分析:合并多个研究时,合并估计有助于在不同背景下标准化效应。

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.