Hypothesis Testing for the Difference of Two Independent Normal Population Means | 独立正态总体均值差的假设检验

📚 Hypothesis Testing for the Difference of Two Independent Normal Population Means | 独立正态总体均值差的假设检验

In A-Level Further Mathematics, hypothesis testing for the difference of two independent normal population means is a core topic in statistical inference. This procedure allows us to compare two populations using sample data, determining whether an observed difference between sample means is statistically significant or simply due to random variation. We assume both populations follow a normal distribution, and the two samples are drawn independently.

在 A-Level 进阶数学中,独立正态总体均值差的假设检验是统计推断的核心内容。这一方法使我们能够利用样本数据比较两个总体,判断观察到的样本均值差异是否具有统计显著性,还是仅仅由随机波动造成。我们假设两个总体均服从正态分布,且两个样本独立抽取。


1. General Framework: Null and Alternative Hypotheses | 基本框架:原假设与备择假设

For comparing two population means, we denote the population means as μ₁ and μ₂. The null hypothesis typically states that there is no difference between the means, written as H₀: μ₁ – μ₂ = 0 (or equivalently μ₁ = μ₂). The alternative hypothesis can take one of three forms depending on the research question: two-tailed (H₁: μ₁ ≠ μ₂), left-tailed (H₁: μ₁ – μ₂ < 0), or right-tailed (H₁: μ₁ - μ₂ > 0).

在比较两个总体均值时,我们用 μ₁ 和 μ₂ 表示两个总体的均值。原假设通常表明均值之间没有差异,写作 H₀: μ₁ – μ₂ = 0(等价于 μ₁ = μ₂)。备择假设则根据研究问题取三种形式之一:双侧检验(H₁: μ₁ ≠ μ₂)、左侧检验(H₁: μ₁ – μ₂ < 0)或右侧检验(H₁: μ₁ - μ₂ > 0)。


2. The Test Statistic: When Population Variances Are Known | 检验统计量:方差已知情形

When the population variances σ₁² and σ₂² are known, the test statistic follows a standard normal distribution. The sample means X̄₁ and X̄₂ are normally distributed, so their difference X̄₁ – X̄₂ is also normally distributed with mean μ₁ – μ₂ and variance σ₁²/n₁ + σ₂²/n₂.

当总体方差 σ₁² 和 σ₂² 已知时,检验统计量服从标准正态分布。样本均值 X̄₁ 和 X̄₂ 服从正态分布,因此它们的差 X̄₁ – X̄₂ 也服从正态分布,其均值为 μ₁ – μ₂,方差为 σ₁²/n₁ + σ₂²/n₂。

Under the null hypothesis H₀: μ₁ = μ₂, the test statistic is:

Z = (X̄₁ – X̄₂) / √(σ₁²/n₁ + σ₂²/n₂) ~ N(0, 1)

This Z-statistic is compared against critical values from the standard normal distribution. For a two-tailed test at significance level α, we reject H₀ if |Z| > z(α/2). For one-tailed tests, we reject H₀ if Z > z(α) for a right-tailed test, or Z < -z(α) for a left-tailed test.

在原假设 H₀: μ₁ = μ₂ 下,检验统计量为:

Z = (X̄₁ – X̄₂) / √(σ₁²/n₁ + σ₂²/n₂) ~ N(0, 1)

该 Z 统计量与标准正态分布的临界值进行比较。对于显著性水平 α 的双侧检验,若 |Z| > z(α/2) 则拒绝 H₀。对于单侧检验,右侧检验中若 Z > z(α) 则拒绝 H₀;左侧检验中若 Z < -z(α) 则拒绝 H₀。


3. When Population Variances Are Unknown: The t-Distribution | 方差未知情形:t 分布

In most real-world applications, population variances are unknown. When both samples come from normal populations with the same unknown variance (σ₁² = σ₂² = σ²), we can pool the sample variances to obtain a better estimate of the common variance. This pooled variance is a weighted average of the two sample variances, with weights proportional to their degrees of freedom.

在大多数实际应用中,总体方差是未知的。当两个样本来自方差相同的正态总体时(σ₁² = σ₂² = σ²),我们可以合并样本方差,以获得共同方差的更优估计。合并方差是两样本方差的加权平均,权重与各自的自由度成正比。

The pooled variance estimator is:

