📚 Difference Between Means of Two Independent Normal Distributions | 两个独立正态分布均值之差的推断
In many real-world scenarios, we need to compare the averages of two separate groups – for example, testing whether a new teaching method improves exam scores compared to a traditional approach, or checking if two production lines yield components with the same mean length. When we collect independent samples from two normally distributed populations, statistical theory provides powerful tools to estimate and test the difference between their population means. This article carefully develops the inference procedures required by the Edexcel A-Level Mathematics specification, covering both the known-variance case (z-test) and the more common situation where variances are unknown but assumed equal (pooled t-test).
在许多现实场景中,我们需要比较两个独立组的平均值——例如,检验一种新教学法是否比传统教法提高了考试成绩,或者检查两条生产线是否产出平均长度相同的零件。当我们从两个正态总体中抽取独立样本时,统计学理论提供了可靠的工具来估计和检验总体均值之间的差异。本文严格围绕Edexcel A-Level数学考试大纲展开,详细推导了已知方差情形下的 z 检验,以及更常见的方差未知但假定相等情形下的合并 t 检验。
1. The Sampling Distribution of the Difference | 样本均值差的抽样分布
Let X₁ ~ N(μ₁, σ₁²) and X₂ ~ N(μ₂, σ₂²) be two independent normal populations. If independent random samples of sizes n₁ and n₂ are drawn, then the sample means are X̄₁ ~ N(μ₁, σ₁²/n₁) and X̄₂ ~ N(μ₂, σ₂²/n₂). Because the samples are independent, the difference in sample means is also normally distributed: X̄₁ - X̄₂ ~ N(μ₁ - μ₂, σ₁²/n₁ + σ₂²/n₂). The standard error of the difference is therefore √σ₁²/n₁ + σ₂²/n₂. This result forms the foundation of all two-sample inference for normal means.
设 X₁ ~ N(μ₁, σ₁²) 和 X₂ ~ N(μ₂, σ₂²) 为两个独立的正态总体。若抽取容量分别为 n₁ 和 n₂ 的独立随机样本,则样本均值满足 X̄₁ ~ N(μ₁, σ₁²/n₁) 和 X̄₂ ~ N(μ₂, σ₂²/n₂)。由于样本独立,两个样本均值的差也服从正态分布:X̄₁ - X̄₂ ~ N(μ₁ - μ₂, σ₁²/n₁ + σ₂²/n₂)。因此,差值的标准误为 √σ₁²/n₁ + σ₂²/n₂。这一结论是一切两个正态均值推断的基础。
2. Key Assumptions | 关键假设条件
must be independent; there should be no pairing or matching between observations. Second, each underlying population is normally distributed. If the sample sizes are large (typically n₁ ≥ 30 and n₂ ≥ 30), the Central Limit Theorem ensures the sampling distribution of X̄₁ - X̄ es σ₁² and σ₂² must be known or a reasonable assumption about their equality must be made.
在进行两个样本的检验或构建置信区间之前,需要检查三个重要假设。第一,两个样本必须独立;观测值之间不应存在配对或关联。第二,每个总体服从正态分布。如果样本量较大(通常 n₁ ≥ 30 且 n₂ ≥ 30),中心极限定理可以保证即使总体并非严格正态,X̄₁ - X̄₂ 的抽样分布也近似正态。第三,总体方差 σ₁² 和 σ₂² 必须已知,或者需要对方差是否相等做出合理的假定。
3. Case I: Known Population Variances (z-Test) | 情形一:总体方差已知(z 检验)
st statistic follows a standard normal distribution under the null hypothesis H₀: μ₁ = μ₂.
当 σ₁² 和 σ₂² 均已知时,在原假设 H₀: μ₁ = μ₂ 成立的条件下,检验统计量服从标准正态分布。
z = (x̄₁ - x̄₂) / √σ₁²/n₁ + σ₂²/n₂ ~ N(0, 1)
z = (x̄₁ - x̄₂) / √σ₁²/n₁ + σ₂²/n₂ ~ N(0, 1)
The decision can be made by comparing the calculated z-value with critical values from the normal distribution, or by using a p-value. For a two-tailed test at significance level α, reject H₀ if |z| > zα/2. This approach is straightforward but rarely applicable in practice because population variances are seldom known.
可以通过将计算所得的 z 值与正态分布临界值比较,或通过 p 值来做决策。在显著性水平为 α 的双侧检验中,如果 |z| > zα/2,则拒绝 H₀。这一方法直接明了,但由于总体方差极少已知,在实际应用中较为少见。
4. Case II: Unknown but Equal Variances (Pooled t-Test) | 情形二:方差未知但相等(合并 t 检验)
². In this case, both samples provide information about the common variance, which can be combined into a single pooled estimate sp².
在大多数 A-Level 考题中,总体方差未知但可以假定相等,即 σ₁² = σ₂² = σ²。此时,两个样本都提供了关于共同方差的信息,可以合并为一个联合估计量 sp²。
sp² = [(n₁ - 1)s₁² + (n₂ - 1)s₂²] / (n₁ + n₂ - 2)
sp² = [(n₁ - 1)s₁² + (n₂ - 1)s₂²] / (n₁ + n₂ - 2)
The pooled standard deviation sp = √sp² resulting test statistic follows a t-distribution with ν = n₁ + n₂ - 2 degrees of freedom.
然后利用合并标准差 sp = √sp² 来计算差值的标准误。得到检验统计量服从自由度为 ν = n₁ + n₂ - 2 的 t 分布。
t = (x̄₁ - x̄₂) / [sp √1/n₁ + 1/n₂] ~ t(n₁ + n₂ - 2)
t = (x̄₁ - x̄₂) / [sp √1/n₁ + 1/n₂] ~ t(n₁ + n₂ - 2)
This pooled t-test is the standard method required by Edexcel when σ₁² and σ₂² are not given directly but are assumed equal.
当 σ₁² 与 σ₂² 未直接给出但假定相等时,这种合并 t 检验正是 Edexcel 考纲所要求的标准方法。
5. Hypothesis Testing Procedure | 假设检验步骤
Carrying out a two-sample hypothesis test for the difference in means follows a structured routine. The steps below are presented as an ordered checklist, exactly as expected in an exam.
进行两个样本均值差的假设检验需要遵循结构化的流程。下面以有序清单的形式给出步骤,完全符合考试评分要求。
Step 1: State the hypotheses. - μ₂ = 0). H₁: μ₁ ≠ μ₂ for a two-tailed test, or μ₁ > μ₂ / μ₁ < μ₂ for a one-tailed test.
第一步:陈述假设。 H₀: μ₁ = μ₂(或 μ₁ - μ₂ = 0)。对于双侧检验,H₁: μ₁ ≠ μ₂;对于单侧检验,H₁: μ₁ > μ₂ 或 μ₁ < μ₂。
Step 2: Choose significance level α. Commonly α = 0.05 or 0.01.
第二步:选择显著性水平 α。 常用 0.05 或 0.01。
Step 3: Calculate the test statistic. Use the z-statistic if variances are known, or the pooled t-statistic if variances are unknown but assumed equal. Show all working to gain method marks.
第三步:计算检验统计量。 若方差已知,使用 z 统计量;若方差未知但假定相等,使用合并 t 统计量。展示全部计算过程以获取方法分。
Step 4: Determine the critical value or p-value. Compare |z| or |t| with the critical value from tables, or give the p-value range if the table is limited.
第四步:确定临界值或 p 值。 将 |z| 或 |t| 与查表所得的临界值对比,若表格受限则给出 p 值的范围。
Step 5: Draw a conclusion in context. "There is sufficient evidence at the α level to reject H₀ and conclude that the population means differ significantly." Or "there is insufficient evidence to reject H₀." Always link back to the problem statement.
第五步:在上下文中得出结论。 “在 α 水平上有充分证据拒绝 H₀,可以认为总体均值存在显著差异。” 或者 “没有充分证据拒绝 H₀。” 始终将结论与问题背景联系起来。
6. Confidence Intervals for μ₁ - μ₂ | μ₁ - μ₂ 的置信区间
In addition to hypothesis testing, a confidence interval provides an estimated range for the true difference between the population means. The form of the interval depends on whether the population variances are known.
除了假设检验,置信区间还能给出两个总体均值真实差异的估计范围。区间的形式取决于总体方差是否已知。
If σ₁² and σ₂² are known, a 100(1-α)% confidence interval is given by
如果 σ₁² 和 σ₂² 已知,则 100(1-α)% 的置信区间为
(x̄₁ - x̄₂) ± zα/2 × √σ₁²/n₁ + σ₂²/n₂
(x̄₁ - x̄₂) ± zα/2 × √σ₁²/n₁ + σ₂²/n₂
When variances are unknown but assumed equal, we use the pooled standard error and the t-distribution critical value:
当方差未知但假定相等时,采用合并标准误和 t 分布临界值:
(x̄₁ - x̄₂) ± tα/2, ν × sp √1/n₁ + 1/n₂
(x̄₁ - x̄₂) ± tα/2, ν × sp √1/n₁ + 1/n₂
he interval, we would not reject H₀ at the corresponding significance level; if zero is outside the interval, H₀ is rejected. This direct link often helps in interpreting exam questions quickly.
其中 ν = n₁ + n₂ - 2。如果零落在区间内,则在相应的显著性水平下不拒绝 H₀;若区间不包含零,则拒绝 H₀。这种直接的联系有助于快速理解考题含义。
7. Worked Example: Known Variances | 示例精讲:已知方差情形
as a mean length of 48.5 mm. From long-term records, the population standard deviations are known: σ_A = 4.2 mm and σ_B = 3.8 mm. Test at the 5% significance level whether the two machines produce rods with different mean lengths.
某工厂有两台机器生产钢棒。机器 A 的 25 根样本平均长度为 52.0 mm,机器 B 的 30 根样本平均长度为 48.5 mm。根据长期记录,已知总体标准差为 σ_A = 4.2 mm,σ_B = 3.8 mm。在 5% 显著性水平下检验两台机器生产的钢棒平均长度是否存在差异。
= μ_B, H₁: μ_A ≠ μ_B. α = 0.05, two-tailed test. The test statistic is z = (52.0 - 48.5) / √4.2²/25 + 3.8²/30 = 3.5 / √0.7056 + 0.4813 = 3.5 / √1.1869 ≈ 3.5 / 1.0894 ≈ 3.214. The critical value z0.025 ₀. There is evidence of a significant difference in mean lengths between the two machines.
H₀: μ_A = μ_B, H₁: μ_A ≠ μ_B。α = 0.05,双侧检验。检验统计量 z = (52.0 - 48.5) / √4.2²/25 + 3.8²/30 = 3.5 / √0.7056 + 0.4813 = 3.5 / √1.1869 ≈ 3.5 / 1.0894 ≈ 3.214。临界值 z0.025 = 1.96。由于 3.214 > 1.96,拒绝 H₀。有证据表明两台机器的平均长度存在显著差异。
8. Worked Example: Pooled t-Test | 示例精讲:合并 t 检验
gives a mean of 18.4 g with s₂ = 2.5 g. Assuming equal population variances, test at the 1% level whether Fertiliser 1 results in a higher mean weight than Fertiliser 2.
一个试验比较两种肥料。第一组(n₁ = 10)的平均作物重量为 22.1 g,样本标准差 s₁ = 3.0 g;第二组(n₂ = 12)的平均重量为 18.4 g,s₂ = 2.5 g。假定总体方差相等,在 1% 显著性水平下检验肥料 1 是否比肥料 2 有更高的平均重量。
H₀: μ₁ = μ₂, H₁: μ₁ > μ₂ (one-tailed). α = 0.01. First, pooled variance: sp 2.5²)] / (10+12-2) = (9×9 + 11×6.25) / 20 = (81 + 68.75) / 20 = 149.75 / 20 = 7.4875, so sp = √7.4875 ≈ 2.736. Standard error = sp √1/10 + 1/12 = 2.736 × √0.1 + 0.08333 = 2.736 × √0 t = (22.1 - 18.4) / 1.171 = 3.7 / 1.171 ≈ 3.159. Degrees of freedom = 20. Critical value t0.01, 20 one-tailed) = 2.528. Since 3.159 > 2.528, reject H₀. There is sufficient evidence at the 1% level that Fertiliser 1 yields a higher mean weight.
H₀: μ₁ = μ₂, H₁: μ₁ > μ₂(单侧检验)。α = 0.01。首先计算合并方差:sp 3.0²) + (11)(2.5²)] / (10+12-2) = (9×9 + 11×6.25) / 20 = (81 + 68.75) / 20 = 149.75 / 20 =
Published by TutorHao | A-Level Mathematics Revision Series | aleveler.com
更多咨询请联系16621398022(同微信)

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