📚 AS Maths: Hypothesis Testing Essentials | AS 数学:假设检验 考点精讲
Hypothesis testing is one of the most powerful tools in AS-level statistics. It provides a formal framework for using sample data to make decisions about population parameters. Whether you are testing the fairness of a coin, the mean weight of packets of crisps, or the proportion of defective items on a production line, hypothesis testing turns real-world uncertainty into a clear statistical question. Mastering this topic requires not only knowing the steps but also understanding the logic behind them — from stating the null hypothesis to interpreting a p-value in context.
假设检验是 AS 统计学中最有力的工具之一。它提供了一个规范的框架,让我们能够利用样本数据对总体参数做出决策。无论是检验一枚硬币是否公平、一包薯片的平均重量是否符合标注,还是生产线上不合格品的比例是否超标,假设检验都能将现实世界中的不确定性转化为清晰的统计问题。掌握这部分内容不仅需要记住步骤,更需要理解背后的逻辑——从提出原假设,到结合实际情境解释 p 值,每一步都至关重要。
1. What is a Hypothesis Test? | 什么是假设检验?
A hypothesis test is a statistical method that uses sample data to evaluate a claim about a population parameter. We start with an initial assumption, known as the null hypothesis, and then check whether the observed sample provides enough evidence to reject it. The process is similar to a criminal trial: the defendant is presumed innocent until the evidence proves guilt beyond reasonable doubt.
假设检验是一种利用样本数据来评估关于总体参数说法的统计方法。我们从一个初始假设(即原假设)出发,然后检查观测到的样本是否提供了足够的证据来拒绝它。这个过程类似于刑事审判:在证据能够确凿地证明有罪之前,被告都被假定为无罪。
The parameter being tested could be a binomial probability p or a normal mean μ. In AS maths, you will mainly encounter tests for a population proportion using the binomial distribution, and tests for a mean using the normal distribution when the population variance is known.
被检验的参数可以是二项分布中的概率 p,也可以是正态分布中的均值 μ。在 AS 数学中,你主要会遇到利用二项分布对总体比例进行检验,以及在总体方差已知时利用正态分布对均值进行检验。
2. Null and Alternative Hypotheses | 原假设与备择假设
Every hypothesis test begins by writing two complementary statements: the null hypothesis H₀ and the alternative hypothesis H₁. H₀ represents the status quo or a statement of no effect, no difference, or no change. H₁ represents what we are trying to establish evidence for — often the suspicion or claim we want to test.
每一个假设检验都从写下两个互补的陈述开始:原假设 H₀ 和备择假设 H₁。H₀ 代表现状,或者说是无影响、无差异、无变化的陈述。H₁ 则代表我们试图寻找证据支持的说法——通常是我们想检验的怀疑或声称。
For example, a machine fills packets with a claimed mean weight of 200 g. The null hypothesis would be H₀: μ = 200. If we suspect it is under-filling, the alternative is H₁: μ < 200. For a coin that should be fair, H₀: p = 0.5, and if we want to test whether it is biased either way, H₁: p ≠ 0.5.
例如,一台机器填充包装袋,声称平均重量为 200 克。原假设就是 H₀: μ = 200。如果我们怀疑它填装不足,备择假设就是 H₁: μ < 200。对于一枚应该是公平的硬币,H₀: p = 0.5,如果我们想检验它是否偏向任何一面,H₁: p ≠ 0.5。
3. Significance Level and Rejection Region | 显著性水平与拒绝域
The significance level, denoted by α (alpha), is the probability of rejecting the null hypothesis when it is actually true. It is the tolerance for making a Type I error. In AS exams, common significance levels are 5% (0.05) and 1% (0.01), but you may also see 10% (0.10). The choice of α determines how strong the sample evidence must be before we reject H₀.
显著性水平,用 α 表示,是当原假设实际为真时拒绝它的概率。它是我们对犯第一类错误(弃真错误)的容忍度。在 AS 考试中,常见的显著性水平有 5%(0.05)和 1%(0.01),但你也可能见到 10%(0.10)。α 的选择决定了样本证据需要达到多强才能让我们拒绝 H₀。
The rejection region (or critical region) is the set of values of the test statistic for which the null hypothesis is rejected. If our test statistic falls into this region, the result is statistically significant at the chosen α level. The boundaries of this region are called critical values.
拒绝域是指检验统计量的取值集合,当统计量落入其中时,原假设被拒绝。如果我们的检验统计量落在这个区域内,结果在选定的 α 水平上就是统计显著的。这个区域的边界被称为临界值。
4. Test Statistic and p-Value | 检验统计量与 p 值
The test statistic is a value calculated from the sample data that is used to make a decision about H₀. In a binomial test, the test statistic is the number of successes X. In a normal test, it is the sample mean X̄, which is often converted to the standardised statistic Z = (X̄ − μ₀) / (σ/√n).
检验统计量是由样本数据计算出的一个数值,用于对 H₀ 做出决策。在二项检验中,检验统计量是成功次数 X。在正态检验中,检验统计量是样本均值 X̄,通常会被转化为标准化的统计量 Z = (X̄ − μ₀) / (σ/√n)。
The p-value is the probability of obtaining a test statistic at least as extreme as the one observed, assuming that H₀ is true. It measures the strength of the evidence against H₀. A small p-value (less than α) indicates that the observed result is unlikely if H₀ were true, leading us to reject H₀.
p 值是在 H₀ 为真的前提下,得到与观测值同等极端或更极端的检验统计量的概率。它衡量了反对 H₀ 的证据强度。一个很小的 p 值(小于 α)表明,如果 H₀ 为真,观测到的结果不太可能出现,因此我们拒绝 H₀。
5. Critical Value Method | 临界值法
An alternative to using the p-value is the critical value method. We compare the test statistic directly with the critical value(s) that define the rejection region. In a lower‑tail test, if the test statistic is less than the critical value, we reject H₀. In an upper‑tail test, we reject if it is greater. For a two‑tailed test, we reject if the test statistic lies in either tail beyond the critical values.
除了使用 p 值,另一种方法是临界值法。我们直接将检验统计量与定义拒绝域的临界值进行比较。在一个下尾检验中,如果检验统计量小于临界值,我们就拒绝 H₀。在一个上尾检验中,如果大于临界值就拒绝。对于双尾检验,如果检验统计量落在任何一个尾部并且超过了临界值,我们就拒绝 H₀。
In binomial hypothesis testing at AS, critical values are found using cumulative binomial tables or the binomial formula. For example, with n=20, p=0.5, and a one‑tailed test at α=0.05, you find the largest X such that P(X ≤ c) ≤ 0.05 or P(X ≥ c) ≤ 0.05, making sure the actual rejection probability is as close to α as possible without exceeding it.
在 AS 阶段的二项假设检验中,临界值通过累积二项分布表或二项公式求得。例如,当 n=20, p=0.5,进行 α=0.05 的单尾检验时,需要找到最大的 X 使得 P(X ≤ c) ≤ 0.05,或找到最小的 X 使得 P(X ≥ c) ≤ 0.05,同时确保实际拒绝概率尽可能接近 α 且不超过 α。
6. One‑Tailed vs Two‑Tailed Tests | 单尾检验与双尾检验
The form of H₁ determines whether a test is one‑tailed or two‑tailed. A one‑tailed test is used when the alternative hypothesis specifies a direction: either a decrease (H₁: p < p₀ or μ < μ₀) or an increase (H₁: p > p₀ or μ > μ₀). A two‑tailed test is used when we are testing for any change, without specifying direction: H₁: p ≠ p₀ or μ ≠ μ₀.
H₁ 的形式决定了一个检验是单尾的还是双尾的。当备择假设指明了方向时,我们使用单尾检验:或者是减少(H₁: p < p₀ 或 μ < μ₀),或者是增加(H₁: p > p₀ 或 μ > μ₀)。当我们检验是否存在任何变化而不指定方向时,使用双尾检验:H₁: p ≠ p₀ 或 μ ≠ μ₀。
The critical region and p-value calculation depend on the tail structure. In a two‑tailed test, the significance level is split equally between both tails, so each tail gets α/2. For instance, with α=0.05, you look for rejection regions in both the lower 2.5% and upper 2.5% of the sampling distribution. This affects both the critical values and the p-value: the p-value for a two‑tailed test is twice the probability from the relevant tail.
拒绝域和 p 值的计算都依赖于尾部的结构。在双尾检验中,显著性水平被平分到两个尾部,所以每个尾部得到 α/2。例如,当 α=0.05 时,你要在抽样分布的下尾 2.5% 和上尾 2.5% 内寻找拒绝域。这既影响临界值,也影响 p 值:双尾检验的 p 值是相关尾部概率的两倍。
7. Hypothesis Testing with the Binomial Distribution | 使用二项分布进行假设检验
When the population parameter of interest is a proportion p and the data come from a fixed number n of independent trials with two outcomes, a binomial test is appropriate. You define the test statistic as X ~ B(n, p₀) under H₀, where p₀ is the hypothesised proportion. Then you use the observed number of successes to calculate either a p-value or find critical values.
当感兴趣的总体参数是一个比例 p,并且数据来自固定次数 n 个独立、只有两种结果的试验时,二项检验是合适的。在 H₀ 下,定义检验统计量为 X ~ B(n, p₀),其中 p₀ 是假设的比例。然后你利用观测到的成功次数来计算 p 值或寻找临界值。
Example: A manufacturer claims that at most 10% of its items are defective. You take a sample of 30 items and find 5 defectives. Test at the 5% significance level. Here H₀: p = 0.10, H₁: p > 0.10. Test statistic X = 5. From B(30, 0.10), find P(X ≥ 5) = 1 − P(X ≤ 4) ≈ 0.175. Since 0.175 > 0.05, we fail to reject H₀ — the data do not provide sufficient evidence to contradict the claim.
例题:一个制造商声称其产品的不合格率至多为 10%。你抽取了 30 件产品的样本,发现 5 件不合格。在 5% 的显著性水平下检验。这里 H₀: p = 0.10,H₁: p > 0.10。检验统计量 X = 5。根据 B(30, 0.10),求 P(X ≥ 5) = 1 − P(X ≤ 4) ≈ 0.175。因为 0.175 > 0.05,我们不能拒绝 H₀——数据没有提供足够的证据去质疑该声称。
8. Hypothesis Testing for the Mean (Normal Distribution) | 均值的假设检验(正态分布)
When testing a population mean μ with known variance σ², and either the population is normal or the sample size is large enough (Central Limit Theorem), you can use a z‑test. The test statistic is Z = (X̄ − μ₀) / (σ/√n). Under H₀, Z follows the standard normal distribution N(0, 1).
当检验总体均值 μ 且方差 σ² 已知,并且总体服从正态分布或样本量足够大(中心极限定理)时,你可以使用 z 检验。检验统计量为 Z = (X̄ − μ₀) / (σ/√n)。在 H₀ 下,Z 服从标准正态分布 N(0, 1)。
For a two‑tailed test at α = 0.05 with H₀: μ = 200 and H₁: μ ≠ 200, the critical values are ±1.96. If the calculated Z lies outside this range, reject H₀. If a sample of 50 packets gives X̄ = 196 g with known σ = 10 g, then Z = (196 − 200) / (10/√50) ≈ −2.828. Since −2.828 < −1.96, we reject H₀ and conclude the mean weight is significantly different from 200 g. The p‑value here would be 2 × P(Z < −2.828) ≈ 0.0047.
对于 α = 0.05 的一个双尾检验,H₀: μ = 200,H₁: μ ≠ 200,临界值为 ±1.96。如果计算出的 Z 落在这个范围之外,就拒绝 H₀。假如一个包含 50 包的样本给出了 X̄ = 196 g,且已知 σ = 10 g,则 Z = (196 − 200) / (10/√50) ≈ −2.828。因为 −2.828 < −1.96,我们拒绝 H₀,并得出平均重量与 200 g 有显著差异的结论。这里的 p 值为 2 × P(Z < −2.828) ≈ 0.0047。
9. Interpreting Conclusions in Context | 结合实际解释结论
A statistical decision alone is not enough for a full answer. You must state your conclusion in the context of the original problem. Never just say “reject H₀”. Instead, write something like: “There is sufficient evidence at the 5% level to suggest that the mean weight of the packets is not 200 g, indicating the machine may need recalibration.”
仅有统计决策并不足以构成完整的答案。你必须结合原始问题的背景来陈述结论。永远不要只说“拒绝 H₀”。相反,应该写成这样:“在 5% 的显著性水平下,有充分证据表明包装袋的平均重量不是 200 克,这意味着机器可能需要重新校准。”
If you fail to reject H₀, conclude that there is insufficient evidence to support the alternative claim. Note that failing to reject H₀ does not prove H₀ is true — it only means the sample did not provide strong enough evidence against it. The context might involve non‑statistical considerations, such as practical importance versus statistical significance.
如果你未能拒绝 H₀,则得出结论:没有足够的证据支持备择说法。请注意,未能拒绝 H₀ 并不证明 H₀ 为真——它仅仅意味着样本没有提供足够强的反驳证据。实际情境可能涉及到非统计的考量,比如实际重要性与统计显著性的区别。
10. Common Mistakes and Exam Tips | 常见错误与考点提示
One very common mistake is confusing the null and alternative hypotheses. Always write H₀ with an equal sign: H₀: p = 0.5, never H₀: p < 0.5. The alternative hypothesis should match the wording of the problem: "test if the proportion has increased" leads to H₁: p > p₀.
一个很常见的错误是混淆原假设和备择假设。写 H₀ 时一定要用等号:H₀: p = 0.5,绝不能写成 H₀: p < 0.5。备择假设需要与题目的措辞一致:“检验比例是否增加”应得出 H₁: p > p₀。
-
For binomial tests, ensure that the p-value or critical region uses the correct tail. When finding P(X ≥ c), remember to compute 1 − P(X ≤ c−1).
对于二项检验,要确保 p 值或拒绝域使用的是正确的尾部。在求 P(X ≥ c) 时,要记住计算 1 − P(X ≤ c−1)。
-
In two‑tailed binomial tests, you must compare the observed value with both ends of the distribution. The p‑value is often twice the smaller one‑tailed probability, but compare carefully with the exact wording of the mark scheme.
在双尾二项检验中,你必须将观测值与分布的两端都进行比较。p 值通常是较小的那个单尾概率的两倍,但要仔细对照评分方案的确切要求。
-
For normal tests, use the correct standard deviation: σ/√n, not σ. Remember to check that the conditions for the test are met — either the population is normal or n is large.
对于正态检验,要使用正确的标准差:σ/√n,而不是 σ。记得检查检验的条件是否满足——要么总体是正态的,要么 n 足够大。
-
Always state the significance level in your conclusion and interpret the p‑value or test statistic clearly. Practice distinguishing between “accept H₀” (which we never do) and “do not reject H₀”.
在结论中总要说明显著性水平,并清晰地解释 p 值或检验统计量。练习区分“接受 H₀”(我们从不这么说)和“不拒绝 H₀”。
Published by TutorHao | Maths Revision Series | aleveler.com
更多咨询请联系16621398022(同微信)
屏轩国际教育cambridge primary/secondary checkpoint, cat4, ukiset,ukcat,igcse,alevel,PAT,STEP,MAT, ibdp,ap,ssat,sat,sat2课程辅导,国外大学本科硕士研究生博士课程论文辅导Cancel reply