sₚ² = [(n₁ – 1)s₁² + (n₂ – 1)s₂²] / (n₁ + n₂ – 2)

The test statistic becomes:

t = (X̄₁ – X̄₂) / √(sₚ²(1/n₁ + 1/n₂)) ~ t(n₁ + n₂ – 2)

Here, the degrees of freedom are n₁ + n₂ – 2. This pooled t-test is appropriate under the assumption that the two population variances are equal, a condition that should be verified or justified from context.

合并方差估计量为:

sₚ² = [(n₁ – 1)s₁² + (n₂ – 1)s₂²] / (n₁ + n₂ – 2)

检验统计量变为:

t = (X̄₁ – X̄₂) / √(sₚ²(1/n₁ + 1/n₂)) ~ t(n₁ + n₂ – 2)

此时自由度为 n₁ + n₂ – 2。这种合并 t 检验适用于两个总体方差相等的假设,该条件需要验证或由题目背景给出。


4. The Four-Step Procedure for Hypothesis Testing | 假设检验的四步流程

For the Edexcel A-Level Further Mathematics examinations, a systematic four-step approach is expected. This structure ensures clarity and completeness in your solution. Each step must be written with full hypotheses, the correct test statistic formula, the distributional assumption, and a clear conclusion.

在 Edexcel A-Level 进阶数学考试中,通常要求使用系统化的四步方法。这一结构确保解题的清晰性和完整性。每一步都必须写出完整的假设、正确的检验统计量公式、分布假设和明确的结论。

  • Step 1 — Hypotheses: Define H₀ and H₁ in terms of the parameter of interest. State the significance level α.
  • Step 2 — Test statistic: Calculate the value of the test statistic using the appropriate formula (Z or t).
  • Step 3 — Distribution and critical region: State the distribution under H₀, determine the critical value(s) from statistical tables, and specify the rejection region.
  • Step 4 — Conclusion: Compare the test statistic with the critical value(s), decide whether to reject H₀, and state the conclusion in the context of the question.
  • 第一步 — 假设:用所关注的参数定义 H₀ 和 H₁,并给出显著性水平 α。
  • 第二步 — 检验统计量:使用适当的公式(Z 或 t)计算检验统计量的值。
  • 第三步 — 分布与临界域:说明 H₀ 下的分布,从统计表中确定临界值,并写出拒绝域。
  • 第四步 — 结论:将检验统计量与临界值比较,决定是否拒绝 H₀,并结合题目背景写出结论。

5. Summary Table of Test Statistics | 检验统计量汇总表

The choice of test statistic depends crucially on whether the population variances are known and whether they are equal. The table below summarises the three common scenarios encountered in the Edexcel specification.

检验统计量的选择关键在于总体方差是否已知以及是否相等。下表总结了 Edexcel 考纲中常见的三种情形。

Scenario Assumption Test Statistic Distribution
Known variances σ₁², σ₂² given Z = (X̄₁ – X̄₂) / √(σ₁²/n₁ + σ₂²/n₂) N(0, 1)
Unknown equal variances σ₁² = σ₂² unknown t = (X̄₁ – X̄₂) / √(sₚ²(1/n₁ + 1/n₂)) t(n₁ + n₂ – 2)
Large samples n₁, n₂ large (≥ 30) Z = (X̄₁ – X̄₂) / √(s₁²/n₁ + s₂²/n₂) N(0, 1) approx.

Note that the third scenario uses the central limit theorem: for sufficiently large samples, the sample mean is approximately normally distributed regardless of the underlying population distribution, and sample variances can replace population variances.

注意第三种情形使用中心极限定理:当样本量足够大时,无论总体分布形态如何,样本均值近似服从正态分布,且样本方差可替代总体方差。


6. Relationship Between Confidence Intervals and Hypothesis Tests | 置信区间与假设检验的关系

A two-tailed hypothesis test at significance level α is equivalent to checking whether the null hypothesized value lies inside a (1 – α) × 100% confidence interval for the difference between the means. This duality provides an alternative method for conducting the test and offers additional insight into the precision of the estimate.

显著性水平 α 的双侧检验等价于检查原假设值是否落在均值差的 (1 – α) × 100% 置信区间内。这种对偶性为检验提供了另一种方法,并可更深入地理解估计的精确度。

The (1 – α) × 100% confidence interval for μ₁ – μ₂ when variances are known is:

