# Student t检验

**Student t检验**是一种统计假设检验，它用一个样本的均值、或两个样本的均值，与某个假设值或彼此之间进行比较，并借助Student t分布来计入这样一个事实：总体标准差是从数据中估计出来的，而非已知的。它由威廉·西利·戈塞特（William Sealy Gosset，1876–1937）推导得出，戈塞特是都柏林健力士啤酒厂的一名化学师兼酿酒师，1908年他以笔名“Student”发表了这一成果，因为健力士不想让其他公司知道它在生产中使用统计方法。<sup>[1](https://rss.onlinelibrary.wiley.com/doi/full/10.1111/j.1740-9713.2006.00184.x)</sup><sup> • </sup><sup>[2](https://encyclopediaofmath.org/wiki/Gosset%2C_William_Sealy)</sup> 基于他1908年论文的t检验，被称为也许是应用中最广泛使用的单一统计工具。<sup>[2](https://encyclopediaofmath.org/wiki/Gosset%2C_William_Sealy)</sup>

| 关键事实 | 详情 |
|---|---|
| 创始人 | 威廉·西利·戈塞特，健力士酿酒师、应用统计学家，1876年6月13日至1937年10月16日<sup>[3](https://higherlogicdownload.s3.amazonaws.com/BIOMETRICSOCIETY/713ac962-588b-42d5-940f-47ae32f0b28c/UploadedImages/Documents/Past_Events/2008_IBC/IBC2008-Dublin-scientific-programme.pdf)</sup> |
| 奠基论文 | 《均值的或然误差》，作者“Student”，*Biometrika* 6(1): 1–25，1908年3月<sup>[4](https://academic.oup.com/biomet/article-abstract/6/1/1/225634)</sup> |
| 单样本统计量 | \( t = (\bar{Y} - \mu_0)/(s/\sqrt{N}) \)，自由度为 \( N - 1 \)<sup>[5](https://www.itl.nist.gov/div898/handbook/prc/section2/prc.htm)</sup> |
| 双样本（合并）统计量 | \( T = (\bar{x}_1 - \bar{x}_2)/(s_p\sqrt{1/n_1 + 1/n_2}) \)，自由度为 \( n_1 + n_2 - 2 \)<sup>[6](https://itl.nist.gov/div898/software/dataplot/refman1/auxillar/t_test.htm)</sup> |
| 方差不等 | 采用Welch t检验，自由度按Welch–Satterthwaite公式计算；许多人推荐将其作为默认方法<sup>[7](https://rips-irsp.com/articles/10.5334/irsp.82)</sup> |
| 核心假设 | 总体服从正态分布、观测相互独立，以及（对合并版本而言）方差相等<sup>[8](https://pubmed.ncbi.nlm.nih.gov/7717947/)</sup> |

## 在健力士的起源

戈塞特于1899年10月加入阿瑟·健力士父子公司（Arthur Guinness, Son & Co.）担任酿酒师，这是该公司一项政策的一部分——聘用拥有牛津和剑桥一等科学学位的男士，把科学方法引入酿造。<sup>[9](https://gwern.net/doc/statistics/decision/1990-pearson-studentastatisticalbiographyofwilliamsealygosset.pdf)</sup> 他在少量观测（如大麦和啤酒花样品）基础上所做的质量控制工作，需要从远比当时大样本理论所处理的样本更小的样本中进行推断。1906–7年，他休假一年，到伦敦大学学院的卡尔·皮尔逊（Karl Pearson）生物统计实验室学习，并在皮尔逊的帮助下解决了分布问题，写成了那篇论文。<sup>[10](https://www.dib.ie/biography/gosset-william-sealy-student-a3543)</sup><sup> • </sup><sup>[11](https://brendamasters.com/wp-content/uploads/2020/04/history-t-dist-william-gossett.pdf)</sup>

成果以《均值的或然误差》为题，发表于*Biometrika*第6卷第1期第1–25页，时为1908年3月，皮尔逊任编辑，作者仅署名为“Student”。<sup>[4](https://academic.oup.com/biomet/article-abstract/6/1/1/225634)</sup><sup> • </sup><sup>[12](https://www.chem.uci.edu/~unicorn/M3LC/lectures/LectureWeek1F2019.pdf)</sup> 戈塞特使用笔名，是因为健力士将其统计质量控制方法视为商业机密。<sup>[1](https://rss.onlinelibrary.wiley.com/doi/full/10.1111/j.1740-9713.2006.00184.x)</sup> 在论文中，他确立了从正态总体中抽取的、独立同分布的容量为 \( n \) 的样本的 \( s^2 \) 与 \( s \) 的抽样分布，证明了样本均值与样本标准差不相关，并推导出了如今所称的Student t分布。<sup>[2](https://encyclopediaofmath.org/wiki/Gosset%2C_William_Sealy)</sup>

**与传统的一次决裂。** 这篇论文引入了一个被大样本生物统计学派所模糊的区分：戈塞特用 \( s^2 \) 表示样本方差、用 \( \sigma^2 \) 表示总体方差，而该学派对参数和统计量使用同一个符号。<sup>[2](https://encyclopediaofmath.org/wiki/Gosset%2C_William_Sealy)</sup> 他还用一个抽样实验来支持自己的推导，而非仅依赖分析：利用3000名罪犯的身高和左手中指测量数据，他生成了750个容量为4的随机样本，并计算了每个样本的均值、标准差、相关系数和t统计量。<sup>[2](https://encyclopediaofmath.org/wiki/Gosset%2C_William_Sealy)</sup>

论文发表时，这项工作的意义并未得到充分认识，因为当时大多数统计学家关注的是大样本。直到20世纪20年代初R. A. 费希尔（R. A. Fisher）推广了Student t分布，这一检验才在健力士啤酒厂之外得到广泛使用。<sup>[2](https://encyclopediaofmath.org/wiki/Gosset%2C_William_Sealy)</sup><sup> • </sup><sup>[13](https://www.tandfonline.com/doi/abs/10.1080/00031305.1981.10479309)</sup> 戈塞特与费希尔的通信涉及Student t的制表以及许多其他主题，不过两人后来就随机化在实验中的作用公开产生了分歧：戈塞特主张系统性的实验方案与实验对照，这一立场他在最后一篇论文中仍然坚持，该文发表于他1937年去世后的几个月。<sup>[2](https://encyclopediaofmath.org/wiki/Gosset%2C_William_Sealy)</sup>

## 检验的主要形式

**单样本检验。** 当标准差必须从数据中估计时，检验统计量为

\[ t = \frac{\bar{Y} - \mu_0}{s/\sqrt{N}} \]

其中 \( \bar{Y} = (1/N)\sum_{i=1}^{N} Y_i \) 是样本均值，\( s = \sqrt{(1/(N-1))\sum_{i=1}^{N}(Y_i - \bar{Y})^2} \) 是样本标准差，自由度为 \( N - 1 \)。将观测到的t与t分布的临界值比较；在NIST的一个演算示例中，自由度为9的 \( t = 1.782 \) 落在双侧临界值 \( t_{0.025;9} = 2.262 \) 所给出的区间 \( (-2.262, 2.262) \) 之内，因此过程均值保持在50个计数的原假设未被拒绝。<sup>[5](https://www.itl.nist.gov/div898/handbook/prc/section2/prc.htm)</sup> 若标准差已知，则相应的z统计量改为与标准正态分布比较。<sup>[5](https://www.itl.nist.gov/div898/handbook/prc/section2/prc.htm)</sup>

**独立组的双样本检验。** 在假定总体方差相等的情况下，合并标准差为

\[ s_p = \sqrt{\frac{(n_1 - 1)s_1^2 + (n_2 - 1)s_2^2}{n_1 + n_2 - 2}} \]

检验统计量为 \( T = (\bar{x}_1 - \bar{x}_2)/(s_p\sqrt{1/n_1 + 1/n_2}) \)，自由度为 \( n_1 + n_2 - 2 \)。<sup>[6](https://itl.nist.gov/div898/software/dataplot/refman1/auxillar/t_test.htm)</sup> 当不假定方差相等时，统计量使用各自样本的方差，

\[ T = \frac{\bar{x}_1 - \bar{x}_2}{\sqrt{s_1^2/n_1 + s_2^2/n_2}} \]

自由度由Welch–Satterthwaite公式给出，该式在样本量不等或方差不等时较为稳健。<sup>[6](https://itl.nist.gov/div898/software/dataplot/refman1/auxillar/t_test.htm)</sup><sup> • </sup><sup>[14](https://www.itl.nist.gov/div898/handbook/eda/section3/eda353.htm)</sup>

**配对检验。** 当一个样本中的第i次测量与另一个样本中的第i次测量天然配对时——例如对同一批对象进行的前后测量，或对同一批产品用两台测量装置进行比较——就对差值应用配对样本t检验。统计量为 \( T = (\bar{x}_1 - \bar{x}_2)/(s_{x\mathrm{del}}/\sqrt{n}) \)，其中 \( s_{x\mathrm{del}} \) 是差值的标准差，n是配对的数量。<sup>[15](https://www.itl.nist.gov/div898/handbook/prc/section3/prc311.htm)</sup><sup> • </sup><sup>[6](https://itl.nist.gov/div898/software/dataplot/refman1/auxillar/t_test.htm)</sup>

## 假设与稳健性

t检验是一种参数检验，其推导假定总体分布服从正态分布、总体方差相等（对合并的双样本形式而言），以及样本在统计上相互独立。<sup>[8](https://pubmed.ncbi.nlm.nih.gov/7717947/)</sup> 样本量从两个方面影响推断：如果样本量太小，第二类错误的风险会增大；而样本量不等则会放大方差不等的影响。<sup>[8](https://pubmed.ncbi.nlm.nih.gov/7717947/)</sup>

稳健性取决于设计。当各组之间样本量相等时，只要样本量大到足以正确估计均值和标准差（n ≥ 5），Student t检验对方差相等假设的违背是稳健的，但偏度和峰度极高的分布除外。<sup>[7](https://rips-irsp.com/articles/10.5334/irsp.82)</sup> 当各组之间方差和样本量都不相等时，两种检验就会出现分歧：Student t检验可能严重偏倚，产生被放大的第一类错误率，而Welch t检验则如预期那样控制住第一类错误。<sup>[7](https://rips-irsp.com/articles/10.5334/irsp.82)</sup> 一项2026年的模拟研究发现，在样本量均衡时，Student检验和Welch检验都保持了名义假阳性率，但在样本量不等时各有其失效情形：t检验在异方差下失效，当较小样本具有较大方差时，假阳性率会大幅升高；Welch检验在分布偏斜时失效，假阳性率的升高程度随总体偏度而增大。<sup>[16](https://link.springer.com/article/10.1007/s11135-026-02909-5)</sup>

## Student检验与Welch检验

当各组之间方差和样本量都相同时，Student t检验与Welch t检验给出相同的t值、自由度和p值；当只有方差相等而样本量不同时，t值相同，但自由度和p值不同。<sup>[7](https://rips-irsp.com/articles/10.5334/irsp.82)</sup> 默认使用Welch检验的效能代价很小：在标准差比从0.01到100、每组10名受试者的模拟中，Student检验相对于Welch检验的最大效能优势约为5%。<sup>[7](https://rips-irsp.com/articles/10.5334/irsp.82)</sup>

在此基础上，德拉克雷（Delacre）、拉肯斯（Lakens）和莱斯（Leys）于2017年提出，Welch t检验应成为社会科学中的默认方法，他们指出，常见的两步程序——先用Levene检验检验方差相等，再选择一种检验——往往失败，因为Levene检验的效能较低，而Welch检验在R和Minitab中已经是默认方法。<sup>[7](https://rips-irsp.com/articles/10.5334/irsp.82)</sup> 其他综述也得出了类似结论，认为Welch检验通常更可取，因为它在第一类错误方面更为稳健，而效能损失甚微。<sup>[17](https://doi.org/10.1007/s00362-024-01531-7)</sup>

## 非参数替代方法

对于两个独立样本，通常的非参数替代方法是Wilcoxon–Mann–Whitney检验，它通过秩而非均值来比较分布。对正态分布下Mann–Whitney U检验、Student t检验和分离方差t检验进行比较的模拟研究发现，用Mann–Whitney U检验代替假定正态分布的检验，效能损失极小。<sup>[18](https://www.tandfonline.com/doi/abs/10.1080/00220973.1991.10806565)</sup> 基于秩的检验有其自身的假设，即两个分布具有相同的形状和方差，而且它们检验的假设与均值差异不同。<sup>[19](https://www.sciencedirect.com/science/article/pii/S089543560000264X)</sup> 一项广泛的模拟研究涵盖了t检验、Mann–Whitney检验、稳健t检验和置换检验，涉及七种样本量和四种分布形状，发现所考察的所有条件下第一类错误都得到了良好控制。<sup>[20](https://doi.org/10.1027/1614-2241/a000110)</sup>

## 结果的解读

t检验给出一个p值，即在指定的统计模型下，出现至少与观测数据同样极端的数据的概率。美国统计协会2016年关于p值的声明，旨在纠正误解与误用，其中提出的原则直接适用于t检验结果：p值可以表明数据与某个指定统计模型有多么不相容；它们并不衡量所研究假设为真的概率，也不衡量数据仅由随机机会产生的概率；它们不衡量效应的大小或结果的重要性；科学结论或政策决定不应仅基于p值是否通过某个特定阈值。<sup>[21](https://www.amstat.org/asa/files/pdfs/p-valuestatement.pdf)</sup> 用同一t分布、以临界值 \( t_{\alpha/2, N-1} \) 构建的置信区间，给出总体值可能所在的一个数值范围，往往比单独的p值提供更多信息。<sup>[22](https://itl.nist.gov/div898/handbook/prc/section2/prc221.htm)</sup><sup> • </sup><sup>[23](https://www.bmj.com/content/bmj/292/6522/746.full.pdf)</sup>

## References

1. [Beer and statistics, Significance (RSS), 2006](https://rss.onlinelibrary.wiley.com/doi/full/10.1111/j.1740-9713.2006.00184.x)
2. [Gosset, William Sealy, Encyclopedia of Mathematics](https://encyclopediaofmath.org/wiki/Gosset%2C_William_Sealy)
3. [William Sealy Gosset (June 13, 1876–October 16, 1937), International Biometric Society, IBC 2008 Dublin programme](https://higherlogicdownload.s3.amazonaws.com/BIOMETRICSOCIETY/713ac962-588b-42d5-940f-47ae32f0b28c/UploadedImages/Documents/Past_Events/2008_IBC/IBC2008-Dublin-scientific-programme.pdf)
4. [Student, "The Probable Error of a Mean", Biometrika 6(1): 1–25, March 1908, Oxford Academic](https://academic.oup.com/biomet/article-abstract/6/1/1/225634)
5. [NIST/SEMATECH e-Handbook, 7.2.2. Are the data consistent with the assumed process mean?](https://www.itl.nist.gov/div898/handbook/prc/section2/prc.htm)
6. [NIST Dataplot Reference, T TEST](https://itl.nist.gov/div898/software/dataplot/refman1/auxillar/t_test.htm)
7. [Delacre, Lakens, and Leys (2017), Why Psychologists Should by Default Use Welch's t-test Instead of Student's t-test, International Review of Social Psychology 30(1): 92–101](https://rips-irsp.com/articles/10.5334/irsp.82)
8. [Issues in biomedical statistics: comparing means under normal distribution theory, PubMed](https://pubmed.ncbi.nlm.nih.gov/7717947/)
9. [E. S. Pearson, 'Student': A Statistical Biography of William Sealy Gosset (1990)](https://gwern.net/doc/statistics/decision/1990-pearson-studentastatisticalbiographyofwilliamsealygosset.pdf)
10. [Gosset, William Sealy ('Student'), Dictionary of Irish Biography](https://www.dib.ie/biography/gosset-william-sealy-student-a3543)
11. [History of Statistics 7: The t-distribution, W. S. Gosset (1876–1937)](https://brendamasters.com/wp-content/uploads/2020/04/history-t-dist-william-gossett.pdf)
12. [Lecture notes, William Sealy Gosset, Biometrika Volume 6, Issue 1, 1 March 1908, Pages 1–25, UC Irvine](https://www.chem.uci.edu/~unicorn/M3LC/lectures/LectureWeek1F2019.pdf)
13. [Box, J. F., Gosset, Fisher, and the t Distribution, The American Statistician 35(2)](https://www.tandfonline.com/doi/abs/10.1080/00031305.1981.10479309)
14. [NIST/SEMATECH e-Handbook, 1.3.5.3. Two-Sample t-Test for Equal Means](https://www.itl.nist.gov/div898/handbook/eda/section3/eda353.htm)
15. [NIST/SEMATECH e-Handbook, 7.3.1.1. Analysis of paired observations](https://www.itl.nist.gov/div898/handbook/prc/section3/prc311.htm)
16. [Neither the t-test nor Welch's test: a case for robust alternatives in two-sample comparisons with non-ideal data, Quality & Quantity (2026)](https://link.springer.com/article/10.1007/s11135-026-02909-5)
17. [Welch's t test is more sensitive to real world violations of distributional assumptions than Student's t test but logistic regression is more robust than either, Statistical Papers](https://doi.org/10.1007/s00362-024-01531-7)
18. [Comparisons of the Mann-Whitney, Student's t, and Alternate t Tests for Means of Normal Distributions, The Journal of Experimental Education 59(3)](https://www.tandfonline.com/doi/abs/10.1080/00220973.1991.10806565)
19. [Should we always choose a nonparametric test when comparing two apparently nonnormal distributions?, Statistics in Medicine](https://www.sciencedirect.com/science/article/pii/S089543560000264X)
20. [Normality and Sample Size Do Not Matter for the Selection of an Appropriate Statistical Test for Two-Group Comparisons, Methodology](https://doi.org/10.1027/1614-2241/a000110)
21. [American Statistical Association Releases Statement on Statistical Significance and P-Values](https://www.amstat.org/asa/files/pdfs/p-valuestatement.pdf)
22. [NIST/SEMATECH e-Handbook, 7.2.2.1. Confidence interval approach](https://itl.nist.gov/div898/handbook/prc/section2/prc221.htm)
23. [Presentation of study results: limitations of P values, BMJ 292:746 (1986)](https://www.bmj.com/content/bmj/292/6522/746.full.pdf)

---
*Initially written Sep 17, 2026 · Reviewed: Sep 30, 2026; Oct 15, 2026 · Edited: Sep 30, 2026; Oct 15, 2026 · Last review: Oct 15, 2026*

Topic: 物质世界与数学 › 数学与统计学 › 统计学与概率论 › Statistical inference, estimation, sampling, and testing › Hypothesis testing

Copyright 2026 Edgepedia

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license

Source: https://www.edgepedia.org/zh/students-t-test

English original: https://www.edgepedia.org/students-t-test
