📚 Confidence Intervals and Tests Using the t-Distribution | 基于 t 分布的置信区间与假设检验
population standard deviation σ is known, the sample mean can be standardised using z = (x̄ − μ) / (σ / √n) and probabilities read directly from the standard normal table. In practice, however, σ is rarely known, so it must be estimated from the sample itself. When σ is replaced by the sample standard deviation s, the sampling distribution is no longer exactly normal for small samples; it is modelled instead by Student's t-distribution.
在 A-Level 统计学中,许多推断方法都从正态分布开始。若总体标准差 σ 已知,可以用 z = (x̄ − μ) / (σ / √n) 对样本均值进行标准化,并直接查标准正态分布表求概率。但实际中 σ 很少已知,必须用样本本身去估计。当用样本标准差 s 替代 σ 时,小样本下的抽样分布不再恰好是正态分布,而是用学生 t 分布来建模。
1. From z to t: Why the Extra Distribution Is Needed | 从 z 到 t:为什么需要另一个分布
The z-statistic is built on a single source of randomness: the sampling variation of x̄. The t-statistic carries a second source of randomness, because the denominator s / √n is itself calculated from the data. Estimating σ by s adds uncertainty, and this uncertainty is largest when the sample is small. Ignoring it and using z-tables would understate the spread of the statistic and understate the probability of extreme results.
z 统计量只有一重随机性来源:样本均值 x̄ 的抽样波动。而 t 统计量带有第二重随机性,因为分母 s / √n 本身也是由数据算出来的。用 s 估计 σ 会引入额外不确定性,样本越小这种不确定性越大。若忽略它、仍查 z 表,就会低估统计量的离散程度,也会低估极端结果出现的概率。
z = (x̄ − μ) / (σ / √n) → t = (x̄ − μ) / (s / √n)
Student's t-distribution, developed by William Sealy Gosset in 1908, is a family of symmetric bell-shaped curves. Each member of the family is labelled by its degrees of freedom ν, which measures how much information s carries. As ν increases, the curve gets narrower and taller, converging to the standard normal curve.
学生 t 分布由 William Sealy Gosset 于 1908 年提出,它是一族对称的钟形曲线。族中每一条曲线由自由度 ν 标记,自由度反映了 s 所携带的信息量。随着 ν 增大,曲线变得更窄、更高,最终收敛到标准正态曲线。
2. When to Use the t-Distribution | 何时使用 t 分布
Use the t-distribution when the population distribution may be assumed normal, the population standard deviation σ is unknown, and the sample size n is small, typically n < 30. In this situation the exact sampling distribution of (x̄ − μ) / (s / √n) is t with n − 1 degrees of freedom, regardless of how small the sample is, provided the underlying population is normal.
当总体分布可假定为正态、总体标准差 σ 未知且样本量 n 较小(通常 n < 30)时,应使用 t 分布。在这种情况下,只要总体服从正态,(x̄ − μ) / (s / √n) 的精确抽样分布就是自由度为 n − 1 的 t 分布,无论样本多小都成立。
If σ is known and the population is normal, use the z-procedure. If σ is unknown, the t-procedure accounts for the extra uncertainty introduced by estimating σ with s. If n is large, the t-distribution is very close to the normal distribution, but exam questions usually expect the t-distribution whenever σ is unknown and the sample size is not large enough to justify the normal approximation on its own.
如果 σ 已知且总体正态,则使用 z 方法。如果 σ 未知,t 方法可以反映用 s 估计 σ 时引入的额外不确定性。如果 n 很大,t 分布与正态分布非常接近,但只要 σ 未知且样本量不足以单独支撑正态近似,考试题通常仍要求使用 t 分布。
- σ known, population normal → use z. | σ 已知、总体正态 → 用 z。
- σ unknown, n small, population roughly normal → use t with ν = n − 1. | σ 未知、n 小、总体近似正态 → 用 t,ν = n − 1。
- σ unknown, n large (n ≥ 30) → t and z give nearly identical answers; t is still acceptable. | σ 未知、n 大(n ≥ 30) → t 与 z 结果几乎相同,用 t 也可以。
3. Degrees of Freedom and the Shape of the t-Distribution | 自由度与 t 分布的形状
tions, one degree of freedom is used up by the sample mean itself, leaving ν = n − 1. This same ν applies to the one-sample t-test and to the confidence interval for a mean.
自由度表示用于估计某个量时独立信息的个数。当用 n 个观测估计一个均值时,样本均值本身就占用了一个自由度,于是剩下 ν = n − 1。单样本 t 检验和均值的置信区间使用的都是这个 ν。
All t-curves share three properties: they are symmetric about 0, they are unimodal and bell-shaped, and they have heavier tails than the standard normal curve. Heavier tails mean more probability mass sits far from zero, which is exactly what we need when s is an unreliable estimate of σ.
所有 t 曲线都有三个共同特征:关于 0 对称;是单峰钟形;尾部比标准正态曲线更厚。更厚的尾部意味着远离 0 的部分概率质量更大,这正符合 s 对 σ 的估计不够可靠时的需要。
| ν | t₀.₀₂₅, ν (two-tailed 95%) | Shape |
| 1 | 12.706 | very heavy tails |
| 5 | 2.571 | heavy tails |
| 15 | 2.131 | close to normal |
| 30 | 2.042 | nearly normal |
| ∞ | 1.960 | standard normal |
4. Reading t-Tables and Critical Values | 查阅 t 表与临界值
A t-table is indexed by degrees of freedom down the side and by a tail probability across the top. Most exam tables give the two-tailed significance levels 0.10, 0.05, 0.02 and 0.01, which correspond to the confidence levels 90%, 95%, 98% and 99%. The value found is the critical value tcrit, the boundary of the rejection region.
t 表纵向按自由度排列,横向按尾概率排列。多数考试用表给出双尾显著性水平 0.10、0.05、0.02 和 0.01,分别对应 90%、95%、98% 和 99% 置信水平。查到的数值就是临界值 tcrit,也就是拒绝域的边界。
For a two-tailed test at significance level α, you need the value that leaves α / 2 in each tail. For a one-tailed test at level α, you need the value that leaves the whole of α in one tail. Because t-curves are wider than the normal curve, tcrit is always larger than the corresponding zcrit, and it falls steadily as ν grows.
对于显著性水平为 α 的双尾检验,需要的是每侧尾部各留下 α / 2 的那个数值。对于水平为 α 的单尾检验,需要的是一侧尾部留下整个 α 的那个数值。由于 t 曲线比正态曲线更宽,tcrit 总是大于对应的 zcrit,并且随着 ν 增大而稳步减小。
5. Confidence Interval for a Mean Using t | 使用 t 分布的均值置信区间
A 100(1 − α)% confidence interval for a population mean μ, when σ is unknown and the population is assumed normal, is constructed from the sample mean plus or minus a margin of error based on t.
在 σ 未知且总体假定为正态时,总体均值 μ 的 100(1 − α)% 置信区间由样本均值加减一个基于 t 的误差限构成。
x̄ ± tα/2, n−1 × (s / √n)
The quantity s / √n error is the product of the two, and the interval is reported as (lower bound, upper bound).
量 s / √n 是均值估计标准误。t 值是所选置信水平下、ν = n − 1 时对应的临界值。误差限是两者的乘积,区间以(下界, 上界)的形式给出。
- Wider confidence level (e.g. 99% instead of 95%) → larger tcrit → wider interval. | 置信水平越高(如 99% 而非 95%)→ tcrit 越大 → 区间越宽。
- Larger n → smaller s / √n and smaller tcrit → narrower interval. | n 越大 → s / √n 越小且 tcrit 越小 → 区间越窄。
- Larger s → larger standard error → wider interval. | s 越大 → 标准误越大 → 区间越宽。
6. Worked Example: Constructing a t Confidence Interval | 例题:构造 t 置信区间
machine produces bolts with nominal diameter 25.4 mm. A random sample of 12 bolts gives x̄ = 25.42 mm and s = 0.30 mm. Diameters are assumed normally distributed. Find a 95% confidence interval for the true mean diameter.
某机器生产的螺栓标称直径为 25.4 mm。随机抽取 12 个螺栓,测得 x̄ = 25.42 mm,s = 0.30 mm。假定直径服从正态分布。求真实平均直径的 95% 置信区间。
Step 1. σ is unknown and n = 12 < 30, so use t with ν = 12 − 1 = 11.
Step 2. For 95% two-tailed, α / 2 = 0.025, so t0.025, 11 = 2.201.
Step 3. Standard error = s / √n = 0.30 / √12 = 0.0866.
Step 4. Margin of error = 2.201 × 0.0866 = 0.1906.
Step 5. Interval = 25.42 ± 0.191, that is (25.23, 25.61).
第一步. σ 未知且 n = 12 < 30,故使用 t,ν = 12 − 1 = 11。
第二步. 95% 双尾下 α / 2 = 0.025,故 t0.025, 11 = 2.201。
第三步. 标准误 = s / √n = 0.30 / √12 = 0.0866。
第四步. 误差限 = 2.201 × 0.0866 = 0.1906。
第五步. 区间 = 25.42 ± 0.191,即 (25.23, 25.61)。
and unjustifiably confident. The t-procedure pays for the unknown σ with a wider interval.
注意,如果改用 z = 1.960,区间会是 25.42 ± 0.170,明显更窄,也因此不当地高估了精度。t 方法正是以更宽的区间来补偿 σ 未知这一事实。
7. Interpreting a Confidence Interval Correctly | 正确解释置信区间
A 95% confidence interval does not mean "there is a 95% probability that μ lies in this particular interval". Once calculated, the interval either contains μ or it does not. The 95% refers to the long-run success rate of the procedure: if the same sampling method were repeated many times, about 95% of the resulting intervals would capture μ.
95% 置信区间并不意味着"μ 落在这个具体区间内的概率是 95%"。区间一经算出,它要么包含 μ,要么不包含。95% 指的是这套方法的长期成功率:如果同样的抽样方法重复很多次,大约 95% 的区间会覆盖住 μ。
In written answers, use phrasing such as: "We are 95% confident that the true mean diameter lies between 25.23 mm and 25.61 mm." Always name the population parameter being estimated and give the context, not merely the numbers.
在书面作答中,应使用这样的表述:"我们有 95% 的把握认为真实平均直径在 25.23 mm 与 25.61 mm 之间。"一定要指明所估计的总体参数并交代实际背景,不能只给出数字。
Also relate the interval to any claim under discussion. If the nominal value 25.4 mm lies inside the interval, there is no evidence against the claim that the machine is correctly calibrated; if it lies outside, the data suggest a systematic difference.
还要把区间与题中涉及的断言联系起来。若标称值 25.4 mm 落在区间内,就没有证据反对"机器校准正确"的说法;若落在区间外,则数据提示存在系统性偏差。
8. Hypothesis Testing with the t-Distribution | 使用 t 分布进行假设检验
er than z, and the critical value or p-value comes from the t-distribution with ν = n − 1.
单样本 t 检验遵循与其他假设检验相同的五步结构,只是检验统计量改为 t 而不是 z,临界值或 p 值来自自由度为 ν = n − 1 的 t 分布。
t = (x̄ − μ₀) / (s / √n), ν = n − 1
Here μ₀ is the value of the mean stated in the null hypothesis H₀. The test is valid when the observations are independent, the sample is random, and the population is approximately normal (or n is large enough for the central limit theorem to apply).
这里 μ₀ 是原假设 H₀ 中所陈述的均值取值。当观测相互独立、样本随机抽取且总体近似正态(或 n 足够大、可以用中心极限定理)时,检验是有效的。
- H₀: μ = μ₀ | 原假设: μ = μ₀
- H₁ (two-tailed): μ ≠ μ₀ | 备择假设(双尾): μ ≠ μ₀
- H₁ (one-tailed): μ > μ₀ or μ < μ₀ | 备择假设(单尾): μ > μ₀ 或 μ < μ₀
9. One-Tailed and Two-Tailed t-Tests | 单尾与双尾 t 检验
The direction of H₁ decides whether the whole significance level sits in one tail or is split between two. This choice must be made before looking at the data, and it should be driven by the wording of the question.
备择假设 H₁ 的方向决定了显著性水平是全部落在一侧尾部,还是被均分到两侧。这一选择必须在看数据之前作出,并且应当由题目措辞决定。
| H₁ form | Test type | Reject H₀ when |
| μ ≠ μ₀ | two-tailed | | t | > tα/2, n−1 |
| μ > μ₀ | one-tailed (upper) | t > tα, n−1 |
| μ < μ₀ | one-tailed (lower) | t < −tα, n−1 |
Because the one-tailed critical value is smaller, a one-tailed test is more powerful in the specified direction. Using a one-tailed test merely because the sample mean happens to fall on one side of μ₀ is a serious misuse and is penalised in mark schemes.
由于单尾临界值更小,单尾检验在指定方向上功效更高。仅仅因为样本均值恰好落在 μ₀ 的某一侧就改用单尾检验,是严重的误用,在评分标准中会被扣分。
10. Worked Example: A One-Sample t-Test | 例题:单样本 t 检验
that a battery lasts 20 hours on average. A consumer group tests 16 batteries and finds x̄ = 19.2 hours with s = 1.6 hours. Carry out a test at the 5% e whether the mean lifetime is below the claim. Assume lifetimes are normally distributed.
某厂商声称其电池平均续航 20 小时。消费者组织测试了 16 节电池,得到 x̄ = 19.2 小时,s = 1.6 小时。在 5% 显著性水平下检验平均续航是否低于厂商声称值。假定续航时间服从正态分布。
Step 1. H₀: μ = 20, H₁: μ < 20. One-tailed lower tail, α = 0.05.
Step 2. ν = 16 − 1 = 15, so t0.05, 15 = 1.753 and the critical region is t < −1.753.
Step 3. Standard error = 1.6 / √16 = 0.4.
Step 4. t = (19.2 − 20) / 0.4 = −0.8 / 0.4 = −2.00.
Step 5. Since −2.00 < −1.753, t lies in the critical region, so reject H₀.
Step 6. There is sufficient evidence at the 5% level that the mean battery lifetime is less than 20 hours.
第一步. H₀:μ = 20,H₁:μ < 20。单尾下侧,α = 0.05。
第二步. ν = 16 − 1 = 15,故 t0.05, 15 = 1.753,拒绝域为 t < −1.753。
第三步. 标准误 = 1.6 / √16 = 0.4。
第四步. t = (19.2 − 20) / 0.4 = −0.8 / 0.4 = −2.00。
第五步. 因为 −2.00 < −1.753,t 落在拒绝域内,故拒绝 H₀。
第六步. 在 5% 水平下有足够证据表明电池平均续航低于 20 小时。
The p-value can also be reported. Since 1.753 < 2.00 < 2.131, the one-tailed p-value lies between 0.025 and 0.05, which is consistent with rejecting H₀ at the 5% level.
也可以报告 p 值。由于 1.753 < 2.00 < 2.131,单尾 p 值介于 0.025 与 0.05 之间,这与在 5% 水平下拒绝 H₀ 的结论一致。
11. Paired Data and the Paired t-Test | 配对数据与配对 t 检验
When two measurements are taken on the same subject, or on naturally matched pairs, the correct procedure works with the differences rather than with two
更多咨询请联系16621398022(同微信)

或截图后用「扫一扫 → 相册」选择本图