← 返回资讯屏轩教育 · 行业资讯

Hypothesis Testing | 假设检验

2026-08-03 03:33 · 本文部分内容由AI辅助创作

📚 Hypothesis Testing | 假设检验

Hypothesis testing is a fundamental statistical tool in the IB Mathematics: Applications and Interpretation course. It provides a structured framework for making decisions or inferences about a population based on sample data. Whether you are testing a claimed proportion, comparing means, or examining associations between categorical variables, hypothesis testing helps quantify the evidence and control the risk of drawing wrong conclusions. This article covers the core principles, common test types, and practical examples to strengthen your understanding for both Paper 2 and the internal assessment.

假设检验是IB数学:应用与解释课程中一个基础的统计工具。它提供了一套结构化的框架,用于基于样本数据对总体做出决策或推断。无论你是在检验声称的比例、比较均值,还是考察分类变量之间的关联,假设检验都能帮助量化证据并控制得出错误结论的风险。本文涵盖核心原理、常见检验类型和实例,以巩固你对Paper 2和内部评估的理解。


1. The Logic of Hypothesis Testing | 假设检验的逻辑

Hypothesis testing begins with a claim about a population parameter, such as a population mean μ or a population proportion p. Instead of proving the claim directly, we assume a sceptical position and look for strong evidence against it. We set up two competing hypotheses: the null hypothesis (H₀) represents the status quo or no effect, and the alternative hypothesis (H₁ or Hₐ) represents what we hope to establish. A test statistic is calculated from the sample, and its probability under H₀ (the p-value) is determined. If this probability is very small, we reject H₀ in favour of H₁.

假设检验从关于总体参数(如总体均值μ或总体比例p)的声明开始。我们并不直接证明该声明,而是采取怀疑立场,寻找反对它的强有力证据。我们设定两个对立的假设:零假设(H₀)代表现状或无效应,备择假设(H₁或Hₐ)代表我们希望证实的观点。从样本中计算一个检验统计量,并确定它在H₀下出现的概率(p值)。如果这个概率非常小,我们就拒绝H₀,支持H₁。


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

rence, or no association. It always contains an equality sign, such as μ = 50, p = 0.3, or 'the variables are independent' ht test H₀: μ = 200 against H₁: μ < 200 to see if the true mean is significantly lower.

零假设H₀是关于无变化、无差异或无关联的陈述。它总是包含等号,例如μ = 50、p = 0.3或“变量相互独立”。备择假设H₁与H₀相矛盾,可以是单侧的(如μ > 50, p < 0.3)或双侧的(μ ≠ 50)。选择正确的H₁形式取决于研究问题。例如,如果某制造商声称电池平均寿命至少为200小时,我们可能检验H₀: μ = 200,备择假设为H₁: μ < 200,以考察真实均值是否显著更低。


3. Significance Level and Critical Region | 显著性水平与拒绝域

called critical values. For a one-tailed test at α = 0.05 with a normal distribution, the critical z-value might be 1.645. If the test statistic falls beyond this value, we reject H₀. The choice of α reflects how much risk of a Type I error we are willing to accept.

显著性水平,记为α(阿尔法),是当H₀实际为真时拒绝它的概率阈值。α的常用值为0.05、0.01或0.10。拒绝域(或称否定域)由所有导致拒绝H₀的检验统计量取值构成。其边界称为临界值。对于正态分布下α = 0.05的单尾检验,临界z值可能是1.645。如果检验统计量落在这个值以外,我们就拒绝H₀。α的选择反映了我们愿意承担的犯第一类错误的风险大小。


4. Test Statistic and p-value | 检验统计量与p值

ue (≤ α) indicates that such an extreme result would be unlikely if H₀ were true, providing evidence against H₀. In IB AI, you will often use your GDC to find p-values directly, which simplifies the decision: if p < α, reject H₀; if p ≥ α, do not reject H₀.

检验统计量概括了样本估计值偏离零假设值的程度,并用标准误进行了缩放。常见的检验统计量包括z、t和χ²。p值是在H₀为真的条件下,获得一个至少与观测值同样极端的检验统计量的概率。一个很小的p值(≤ α)表明,如果H₀为真,如此极端的结果不大可能出现,从而提供了反对H₀的证据。在IB AI中,你经常会使用图形计算器直接求p值,这简化了决策:若p < α,拒绝H₀;若p ≥ α,则不拒绝H₀。


5. Type I and Type II Errors | 第一类错误与第二类错误

A Type I error occurs when H₀ is true but we incorrectly reject it. The probability of a Type I error is exactly α, the significance level. A Type II error occurs when H₀ is false but we fail to reject it; its probability is denoted by β. The power of a test is 1 − β, the probability of correctly rejecting a false H₀. There is a trade-off: decreasing α (e.g. from 0.05 to 0.01) reduces the chance of a Type I error but increases the chance of a Type II error, unless the sample size is increased. Understanding these errors is crucial for interpreting test results in real-world contexts.

