Hypothesis Testing in Statistics | 统计学中的假设检验

📚 Hypothesis Testing in Statistics | 统计学中的假设检验

Hypothesis testing is a core topic in A-level statistics. It provides a structured framework for making decisions about a population parameter based on sample evidence. In this guide, we explore the fundamental ideas, procedures, and common pitfalls you need for your exams.

假设检验是 A-level 统计学中的核心内容。它提供了一个基于样本证据对总体参数作出决策的系统框架。在本指南中,我们将深入探讨基本概念、解题步骤以及考试中常见的易错点。


1. What is Hypothesis Testing? | 什么是假设检验?

Hypothesis testing is a statistical method used to test a claim or hypothesis about a population parameter (such as the mean μ or probability p). We start by assuming a null hypothesis is true, then examine whether the sample data provides enough evidence to reject it.

假设检验是一种统计方法,用于检验关于总体参数(如均值 μ 或概率 p)的某种断言或假设。我们首先假定零假设为真,然后考察样本数据是否提供足够的证据来拒绝它。

The logic is simple: if the observed sample result is very unlikely under the null hypothesis, we conclude that the null hypothesis is probably false.

其逻辑很简单:如果观察到的样本结果在零假设下极不可能发生,那么我们得出结论:零假设很可能是错误的。

  • In A-level, you typically test either a binomial probability p or a normal mean μ.

    在 A-level 中,你通常检验二项分布的概率 p 或正态分布的均值 μ。

  • The decision is always based on probability, never absolute certainty.

    决策总是基于概率,而不是绝对确定。


2. Null and Alternative Hypotheses | 零假设与备择假设

Every hypothesis test begins with two competing hypotheses: the null hypothesis H₀ and the alternative hypothesis H₁.

每个假设检验都始于两个对立的假设:零假设 H₀ 与备择假设 H₁。

The null hypothesis H₀ is the statement being tested, usually representing “no change”, “no effect”, or a known existing value. The alternative hypothesis H₁ is what we suspect might be true instead.

零假设 H₀ 是被检验的陈述,通常表示“无变化”“无效果”或已知的当前值。备择假设 H₁ 是我们怀疑可能成立的替代陈述。

H₀ : p = 0.4 versus H₁ : p > 0.4

The alternative hypothesis determines the type of test: if H₁ uses ‘>’, we have a one-tailed test in the upper tail; if ‘<', a one-tailed test in the lower tail; if '≠', a two-tailed test.

备择假设决定检验的类型:若 H₁ 使用“>”,则为上尾单尾检验;若使用“<”,则为下尾单尾检验;若使用“≠”,则为双尾检验。

  • Write H₀ and H₁ clearly before performing any calculations.

    在进行任何计算之前,请清楚写出 H₀ 和 H₁。

  • H₀ always contains equality (=).

    H₀ 总是包含等号(=)。


3. Test Statistics and Significance Level | 检验统计量与显著性水平

A test statistic is a value calculated from the sample data that is used to decide whether to reject H₀. For a binomial test, the test statistic is X, the number of successes in n trials. For a normal test, it is the z-score of the sample mean.

检验统计量是根据样本数据计算出的值,用于决定是否拒绝 H₀。对于二项检验,检验统计量是 X,即 n 次试验中的成功次数。对于正态检验,检验统计量是样本均值的 z 分数。

The significance level (denoted α) is the probability of rejecting H₀ when H₀ is actually true. Common values are 5% (0.05), 1% (0.01), and 10% (0.10).

显著性水平(记作 α)是当 H₀ 实际上为真时拒绝 H₀ 的概率。常用值为 5%(0.05)、1%(0.01)和 10%(0.10)。

P(Reject H₀ | H₀ true) = α

In exams, the significance level is always given. It tells you how much evidence is required before you can reject H₀.

在考试中,显著性水平总是会给出。它告诉你需要多少证据才能拒绝 H₀。


4. One-Tailed and Two-Tailed Tests | 单尾与双尾检验

One-tailed tests test for a change in a specific direction. If H₁ is p > p₀, we look only at the upper tail of the distribution. If H₁ is p < p₀, we look only at the lower tail.

单尾检验针对特定方向的改变进行检验。若 H₁ 为 p > p₀,我们只看分布的上尾;若 H₁ 为 p < p₀,我们只看下尾。

Two-tailed tests are used when the alternative hypothesis states that the parameter is simply different from a value (H₁ : p ≠ p₀). The significance level is split equally between the two tails.

双尾检验用于备择假设表明参数仅仅不等于某个值的情况(H₁ : p ≠ p₀)。显著性水平被平均分配到两个尾部。

Two-tailed 5% test: each tail has 2.5%

The choice between one-tailed and two-tailed must be made before the test, based on the wording of the question, not after seeing the data.