(X̄₁ – X̄₂) ± z(α/2) × √(σ₁²/n₁ + σ₂²/n₂)

If this interval contains 0, we cannot reject H₀; if 0 lies outside the interval, we reject H₀. This approach is especially useful for reporting results, as the interval conveys both the effect size and the uncertainty associated with the estimate.

方差已知时,μ₁ – μ₂ 的 (1 – α) × 100% 置信区间为:

(X̄₁ – X̄₂) ± z(α/2) × √(σ₁²/n₁ + σ₂²/n₂)

如果该区间包含 0,则不能拒绝 H₀;如果 0 落在区间之外,则拒绝 H₀。这种方法尤其适用于报告结果,因为区间同时传达了效应量和估计的不确定性。


7. Common Pitfalls in Applying the Test | 运用检验时的常见错误

Students frequently make mistakes when applying hypothesis tests for the difference of two means. Being aware of these pitfalls is essential for maximising marks in examinations. Each pitfall below is paired with guidance on how to avoid it.

学生在应用两均值差假设检验时常犯错误。了解这些常见误区对于在考试中获取满分至关重要。下面每个误区都附有避免建议。

  • Confusing one-tailed and two-tailed tests: The alternative hypothesis must be determined by the context of the question. If the question asks “is there a difference?”, use a two-tailed test. If it asks “is X greater than Y?”, use a right-tailed test.
  • Using Z instead of t: When σ² is unknown and must be estimated from samples, use the t-distribution with the correct degrees of freedom, not the normal distribution.
  • Incorrect degrees of freedom: For the pooled t-test, the degrees of freedom are n₁ + n₂ – 2, not min(n₁, n₂) – 1 or any other value.
  • Misinterpreting the conclusion: “Failing to reject H₀” does not mean H₀ is true; it merely means there is insufficient evidence to reject it.
  • Ignoring the independence assumption: The test is only valid when the two samples are drawn independently. Paired data require a different procedure (the paired t-test).
  • 混淆单侧与双侧检验:备择假设由题目背景决定。若问题问”是否存在差异?”则用双侧检验;若问”X 是否大于 Y?”则用右侧检验。
  • 误用 Z 代替 t:当 σ² 未知且需由样本估计时,应使用具有正确自由度的 t 分布,而非正态分布。
  • 自由度计算错误:合并 t 检验的自由度为 n₁ + n₂ – 2,而非 min(n₁, n₂) – 1 或其它值。
  • 误解结论:“不能拒绝 H₀” 并不意味着 H₀ 为真,仅表示证据不足以拒绝它。
  • 忽略独立性假设:该检验仅在两个样本独立抽取时有效。配对数据需要不同的方法(配对 t 检验)。

8. Test of Hypothesis Using the p-Value Method | 使用 p 值法进行假设检验

An alternative to the critical value approach is the p-value method. The p-value is defined as the probability, under the null hypothesis, of obtaining a test statistic as extreme or more extreme than the observed value. If the p-value is less than the significance level α, we reject H₀.

临界值法的替代方法是 p 值法。p 值定义为在原假设下,观测到检验统计量值的概率至少与当前观测值一样极端。若 p 值小于显著性水平 α,则拒绝 H₀。

For a two-tailed test, the p-value is computed as 2 × P(Z > |z_obs|) for the normal case, or 2 × P(T > |t_obs|) for the t case. For one-tailed tests, it is simply P(Z > z_obs) for a right-tailed test or P(Z < z_obs) for a left-tailed test.

对于双侧检验,p 值计算为 2 × P(Z > |z_obs|)(正态情形)或 2 × P(T > |t_obs|)(t 分布情形)。对于单侧检验,右侧检验的 p 值为 P(Z > z_obs),左侧检验的 p 值为 P(Z < z_obs)。

When using the p-value method, it is crucial to remember that the p-value depends on the sampling distribution, and for a t-test, the degrees of freedom must match the pooled degrees of freedom. The p-value also has the practical advantage that it can be compared directly with any significance level, eliminating the need to look up critical values that depend on the chosen α.

使用 p 值法时,必须记住 p 值依赖于抽样分布,且 t 检验中自由度必须与合并自由度一致。p 值的实际优势在于它可直接与任意显著性水平比较,无需查找依赖于所选 α 的临界值。


9. Worked Example: Pooled t-Test | 实例分析:合并 t 检验