第一类错误发生在H₀为真却被错误拒绝的情形。犯第一类错误的概率恰好是显著性水平α。第二类错误发生在H₀为假却未能拒绝它的情形;其概率记为β。检验的功效为1 − β,即正确拒绝一个错误H₀的概率。这里存在一个权衡:减小α(例如从0.05降至0.01)会降低第一类错误的风险,但会增加第二类错误的风险,除非增大样本容量。理解这些错误对在真实情境中解释检验结果至关重要。


6. One-tailed vs Two-tailed Tests | 单尾检验与双尾检验

A one-tailed test is used when the alternative hypothesis specifies a direction (greater than or less than). Its critical region lies entirely in one tail of the sampling distribution. A two-tailed test is used when the alternative hypothesis is simply 'not equal to', and the critical region is split between both tails. For the same significance level α, a two-tailed test has a more stringent criterion to reject H₀ on a particular side, because the α is divided equally between the two tails. Always check the wording of the problem: words like 'higher', 'increased', or 'reduced' suggest a one-tailed test, while 'different' or 'changed' suggests a two-tailed test.

当备择假设指明了方向(大于或小于)时,使用单尾检验。其拒绝域完全位于抽样分布的某一尾部。当备择假设仅为“不等于”时,使用双尾检验,拒绝域分配在两个尾部。对于相同的显著性水平α,双尾检验在某一侧拒绝H₀的标准更为严格,因为α被平分到两个尾部。务必仔细审题:诸如“更高”、“增加”或“降低”等词语提示单尾检验,而“不同”或“改变”则提示双尾检验。


7. Binomial Hypothesis Test for a Proportion | 二项分布比例检验

istribution B(n, p₀) under H₀, you find the probability of obtaining a result as extreme as, or more extreme than, the observed X. For example, testing whether a coin is biased towards heads, with n = 20 tosses and 15 heads observed, H₀: p = 0.5, H₁: p > 0.5. The p-value = P(X ≥ 15) for X ~ B(20, 0.5). In IB AI, you typically use the GDC's binomial cumulative distribution function to compute this p-value.

当你从二项分布背景(固定试验次数n,每次成功概率p恒定)中抽样时,可以对总体比例进行精确二项检验。假设是关于参数p的。检验统计量为观测到的成功次数X。利用H₀下的二项分布B(n, p₀),求出获得与观测值X同样极端或更极端结果的概率。例如,检验一枚硬币是否偏向正面,投掷n = 20次,观测到15次正面,则H₀: p = 0.5,H₁: p > 0.5。p值 = P(X ≥ 15),其中X ~ B(20, 0.5)。在IB AI中,通常使用图形计算器的二项累积分布函数来计算此p值。


广告 / Sponsored

8. Hypothesis Test for a Population Mean (z-test) | 总体均值假设检验(z检验)

When the population standard deviation σ is known and the sample size is large (or the population is normal), a z-test can be used for a population mean μ. The test statistic is:

z = (x̄ − μ₀) / (σ/√n)

Here x̄ d from the standard normal distribution. In the IB AI course, σ is often given, or you are instructed to assume it is known. A typical example: a light bulb manufacturer claims the mean lifetime is 800 hours. A sample of 50 bulbs gives x̄ est at α = 0.05 whether the mean is less than claimed. The z-statistic is (780 − 800)/(40/√50) ≈ −3.54, yielding a very small p-value, leading to rejection of H₀.

当总体标准差σ已知且样本量较大(或总体服从正态分布)时,可使用z检验来检验总体均值μ。检验统计量为:

z = (x̄ − μ₀) / (σ/√n)

这里x̄是样本均值,μ₀是H₀下的假设均值,σ是总体标准差,n是样本量。然后从标准正态分布中获取p值。在IB AI课程中,σ通常给出,或假定为你已知。一个典型例子:某灯泡制造商声称平均寿命为800小时。50个灯泡的样本显示x̄ = 780小时,σ = 40小时。在α = 0.05下检验均值是否低于声称值。z统计量为(780 − 800)/(40/√50) ≈ −3.54,产生极小的p值,因此拒绝H₀。


9. t-Tests for Means | 均值的t检验