选择单尾还是双尾必须在检验之前根据题目表述作出,而不是在观察数据之后。

  • “Is there evidence that it has increased?” → upper-tailed.

    “是否有证据表明它增加了?”→ 上尾检验。

  • “Has it changed?” → two-tailed.

    “它是否发生了改变?”→ 双尾检验。


5. Critical Values and Rejection Regions | 临界值与拒绝域

The critical value is the boundary between the region where we reject H₀ and the region where we do not reject H₀. The set of values of the test statistic that lead to rejection is called the critical region (or rejection region).

临界值是拒绝 H₀ 的区域与不拒绝 H₀ 的区域之间的边界。导致拒绝的检验统计量取值集合称为拒绝域(或临界区域)。

For a binomial test, we find the critical value c such that P(X ≥ c) ≤ α for an upper-tailed test, or P(X ≤ c) ≤ α for a lower-tailed test.

对于二项检验,我们找到临界值 c,使得上尾检验满足 P(X ≥ c) ≤ α,或下尾检验满足 P(X ≤ c) ≤ α。

If the observed value of X falls inside the critical region, we reject H₀. Otherwise, we do not reject H₀.

如果观测到的 X 值落在拒绝域内,则拒绝 H₀;否则,不拒绝 H₀。

Reject H₀ if X ≥ c (upper-tailed) or X ≤ c (lower-tailed)


6. P-Value Approach | P值方法

The p-value is the probability of obtaining a test statistic at least as extreme as the one observed, assuming H₀ is true. It measures the strength of the evidence against H₀.

p 值是在假定 H₀ 为真的前提下,得到与观测值一样极端或更极端的检验统计量的概率。它衡量反对 H₀ 的证据强度。

For an upper-tailed binomial test with observed value x, the p-value is P(X ≥ x) under H₀. For a lower-tailed test, it is P(X ≤ x).

对于上尾二项检验,观测值为 x 时的 p 值为 H₀ 下的 P(X ≥ x);对于下尾检验,则为 P(X ≤ x)。

If p-value < α, reject H₀.

Many calculators can compute binomial cumulative probabilities directly, so the p-value method is often faster. However, you must still show the probability expression clearly.

许多计算器可以直接计算二项累积概率,因此 p 值方法通常更快。但你仍然需要清楚写出概率表达式。

  • p-value ≤ α → reject H₀ (significant result).

    p 值 ≤ α → 拒绝 H₀(结果显著)。

  • p-value > α → do not reject H₀ (not significant).

    p 值 > α → 不拒绝 H₀(结果不显著)。


7. Errors in Hypothesis Testing: Type I and Type II | 假设检验中的错误:第一类与第二类

Even with perfect calculations, hypothesis tests can lead to errors. A Type I error occurs when we reject H₀ although it is true. Its probability is exactly the significance level α.

即使计算完全正确,假设检验仍可能导致错误。第一类错误是指当 H₀ 为真时却拒绝了它,其概率恰好等于显著性水平 α。

A Type II error occurs when we do not reject H₀ although it is false. Its probability is denoted by β.

第二类错误是指当 H₀ 为假时却没有拒绝它,其概率记作 β。

H₀ is true H₀ is false
Reject H₀ Type I error (α) Correct decision
Do not reject H₀ Correct decision Type II error (β)

Questions often ask you to define these errors in context, not just in general terms. Always relate them to the actual claim being tested.

考试题经常要求你结合具体情境定义这些错误,而不仅仅是泛泛而谈。请始终将它们与正在检验的实际断言联系起来。


8. Steps of a Hypothesis Test | 假设检验的步骤

For both binomial and normal tests, follow the same systematic sequence of steps. Marks are awarded for each stage, so show every step clearly.

无论是二项检验还是正态检验,都遵循同样的系统步骤。每一步都有分数,因此请清楚展示所有步骤。

  1. Define the parameter and state H₀ and H₁.

    定义参数并写出 H₀ 和 H₁。

  2. Identify the distribution and the significance level α.

    确定分布和显著性水平 α。

  3. Calculate the test statistic from the sample.

    根据样本计算检验统计量。

  4. Find the critical region or compute the p-value.

    求出拒绝域或计算 p 值。

  5. Compare the statistic with the critical region, or compare p with α.

    将统计量与临界区域比较,或将 p 与 α 比较。

  6. Write a conclusion in the context of the problem.

    结合问题情境写出结论。

A common phrase for the final step: “There is sufficient evidence to reject H₀ at the 5% significance level.” Always mention the parameter and the direction of change.

最后一步常用表述:“在 5% 的显著性水平下,有充分证据拒绝 H₀。”请务必提及参数和变化方向。


9. Worked Example: Binomial Test | 二项分布检验示例

Suppose a coin is suspected of being biased towards heads. We toss it 20 times and observe 16 heads. Test at the 5% significance level whether the coin is biased towards heads.

假设一枚硬币被怀疑偏向正面。我们抛掷 20 次,观察到 16 次正面。在 5% 的显著性水平下检验该硬币是否偏向正面。

Let p be the probability of heads. The hypotheses are:

