📚 Hypothesis Test for the Difference Between Means | 均值差的假设检验
In A-Level Edexcel Mathematics, one of the most powerful inferential tools is the hypothesis test for the difference between two population means. This technique allows you to decide whether two samples provide enough evidence to conclude that their underlying population means differ. It builds upon the single-sample t-test but extends the logic to compare two groups – for example, assessing whether a new teaching method improves test scores compared to a traditional method, or whether a diet leads to a greater reduction in blood pressure than a placebo. Understanding the conditions, test statistics and decision rules is essential for success in the statistics component of the course.
在Edexcel A-Level 数学中,最具实用性的推断工具之一就是两个总体均值差的假设检验。该技术能够帮助你判断两个样本是否提供了足够证据,以推断其背后的总体均值存在差异。它建立在单样本 t 检验的基础上,将相关逻辑扩展到两组数据的比较——例如,评估一种新的教学法是否比传统教学法更能提高考试成绩,或某种饮食疗法是否比安慰剂更能降低血压。掌握适用条件、检验统计量和决策规则,对于学好统计部分至关重要。
1. Introduction to Two-Sample Hypotheses | 双样本假设简介
A hypothesis test for the difference between means starts with two populations with unknown means μ₁ and μ₂. We draw independent random samples of sizes n₁ and n₂ and calculate the sample means x̄₁ and x̄₂. The central question is whether the observed difference x̄₁ - x̄₂ is large enough to indicate a genuine difference in the population means, rather than arising solely from sampling variability.
均值差的假设检验涉及两个总体,它们的均值 μ₁ 和 μ₂ 未知。我们从中分别抽取样本量为 n₁ 和 n₂ 的独立随机样本,计算样本均值 x̄₁ 和 x̄₂。核心问题在于:观测到的差值 x̄₁ - x̄₂ 是否足够大,从而表明总体均值真的存在差异,而不仅仅是由抽样波动造成的。
This topic appears throughout the Edexcel specification under the umbrella of 'Hypothesis testing for the difference between means' and often connects with the Normal and t-distributions. You may be asked to carry out a test using either a critical region approach or a p-value method, and to interpret your findings in context.
该主题贯穿 Edexcel 大纲中“均值差的假设检验”这一部分,并常与正态分布和 t 分布联系起来。考题中可能会要求使用临界域方法或 p 值方法完成检验,并结合实际情境解释结果。
2. Null and Alternative Hypotheses | 原假设与备择假设
lently H₀: μ₁ - μ₂ = 0. The alternative hypothesis H₁ can take one of three forms depending on the research question:
在双样本均值检验中,原假设 H₀ 通常表明两个总体均值没有差异:H₀: μ₁ = μ₂,等价于 H₀: μ₁ - μ₂ = 0。备择假设 H₁ 根据研究问题,可以有以下三种形式之一:
Two-tailed: H₁: μ₁ ≠ μ₂ (testing for any difference)。 One-tailed (right): H₁: μ₁ > μ₂ (population 1 mean is greater)。 One-tailed (left): H₁: μ₁ < μ₂ (population 1 mean is smaller). Always define the direction clearly before collecting data.
双侧检验:H₁: μ₁ ≠ μ₂(检验是否存在任何差异)。单侧检验(右侧):H₁: μ₁ > μ₂(总体 1 的均值更大)。单侧检验(左侧):H₁: μ₁ < μ₂(总体 1 的均值更小)。务必在收集数据前就明确方向。
3. Assumptions and Conditions | 假设条件与适用前提
test statistic, several conditions must be met. First, the two samples must be independent – ulation, or the sample sizes should be large enough (n₁, n₂ ≥ 30) to invoke the Central Limit Theorem.
在计算检验统计量之前,需要满足若干条件。首先,两个样本必须独立——一组中的观测值不能影响另一组。其次,所关心的变量在各自总体中应近似服从正态分布,或者样本量足够大(n₁, n₂ ≥ 30),以便应用中心极限定理。
If the population variances σ₁² and σ₂² are known, we can use a z-test. In most A-Level problems, however, population variances are unknown. In such cases we assume the two population variances are equal (homoscedasticity) and employ a pooled two-sample t-test. When this assumption cannot be justified, Edexcel will usually direct you to use a specific approximation or provide the standard errors.
若两个总体的方差 σ₁² 与 σ₂² 已知,可采用 z 检验。然而,在大多数 A-Level 问题中,总体方差是未知的。这时,我们假设两个总体方差相等(方差齐性),并采用合并方差的双样本 t 检验。当无法证明该假定时,Edexcel 的考题通常会指引你使用某种特定近似或直接给出标准误。
4. Test Statistic: Known Variances (z-Test) | 检验统计量:方差已知时的 z 检验
When both population variances are known, the test statistic follows a standard Normal distribution:
当两个总体方差都已知时,检验统计量服从标准正态分布:
z = (x̄₁ - x̄₂) - (μ₁ - μ₂) / √σ₁²/n₁ + σ₂²/n₂
H₀, the hypothesised difference μ₁ - μ₂ is taken as 0, so the formula simplifies to z = (x̄₁ - x̄₂) / √σ₁²/n₁ + σ₂²/n₂ critical values come from the standard Normal distribution: for a two-tailed test at the 5% significance level, we use ±1.96.
在原假设 H₀ 下,假设的均值差 μ₁ - μ₂ 取为 0,因此公式简化为 z = (x̄₁ - x̄₂) / √σ₁²/n₁ + σ₂²/n₂。临界值取自标准正态分布:对于 5% 显著性水平的双侧检验,我们使用 ±1.96。
5. Test Statistic: Unknown but Equal Variances (Pooled t-Test) | 未知但方差相等的合并 t 检验
If we assume σ₁² = σ₂² = σ², we estimate the common variance using a pooled estimator sₚ²:
实际中,σ₁² 和 σ₂² 往往未知。假设 σ₁² = σ₂² = σ²,我们使用合并估计量 sₚ² 来估算共同方差:
sₚ² = [(n₁ - 1)s₁² + (n₂ - 1)s₂²] / (n₁ + n₂ - 2)
Then the test statistic becomes a t-statistic with n₁ + n₂ - 2 degrees of freedom:
t = (x̄₁ - x̄₂) / [sₚ √1/n₁ + 1/n₂]
这时检验统计量变为服从自由度为 n₁ + n₂ - 2 的 t 统计量:
This pooled t-test is the most common form you will encounter in Edexcel questions. It is sensitive to the assumption of equal variances; if a question does not state that the variances are equal, check the context or look for clues such as 'assume equal population variances'.
这个合并 t 检验是 Edexcel 考题中最常见的形式。它对等方差假定较为敏感;如果题目没有明确说明方差相等,需要结合上下文或寻找“假定总体方差相等”之类的提示。
6. Degrees of Freedom and the t-Distribution | 自由度与 t 分布
+ n₂ - 2. A smaller ν gives heavier tails, meaning stronger evidence is needed to reject H₀. As ν increases, the t-distribution approaches the Normal distribution.
t 分布的形状由自由度 ν 决定。对于合并方差的双样本检验,ν = n₁ + n₂ - 2。ν 越小,尾部越厚,意味着拒绝 H₀ 需要更强的证据。随着 ν 增大,t 分布逐渐趋近于正态分布。
e critical values for various ν and significance levels. For example, with ν = 20 at the 5% s locate the correct row and column based on whether the test is one-tailed or two-tailed.
Edexcel 统计表给出了不同 ν 和显著性水平下的临界值。例如,自由度为 20,在 5% 双侧显著性水平下,临界值 t₂₀,₀.₀₂₅ ≈ 2.086。务必根据检验是单侧还是双侧,查找正确的行与列。
7. Critical Regions and Significance Levels | 临界域与显著性水平
Once you have chosen a significance level α (commonly 0.05 or 0.01), the critical region is the set of values of the test statistic that leads to rejecting H₀. For a two-tailed t-test, the critical region is t < -tν,α/2 or t > tν,α/2. For a right-tailed test, reject if t > tν,α. For a left-tailed test, reject if t < -tν,α.
选定显著性水平 α(通常为 0.05 或 0.01)后,临界域就是导致拒绝 H₀ 的检验统计量的取值范围。对于双侧 t 检验,临界域为 t < -tν,α/2 或 t > tν,α/2。对于右侧检验,若 t > tν,α 则拒绝 H₀。左侧检验则拒绝当 t < -tν,α。
Compare the calculated t-value directly with the critical value(s). If the test statistic falls inside the critical region, the result is statistically significant and you reject H₀. Otherwise, you do not have sufficient evidence to reject H₀.
将计算得到的 t 值与临界值直接比较。若检验统计量落在临界域内,则结果具有统计显著性,拒绝 H₀。否则,没有足够证据拒绝 H₀。
8. The p-Value Method | p 值方法
An alternative approach is to compute the probability, under the null hypothesis, of obtaining a test statistic at least as extreme as the one observed. This probability is the p-value. For a two-tailed test, the p-value is twice the area in the tail beyond |t|. For a one-tailed test, it is the single tail area.
另一种方法是计算在原假设成立的情况下,得到至少与观测统计量一样极端的检验统计量的概率,即 p 值。对于双侧检验,p 值为 |t| 以外尾部面积的两倍。对于单侧检验,就是单侧尾部面积。
If the p-value is less than the significance level α, reject H₀. Modern calculators and statistical software can provide p-values directly, but in the exam you are often expected to use tables to find a range for the p-value and reach a conclusion.
若 p 值小于显著性水平 α,则拒绝 H₀。现代计算器和统计软件可以直接给出 p 值,但在考试中,通常需要利用统计表确定 p 值的所在范围,并得出结论。
9. Worked Example: Two-Tailed Pooled t-Test | 实例:双侧合并 t 检验
eviation s₁ = 18 ms, and Group 2 (n₂ = 15) has a mean of 258 ms with s₂ = 20 ms. Assume the population variances are equal and reaction times are Normally distributed. Test at the 5% significance level whether the population means differ.
一位研究人员希望比较两组驾驶员的平均反应时间(单位:毫秒):第一组 n₁ = 12,样本均值 245 ms,标准差 s₁ = 18 ms;第二组 n₂ = 15,均值 258 ms,s₂ = 20 ms。假定两个总体方差相等,且反应时间服从正态分布。在 5% 显著性水平下,检验总体均值是否存在差异。
led). Degrees of freedom ν = 12+15-2 = 25. Critical value t₂₅,₀.₀₂₅ = 2.060 (from tables).
H₀: μ₁ = μ₂, H₁: μ₁ ≠ μ₂(双侧)。自由度 ν = 12+15-2 = 25。查表得临界值 t₂₅,₀.₀₂₅ = 2.060。
/ 25 = (3564+5600)/25 = 9164/25 = 366.56. sₚ = √366.56 ≈ 19.146. Standard error = 19.146 × √1/12 + 1/15 = 19.146 × √0.08333 + 0.06667 = 19.146 × √0.15 = 19.146 × 0.3873 ≈ 7.415.
合并方差 sₚ² = [(11×18²)+(14×20²)] / 25 = (3564+5600)/25 = 9164/25 = 366.56,sₚ ≈ 19.146。标准误 = 19.146 × √1/12 + 1/15 = 19.146 × 0.3873 ≈ 7.415。
753. Since -1.753 is not less than -2.060 and not greater than 2.060, it does not fall in the critical region. We do not reject H₀. There is insufficient evidence at the 5% level to suggest a difference in mean reaction times.
t = (245 - 258) / 7.415 = -13 / 7.415 ≈ -1.753。由于 -1.753 不小于 -2.060,也不大于 2.060,未落入临界域。我们不拒绝 H₀。在 5% 显著性水平下,没有足够证据表明总体平均反应时间存在差异。
10. Paired Sample t-Test for Means | 配对样本的均值 t 检验
When data are naturally paired – for instance, before-and-after measurements on the same individuals – ᵢ - x₂ᵢ for each pair. The test reduces to a single-sample t-test on the mean difference d̄, with H₀: μ_d = 0 and ν = n - 1, where n is the number of pairs.
当数据天然成对出现时——例如,对同一个体进行“前-后”测量——两个样本并不独立。此时,我们应计算每一对的差值 dᵢ = x₁ᵢ - x₂ᵢ,检验转化为对差值均值 d̄ 的单样本 t 检验,H₀: μ_d = 0,自由度 ν = n - 1,n 为配对数目。
The test statistic is t = d̄ / (sd / √n), where sd is the standard deviation of the differences. This paired design often has greater power because it controls for between-subject variability. Make sure you identify paired data correctly; Edexcel questions may describe 'the same participants' or 'matched pairs'.
检验统计量为 t = d̄ / (sd / √n),其中 sd 是差值的标准差。这种配对设计通常功效更高,因为它能控制个体间变异性。一定要正确识别配对数据;Edexcel 考题可能会出现“相同参与者”或“匹配成对”等描述。
11. Confidence Interval for the Difference | 均值差的置信区间
Alongside hypothesis testing, you may be asked to construct a confidence interval for μ₁ - μ₂. For the pooled t-test, a 95% confidence interval is
(x̄₁ - x̄₂) ± tν,0.025 × sₚ √1/n₁ + 1/n₂
除了假设检验,考试还可能要求构建 μ₁ - μ₂ 的置信区间。对于合并 t 检验,95% 置信区间为上述公式。区间不包含 0 等价于双侧检验中拒绝 H₀,两者提供一致的推断。
For the paired test, the interval for the mean difference is d̄ ± tₙ₋₁,₀.₀₂₅ × sd/√n. Confidence intervals are valuable because they give a range of plausible values for the true difference, not just a reject/do-not-reject decision.
对于配对检验,差值均值的置信区间为 d̄ ± tₙ₋₁,₀.₀₂₅ × sd/√n。置信区间很有价值,它能给出真实差值的一个合理范围,而不仅仅是“拒绝/不拒绝”的判断。
12. Common Pitfalls and Exam Tips | 常见误区与应试技巧
Many students confuse independent-sample and paired-sample tests. Always ask: could you shuffle the data between groups without losing the structure? If not, it is probably paired. Another common error is using a z-test when variance is unknown and sample sizes are small; unless σ is known, default to the t-test.
许多学生容易混淆独立样本检验和配对检验。务必自问:能否将两组数据任意交换而不破坏数据结构?如果不行,那很可能是配对设计。另一个常见错误是在方差未知且样本量较小时使用 z 检验;除非已知 σ,否则默认使用 t 检验。
Check your degrees of freedom carefully – for two independent samples it is n₁ + n₂ - 2, not n₁ + n₂ - 1. Also, when using statistical tables, ensure you select the column for the correct tail probability. Writing clear hypotheses, stating the significance level, and drawing a diagram of the critical region can help prevent careless mistakes.
仔细核对自己的自由度——两独立样本下是 n₁ + n₂ - 2,而不是 n₁ + n₂ - 1。此外,使用统计表时,确保选择正确尾部概率对应的列。写出明确假设、注明显著性水平并画出临界域示意图,有助于避免粗心错误。
Finally, always interpret your conclusion in the context of the problem. A statement like 'reject H₀' means very little unless you add what it implies: 'there is sufficient evidence to suggest the mean reaction time differs between the two groups'. Edexcel examiners expect a contextualised conclusion for full marks.
最后,一定要结合问题背景解释结论。仅仅写“拒绝 H₀”意义不大,需要补充其含义:“有足够证据表明两组平均反应时间存在差异”。Edexcel 考官期望看到结合情境的结论才能拿到满分。
Published by TutorHao | Mathematics Revision Series | aleveler.com
更多咨询请联系16621398022(同微信)

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