distribution with (n − 1) degrees of freedom. The formula is similar to the z-test: t = (x̄ − μ₀) / (s/√n gt; μ₂, or μ₁ < μ₂. Depending on whether the two population variances are assumed equal, the GDC offers pooled or unpooled options. You can rely on the calculator's built-in functions to perform the test and obtain the p-value.

当总体标准差σ未知(这在实践中很常见)时,我们使用样本标准差s并应用t检验。检验统计量服从自由度为(n − 1)的t分布。公式与z检验类似:t = (x̄ − μ₀) / (s/√n)。对于比较两个独立样本均值的情形,则使用双样本t检验。IB AI教学大纲包括单样本和双样本t检验。双样本检验的假设为H₀: μ₁ = μ₂,备择则是H₁: μ₁ ≠ μ₂、μ₁ > μ₂或μ₁ < μ₂。根据是否假定两个总体方差相等,图形计算器提供合并或未合并的选项。你可以依赖计算器内置功能进行检验并获取p值。


10. Chi-Squared Goodness-of-Fit Test | 卡方拟合优度检验

The χ² goodness-of-fit test is used to determine whether a categorical sample data set fits a specified theoretical distribution. The null hypothesis states that the observed frequencies follow the expected distribution, while the alternative states they do not. The test statistic is calculated as:

χ² = Σ (O − E)² / E

where O is the observed frequency and E is the expected frequency in each category. The degrees of freedom are (number of categories − 1). A high χ² value suggests a poor fit. For instance, testing whether a die is fair: roll it 60 times, record the frequencies of each face. Expected frequencies are 10 each. The χ² statistic is computed and compared with the critical value from the χ² distribution, or the p-value is found. Always verify that all expected frequencies are at least 5; if not, combine categories.

χ²拟合优度检验用于判断一个分类样本数据集是否符合某个指定的理论分布。零假设称观测频数服从期望分布,备择假设则宣称不是。检验统计量按如下公式计算:

χ² = Σ (O − E)² / E

其中O为每个类别的观测频数,E为期望频数。自由度为(类别数 − 1)。较高的χ²值表示拟合度较差。例如,检验一粒骰子是否均匀:投掷60次,记录各个面的频数。期望频数均为10。计算χ²统计量,并与χ²分布的临界值比较,或求出p值。务必验证所有期望频数均不小于5;否则需合并类别。


11. Chi-Squared Test for Independence | 卡方独立性检验

he χ² statistic is again Σ (O − E)² / E. The degrees of freedom are (number of rows − 1) × (number of columns − 1). A significant result suggests an association, but not causation. For example, a survey of students' est from a matrix of observed frequencies. Remember to check the condition that at most 20% of expected frequencies are below 5, and none are below 1.

此检验考察两个分类变量是否有关联。数据整理在列联表中。H₀称两个变量相互独立;H₁称它们不独立。每个单元格的期望频数计算为(行合计 × 列合计)/ 总计。χ²统计量同样为Σ (O − E)² / E。自由度为(行数 − 1)×(列数 − 1)。显著的结果提示存在关联,但不能说明因果关系。例如,调查学生最喜欢的音乐类型与年级组别,可检验偏好是否与年级独立。IB AI题目通常要求使用计算器从观测频数矩阵执行检验。记住检查条件:期望频数有最多20%低于5,且没有低于1的。


12. Writing Conclusions and Interpreting Results | 撰写结论与解读结果

sting must be stated in the context of the problem. If you reject H₀, you claim that there is sufficient evidence to support the alternative hypothesis. If you do not reject H₀, you conclude that there is insufficient evidence to support H₁—you never "accept" it. Always include the p-value, significance level, and the sample statistic. For example: " e null hypothesis. There is sufficient evidence to suggest that the mean concentration of the chemical is greater than 50 ppm." ors and the limitations of the test, especially regarding sample size and assumptions. Remember, statistical significance does not always imply practical importance.

假设检验中的恰当结论必须结合问题情境来陈述。如果拒绝H₀,你宣称有充分证据支持备择假设。如果不拒绝H₀,你得出结论:没有足够证据支持H₁——你永远不要“接受”H₀,而只是未能拒绝它。结论中务必包含p值、显著性水平和样本统计量。例如:“由于p = 0.012 < 0.05,我们拒绝零假设。有充分证据表明该化学物质平均浓度大于50 ppm。”还要评论潜在的错误以及检验的局限性,尤其是样本量和假设方面。记住,统计显著性并不总是意味着现实重要性。


Published by TutorHao | Mathematics Revision Series | aleveler.com

广告 / Sponsored
IBDP国际文凭计算机科学学生用书 高级及标准水平 Computer Science for the IB Diplo…
计算机 备考教辅 · 正版现货 · 与本文内容相关
查看详情 / View on Taobao参考价 ¥524.0

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

备考资讯每日更新,关注不错过
考纲变化 · 科目分析 · 学习方法
扫码关注公众号 tutorhao
在微信里长按二维码识别关注
或截图后用「扫一扫 → 相册」选择本图
公众号:tutorhao