Problem: Two independent samples are drawn from two normal populations with the same unknown variance. Sample 1: n₁ = 12, X̄₁ = 25.4, s₁² = 4.8. Sample 2: n₂ = 15, X̄₂ = 22.1, s₂² = 5.3. Test at the 5% significance level whether the population means differ.

问题:从两个方差相同且未知的正态总体中独立抽取两个样本。样本 1:n₁ = 12,X̄₁ = 25.4,s₁² = 4.8。样本 2:n₂ = 15,X̄₂ = 22.1,s₂² = 5.3。在 5% 显著性水平下检验两个总体均值是否存在差异。

Solution:

Step 1 — Hypotheses: H₀: μ₁ – μ₂ = 0, H₁: μ₁ – μ₂ ≠ 0, α = 0.05.

Step 2 — Pooled variance:

sₚ² = (11 × 4.8 + 14 × 5.3) / (12 + 15 – 2) = (52.8 + 74.2) / 25 = 127 / 25 = 5.08

Step 3 — Test statistic:

t = (25.4 – 22.1) / √(5.08(1/12 + 1/15)) = 3.3 / √(5.08 × 0.15) = 3.3 / √0.762 ≈ 3.3 / 0.873 ≈ 3.78

Step 4 — Critical value: Degrees of freedom = 25. For a two-tailed test at α = 0.05, the critical value is t(25, 0.025) = 2.060. Since 3.78 > 2.060, we reject H₀.

Step 5 — Conclusion: There is sufficient evidence at the 5% significance level to conclude that the two population means are different.

解答:

第一步 — 假设:H₀: μ₁ – μ₂ = 0,H₁: μ₁ – μ₂ ≠ 0,α = 0.05。

第二步 — 合并方差:

sₚ² = (11 × 4.8 + 14 × 5.3) / (12 + 15 – 2) = (52.8 + 74.2) / 25 = 127 / 25 = 5.08

第三步 — 检验统计量:

t = (25.4 – 22.1) / √(5.08(1/12 + 1/15)) = 3.3 / √(5.08 × 0.15) = 3.3 / √0.762 ≈ 3.3 / 0.873 ≈ 3.78

第四步 — 临界值:自由度为 25。在 α = 0.05 的双侧检验中,临界值为 t(25, 0.025) = 2.060。由于 3.78 > 2.060,我们拒绝 H₀。

第五步 — 结论:在 5% 显著性水平下有充分证据表明两个总体均值不同。


10. Worked Example: Known Variances | 实例分析:方差已知情形

Problem: A manufacturer claims that the mean breaking strength of nylon rope from two different production lines is the same. A random sample of 40 ropes from line A has a mean breaking strength of 512 kg, while a sample of 36 ropes from line B has a mean strength of 505 kg. The population standard deviations are known to be σ_A = 8 kg and σ_B = 9 kg. Test the claim at the 1% significance level.

问题:某制造商声称两条生产线生产的尼龙绳的平均断裂强度相同。从 A 生产线随机抽取 40 根绳子,平均断裂强度为 512 kg;从 B 生产线抽取 36 根绳子,平均强度为 505 kg。已知总体标准差分别为 σ_A = 8 kg 和 σ_B = 9 kg。在 1% 显著性水平下检验该声称。

Solution:

Step 1 — Hypotheses: H₀: μ_A – μ_B = 0, H₁: μ_A – μ_B ≠ 0, α = 0.01.

Step 2 — Test statistic:

Z = (512 – 505) / √(64/40 + 81/36) = 7 / √(1.6 + 2.25) = 7 / √3.85 ≈ 7 / 1.962 ≈ 3.57

Step 3 — Critical value: For α = 0.01, z(0.005) = 2.576. The rejection region is |Z| > 2.576.

Step 4 — Conclusion: Since 3.57 > 2.576, we reject H₀. There is strong evidence at the 1% significance level that the mean breaking strengths of the two production lines are different.

解答:

第一步 — 假设:H₀: μ_A – μ_B = 0,H₁: μ_A – μ_B ≠ 0,α = 0.01。

第二步 — 检验统计量:

Z = (512 – 505) / √(64/40 + 81/36) = 7 / √(1.6 + 2.25) = 7 / √3.85 ≈ 7 / 1.962 ≈ 3.57

第三步 — 临界值:对于 α = 0.01,z(0.005) = 2.576。拒绝域为 |Z| > 2.576。