令 p 为出现正面的概率。假设为:

H₀ : p = 0.5 H₁ : p > 0.5

Under H₀, X ~ B(20, 0.5). The p-value for the upper tail is P(X ≥ 16).

在 H₀ 下,X ~ B(20, 0.5)。上尾的 p 值为 P(X ≥ 16)。

P(X ≥ 16) = 1 − P(X ≤ 15) = 1 − 0.9941 = 0.0059

Since 0.0059 < 0.05, we reject H₀. There is strong evidence that the coin is biased towards heads.

因为 0.0059 < 0.05,我们拒绝 H₀。有充分证据表明该硬币偏向正面。

Note: If instead we needed the critical region, we would find the smallest c such that P(X ≥ c) ≤ 0.05. Here c = 15, since P(X ≥ 15) = 0.0207 which is below 0.05.

注意:如果改用临界区域法,我们会找到最小的 c,使得 P(X ≥ c) ≤ 0.05。此处 c = 15,因为 P(X ≥ 15) = 0.0207,小于 0.05。


10. Worked Example: Normal Test | 正态分布检验示例

A random sample of 50 students has a mean score of μ₀ = 100? Actually, suppose the population mean is known from past data to be μ = 50 with σ = 10. A new teaching method gives a sample mean x̄ = 53 for n = 25. Test at the 1% level whether the new method increases the mean.

假设从以往数据得知总体均值 μ = 50,σ = 10。一种新教学方法使得 n = 25 的样本均值 x̄ = 53。在 1% 显著性水平下检验新方法是否提高了均值。

We use the normal distribution for the sample mean: X̄ ~ N(μ, σ²/n). Under H₀, X̄ ~ N(50, 100/25) = N(50, 4).

我们使用样本均值的正态分布:X̄ ~ N(μ, σ²/n)。在 H₀ 下,X̄ ~ N(50, 100/25) = N(50, 4)。

H₀ : μ = 50 H₁ : μ > 50

The test statistic is the z-score of x̄:

检验统计量是 x̄ 的 z 分数:

z = (53 − 50) / (10/√25) = 3 / 2 = 1.5

For a 1% upper-tailed test, the critical value is z = 2.3263. Since 1.5 < 2.3263, we do not reject H₀. There is insufficient evidence to conclude the new method increases the mean.

对于 1% 的上尾检验,临界值为 z = 2.3263。因为 1.5 < 2.3263,我们不拒绝 H₀。没有足够证据得出结论说新方法提高了均值。

Alternatively, the p-value is P(Z > 1.5) = 0.0668, which is greater than 0.01.

或者,p 值为 P(Z > 1.5) = 0.0668,大于 0.01。


11. Power of a Test (Advanced) | 检验功效(进阶)

The power of a test is the probability of correctly rejecting H₀ when H₁ is true. It equals 1 − β, where β is the probability of a Type II error.

检验功效是当 H₁ 为真时正确拒绝 H₀ 的概率,等于 1 − β,其中 β 是犯第二类错误的概率。

Power increases when the sample size increases, when the significance level α is larger, or when the true parameter value is farther from H₀.

功效随着样本量增大、显著性水平 α 增大,或真实参数值离 H₀ 更远而增加。

Power = 1 − β = P(Reject H₀ | H₁ is true)

In Edexcel and OCR A-level, power questions appear mainly in the context of hypothesis tests on the mean of a normal distribution, often requiring you to calculate β for a specific alternative value.

在 Edexcel 和 OCR 的 A-level 中,功效问题主要出现在正态分布均值的假设检验背景下,常常要求你针对某个特定的备择值计算 β。


12. Common Pitfalls and Tips | 常见误区与提示

Many students lose marks on hypothesis testing because of small but avoidable mistakes. Here are the most frequent pitfalls and how to avoid them.

许多学生在假设检验中因为细小但可避免的错误而失分。以下是最常见的误区和避免方法。

  • Mixing up the direction of the test: always check the wording of H₁ before choosing the tail.

    弄错检验的方向:在选择单尾还是双尾之前,务必检查 H₁ 的表述。

  • Forgetting to use ‘≤ α’ instead of ‘< α' in discrete distributions.

    在离散分布中忘记使用“≤ α”而不是“< α”。

  • Writing the conclusion without context. Always say what the evidence suggests about the real-world claim.

    结论不结合情境。请始终说明证据对现实世界断言意味着什么。

  • Using the wrong distribution: binomial tests need the binomial CDF; normal tests need the standard normal distribution.

    使用错误的分布:二项检验需要二项累积分布函数;正态检验需要标准正态分布。

  • Not checking whether the sample size conditions for normal approximation are met.

    未检查正态近似的样本量条件是否满足。

Finally, always show the distribution of the test statistic under H₀, because this forms the basis for the p-value or critical region.

最后,始终写出 H₀ 下检验统计量的分布,因为这是 p 值或临界区域的基础。


Published by TutorHao | 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