第四步 — 结论:由于 3.57 > 2.576,我们拒绝 H₀。在 1% 显著性水平下有强有力的证据表明两条生产线的平均断裂强度不同。


11. Type I and Type II Errors in Two-Sample Tests | 双样本检验中的第一类与第二类错误

Understanding the nature of statistical errors is fundamental to interpreting the results of any hypothesis test. A Type I error occurs when we reject a true null hypothesis. The probability of a Type I error is controlled by the significance level α. A Type II error occurs when we fail to reject a false null hypothesis; its probability is denoted by β, and its complement 1 – β is called the statistical power of the test.

理解统计错误的本质是解读任何假设检验结果的基础。第一类错误发生在拒绝了一个真实的原假设时。第一类错误的概率由显著性水平 α 控制。第二类错误发生在未能拒绝一个错误的原假设时,其概率记为 β,而 1 – β 称为检验的统计功效。

Increasing the sample sizes n₁ and n₂ reduces both the standard error of the difference and the probability of a Type II error, thereby increasing the power of the test. Conversely, choosing a smaller α makes the test more conservative, reducing Type I errors but increasing the risk of Type II errors, holding sample sizes constant.

增大样本量 n₁ 和 n₂ 会减小均值差的标准误,同时降低第二类错误的概率,从而增大检验的功效。相反,在样本量不变的情况下,选择较小的 α 会使检验更保守,降低第一类错误但也增加了第二类错误的风险。

In the context of comparing two means, a Type I error would mean claiming a real difference between the population means when none exists. A Type II error would mean concluding that there is insufficient evidence for a difference when the population means actually do differ.

在比较两均值的背景下,第一类错误意味着在总体均值实际无差异时声称存在差异。第二类错误意味着在总体均值确实存在差异时得出结论认为证据不足。


12. Determining Required Sample Size | 确定所需样本量

A common examination question involves finding the sample size required to achieve a given statistical power or to detect a specific difference between the means. For a two-tailed Z-test with known variances, the sample size formula (balanced design n₁ = n₂ = n) is derived from the power equation.

常见的考试题目包括:确定达到给定检验功效或检测指定均值差异所需的样本量。对于方差已知的双侧 Z 检验,样本量公式(平衡设计 n₁ = n₂ = n)由功效方程推导得出。

The required sample size per group is:

n = [ (z(α/2) + z(β))² × (σ₁² + σ₂²) ] / δ²

where δ = μ₁ – μ₂ is the true difference to be detected, z(α/2) and z(β) are the standard normal critical values for the significance level and power, respectively. This formula highlights the trade-off: detecting a smaller effect δ requires a larger sample size, as does achieving higher power or a smaller significance level.

每组所需样本量为:

n = [ (z(α/2) + z(β))² × (σ₁² + σ₂²) ] / δ²

其中 δ = μ₁ – μ₂ 为待检测的真实差异,z(α/2) 和 z(β) 分别为显著性水平与功效对应的标准正态临界值。该公式体现了权衡关系:检测更小的效应 δ 需要更大的样本量,追求更高的检验功效或更小的显著性水平同样如此。

For example, with σ₁ = σ₂ = 10, α = 0.05, power = 0.80, and a target difference δ = 5, we have z(0.025) = 1.96 and z(0.20) = 0.8416. Therefore:

n = (1.96 + 0.8416)² × 200 / 25 = 7.849 × 200 / 25 ≈ 62.8 → n = 63 per group

This calculation shows that one must round up to ensure the desired power is at least achieved.

例如,当 σ₁ = σ₂ = 10、α = 0.05、功效 = 0.80、目标差异 δ = 5 时,z(0.025) = 1.96,z(0.20) = 0.8416。因此:

n = (1.96 + 0.8416)² × 200 / 25 = 7.849 × 200 / 25 ≈ 62.8 → n = 63 每组

该计算表明必须向上取整,以确保实际功效至少达到目标值。


Published by TutorHao | Further Mathematics Revision Series | aleveler.com

更多咨询请联系16621398022(同微信)

Comments

屏轩国际教育cambridge primary/secondary checkpoint, cat4, ukiset,ukcat,igcse,alevel,PAT,STEP,MAT, ibdp,ap,ssat,sat,sat2课程辅导,国外大学本科硕士研究生博士课程论文辅导

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Discover more from aleveler.com

Subscribe now to keep reading and get access to the full archive.

Continue reading