📚 IB Mathematics: Hypothesis Testing for Population Mean with Unknown Variance (t-Statistic) | IB数学:方差未知时总体均值的假设检验(统计量)
In IB Mathematics Analysis & Approaches HL, hypothesis testing for a population mean commonly begins with the z-test, which assumes the population standard deviation σ is known. In real-world research, however, σ is almost never known — we only have a sample standard deviation s. When this happens, the sampling distribution of the test statistic follows Student’s t-distribution rather than the normal distribution, and the test is called a one-sample t-test.
在IB数学分析与方法(AA)HL课程中,总体均值的假设检验通常从z检验开始,其前提是总体标准差σ已知。然而在真实研究中,σ几乎总是未知的,我们只有样本标准差s。在这种情况下,检验统计量的抽样分布遵循学生t分布而非正态分布,相应的检验称为单样本t检验。
1. Why the t-Distribution? | 为什么使用t分布?
When σ is unknown, we replace it with the sample standard deviation s. This substitution introduces extra randomness, because s itself varies from sample to sample. As a result, the standardized quantity (x̄ – μ₀) / (s/√n) is more spread out than a standard normal variable. Student’s t-distribution captures this extra uncertainty through an additional parameter called the degrees of freedom, df = n – 1.
当σ未知时,我们用样本标准差s代替它。这一替换引入了额外的随机性,因为s本身会随样本不同而变化。因此,标准化量 (x̄ – μ₀)/(s/√n) 比标准正态变量更为分散。学生t分布通过一个额外参数——自由度 df = n – 1 来刻画这种额外的不确定性。
As the sample size grows, s becomes a more accurate estimate of σ, and the t-distribution approaches the standard normal distribution. In practice, when n is large (say n ≥ 30), the difference between the two is negligible; but for small samples, using the normal distribution can seriously distort the results.
随着样本量增大,s对σ的估计越来越准确,t分布逐渐趋近标准正态分布。实践中当n较大(如n ≥ 30)时,两者差异可忽略不计;但对于小样本,使用正态分布会严重扭曲检验结果。
2. The t-Statistic and Degrees of Freedom | t统计量与自由度
The test statistic for a one-sample t-test is constructed in the same form as the z-statistic, but with the sample standard deviation s replacing σ:
单样本t检验的统计量与z统计量形式相同,只是用样本标准差s代替σ:
t = (x̄ – μ₀) / (s/√n), with df = n – 1
Here, x̄ is the sample mean, μ₀ is the claimed population mean under the null hypothesis, s is the sample standard deviation (using n – 1 in the denominator), and n is the sample size. The degrees of freedom equal n – 1, which precisely matches the number of independent pieces of information used to estimate s.
其中x̄为样本均值,μ₀为零假设下声称的总体均值,s为样本标准差(分母使用n – 1),n为样本容量。自由度等于n – 1,这恰好与估计s时使用的独立信息数量一致。
The t-distribution is symmetric about zero and bell-shaped, but with heavier tails than the normal distribution. This means critical values are larger in magnitude, making it harder to reject the null hypothesis when the sample is small — a more conservative and honest approach.
t分布关于零对称且呈钟形,但尾部比正态分布更厚。这意味着临界值的绝对值更大,在小样本时更难拒绝零假设——这是一种更保守、更可靠的做法。
3. Setting Up Hypotheses | 建立假设
As with any hypothesis test, we begin by stating the null hypothesis H₀ and the alternative hypothesis H₁. For a test about a population mean μ, the null hypothesis always takes the form:
与任何假设检验一样,我们首先写出零假设H₀和备择假设H₁。对于总体均值μ的检验,零假设始终采取如下形式:
H₀: μ = μ₀
The alternative hypothesis depends on the research question. A two-tailed test uses H₁: μ ≠ μ₀, which checks whether the mean differs from μ₀ in either direction. A one-tailed test uses either H₁: μ > μ₀ (upper-tailed) or H₁: μ < μ₀ (lower-tailed), depending on whether we expect the mean to be larger or smaller than the claimed value.
备择假设取决于研究问题。双尾检验使用H₁: μ ≠ μ₀,检验均值是否在任一方向上偏离μ₀。单尾检验则使用H₁: μ > μ₀(上尾)或H₁: μ < μ₀(下尾),取决于我们预期均值比声称值更大还是更小。
A common IB mistake is deciding the direction of H₁ after seeing the sample data. The alternative hypothesis must be set before collecting data, based on the context of the problem — never because the sample mean happens to be above or below μ₀.
IB考试中常见的错误是看到样本数据后才决定H₁的方向。备择假设必须在收集数据之前根据问题情境确定——绝不能因为样本均值恰好高于或低于μ₀而事后选择方向。
4. Significance Level and Critical Region | 显著性水平与拒绝域
The significance level α represents the probability of committing a Type I error — rejecting H₀ when it is actually true. Common choices in IB problems are α = 0.10, 0.05, and 0.01. The critical region is the set of values of the test statistic that lead to rejection of H₀, and its boundaries are called critical values, denoted t*.
显著性水平α代表犯第一类错误的概率——即当H₀实际为真时却拒绝了它。IB题目中常见的选择是α = 0.10、0.05和0.01。拒绝域是使检验统计量落入其中从而拒绝H₀的取值集合,其边界称为临界值,记作t*。
Critical values are found from the t-distribution table using the appropriate degrees of freedom and the tail probability. For a one-tailed test, look up the column for α; for a two-tailed test, look up the column for α/2, because the total probability α is split equally between the two tails.
临界值根据相应的自由度和尾部概率从t分布表中查得。对于单尾检验,查α对应的列;对于双尾检验,查α/2对应的列,因为总概率α被平均分到两个尾部。
One-tailed: P(t > t*) = α | Two-tailed: P(t > t*) = α/2
The following table gives selected critical values for reference (one-tailed tests):
下表给出部分临界值供参考(单尾检验):
| df | α = 0.10 | α = 0.05 | α = 0.01 |
|---|---|---|---|
| 5 | 1.476 | 2.015 | 3.365 |
| 9 | 1.383 | 1.833 | 2.821 |
| 15 | 1.341 | 1.753 | 2.602 |
| 20 | 1.325 | 1.725 | 2.528 |
5. One-Tailed vs Two-Tailed Tests | 单尾检验与双尾检验
The choice between one-tailed and two-tailed tests changes both the critical values and the interpretation. Consider a t-test with df = 15 at α = 0.05. For a one-tailed test, the critical value is t* = 1.753, and we reject H₀ if t > 1.753. For a two-tailed test, the critical values are ±t* = ±2.131, and we reject H₀ if t > 2.131 or t < -2.131.
单尾与双尾检验的选择既改变临界值,也影响解释。考虑df = 15、α = 0.05的t检验。对单尾检验,临界值为t* = 1.753,当t > 1.753时拒绝H₀。对双尾检验,临界值为±t* = ±2.131,当t > 2.131或t < -2.131时拒绝H₀。
For the same df and α, the two-tailed test has a larger critical value in magnitude. Intuitively, a two-tailed test must guard against errors on both sides, so each tail receives only α/2 of probability, pushing the boundary further out. If a problem states “test whether the mean has changed” or “differs from”, it is two-tailed; if it says “greater than” or “less than”, it is one-tailed.
在相同自由度和α下,双尾检验的临界值绝对值更大。直观地说,双尾检验必须同时防范两侧的错误,因此每个尾部只分配到α/2的概率,将边界推向更远处。若题目表述为”检验均值是否改变”或”是否不同于”,则为双尾;若表述为”大于”或”小于”,则为单尾。
6. Worked Example 1: One-Tailed Test | 例题1:单尾检验
A manufacturer claims that its light bulbs last on average 1000 hours. A quality inspector suspects the true mean is lower. A random sample of 16 bulbs is tested, giving x̄ = 980 hours and s = 40 hours. Test at the 5% significance level whether the inspector is justified.
某制造商声称其灯泡平均寿命为1000小时。质量检验员怀疑真实均值更低。随机抽取16个灯泡进行测试,得到x̄ = 980小时,s = 40小时。在5%显著性水平下检验检验员的怀疑是否成立。
Step 1 — Hypotheses: The inspector suspects the mean is lower, so H₀: μ = 1000 and H₁: μ < 1000. This is a lower-tailed test.
第一步——假设:检验员怀疑均值更低,因此H₀: μ = 1000,H₁: μ < 1000。这是下尾检验。
Step 2 — Test statistic: With n = 16, df = 15. Compute:
第二步——检验统计量:n = 16,df = 15。计算:
t = (980 – 1000) / (40/√16) = -20 / 10 = -2.00
Step 3 — Critical value: From the t-table with df = 15 and α = 0.05 (one-tailed), the critical value is t* = -1.753. The critical region is t < -1.753.
第三步——临界值:查t分布表,df = 15,α = 0.05(单尾),临界值为t* = -1.753。拒绝域为t < -1.753。
Step 4 — Decision: Since t = -2.00 < -1.753, the test statistic falls within the critical region. We reject H₀ at the 5% significance level. There is sufficient evidence to support the inspector's claim that the mean lifetime is less than 1000 hours.
第四步——结论:由于t = -2.00 < -1.753,检验统计量落入拒绝域。在5%显著性水平下拒绝H₀。有充分证据支持检验员关于平均寿命低于1000小时的怀疑。
7. Worked Example 2: Two-Tailed Test | 例题2:双尾检验
A school claims that its students’ mean score on a national exam is 50. An external auditor records the scores of 10 randomly selected students and obtains x̄ = 54 and s = 6. Test at the 10% significance level whether the school’s claim is credible.
某学校声称其学生在全国考试中的平均分为50。外部审计员记录了随机抽取的10名学生的成绩,得到x̄ = 54,s = 6。在10%显著性水平下检验该校的说法是否可信。
Step 1 — Hypotheses: The auditor wants to check whether the mean differs from 50 in either direction: H₀: μ = 50 and H₁: μ ≠ 50. This is a two-tailed test.
第一步——假设:审计员要检验均值是否在任一方向上偏离50:H₀: μ = 50,H₁: μ ≠ 50。这是双尾检验。
Step 2 — Test statistic: With n = 10, df = 9. Compute:
第二步——检验统计量:n = 10,df = 9。计算:
t = (54 – 50) / (6/√10) = 4 / 1.8974 ≈ 2.108
Step 3 — Critical values: For a two-tailed test at α = 0.10, each tail has probability 0.05. From the t-table with df = 9, the critical values are t* = ±1.833. The critical region is t > 1.833 or t < -1.833.
第三步——临界值:对α = 0.10的双尾检验,每个尾部概率为0.05。查t分布表,df = 9,临界值为t* = ±1.833。拒绝域为t > 1.833或t < -1.833。
Step 4 — Decision: Since t ≈ 2.108 > 1.833, the test statistic falls in the critical region. We reject H₀ at the 10% significance level. The evidence suggests the students’ mean score is significantly different from 50.
第四步——结论:由于t ≈ 2.108 > 1.833,检验统计量落入拒绝域。在10%显著性水平下拒绝H₀。证据表明学生平均分与50存在显著差异。
8. The p-Value Approach | p值方法
Instead of comparing the test statistic with the critical value, we can compute the p-value: the probability of obtaining a test statistic as extreme as, or more extreme than, the observed value, assuming H₀ is true. For a lower-tailed test, p = P(tₙ₋₁ < t_obs); for an upper-tailed test, p = P(tₙ₋₁ > t_obs); for a two-tailed test, p = 2 × P(tₙ₋₁ > |t_obs|).
除比较统计量与临界值外,还可以计算p值:在假设H₀为真的前提下,得到与观测值一样极端或更极端检验统计量的概率。对下尾检验,p = P(tₙ₋₁ < t_obs);对上尾检验,p = P(tₙ₋₁ > t_obs);对双尾检验,p = 2 × P(tₙ₋₁ > |t_obs|)。
The decision rule is simple: if p < α, reject H₀; if p ≥ α, do not reject H₀. In IB exams, the GDC (graphical display calculator) can compute the p-value directly using the t-distribution or the built-in t-test function. Always write down both the p-value and the comparison with α, then state the conclusion in context.
决策规则很简单:若p < α,拒绝H₀;若p ≥ α,不拒绝H₀。在IB考试中,图形计算器(GDC)可以直接使用t分布或内置的t检验功能计算p值。务必写出p值及其与α的比较,然后在情境中给出结论。
In Example 1, the p-value for t = -2.00 with df = 15 is approximately 0.032. Since 0.032 < 0.05, we reject H₀ — the same conclusion as the critical value method. The p-value method is especially useful because it gives the strength of evidence, not just a binary decision.
在例题1中,t = -2.00、df = 15的p值约为0.032。由于0.032 < 0.05,拒绝H₀——与临界值法结论一致。p值法尤其有用,因为它给出了证据的强度,而不仅仅是二值决策。
9. Assumptions and Conditions | 假设条件与适用前提
A one-sample t-test is valid only if certain conditions are met. First, the sample must be a simple random sample from the population, ensuring independence. Second, the population should be approximately normally distributed, or the sample size should be large enough (n ≥ 30) for the Central Limit Theorem to justify the t-approximation.
单样本t检验只有在满足一定条件时才有效。首先,样本必须是来自总体的简单随机样本,以保证独立性。其次,总体应近似服从正态分布,或者样本量足够大(n ≥ 30),使中心极限定理能够支持t近似。
Third, the sample standard deviation s must be computed with n – 1 in the denominator (the unbiased estimator of σ). If s was incorrectly calculated with n in the denominator, the test statistic would be too small and the test would be biased. Outliers can also seriously affect both x̄ and s, so it is wise to plot the data when possible.
第三,样本标准差s必须以n – 1为分母计算(σ的无偏估计量)。若s错误地用n作分母计算,检验统计量会偏小,检验将产生偏差。异常值也会严重影响x̄和s,因此尽可能时应对数据作图检查。
If the population is clearly skewed and the sample is small, the t-test is not reliable. In such cases, a non-parametric method such as the sign test or Wilcoxon test would be more appropriate — though these are beyond the standard IB HL syllabus.
如果总体明显偏斜且样本量较小,t检验并不可靠。此时非参数方法如符号检验或Wilcoxon检验更为合适——不过这些超出了IB HL标准大纲的范围。
10. Common Mistakes and IB Exam Tips | 常见错误与IB考试技巧
A frequent error is using the z-test when σ is unknown. Unless the problem explicitly states that σ is known, the t-test is required. Another common mistake is using the wrong degrees of freedom, such as df = n instead of df = n – 1. In a two-tailed test, students often look up α instead of α/2 in the t-table, which leads to incorrect critical values.
常见错误之一是在σ未知时使用z检验。除非题目明确说明σ已知,否则应使用t检验。另一个常见错误是使用错误的自由度,例如用df = n而不用df = n – 1。在双尾检验中,学生常查α而非α/2对应的t表列,导致临界值错误。
In IB exams, show every step clearly: state H₀ and H₁, write down the formula for t, substitute the values, give the t-statistic rounded to 3 significant figures, and clearly state the comparison (either with the critical value or p-value). The conclusion should be written in the context of the problem — “there is sufficient evidence that…” — not just “reject H₀”.
在IB考试中,清晰展示每一步:写出H₀和H₁,写下t的公式,代入数值,给出保留3位有效数字的t统计量,并明确写出比较过程(与临界值或p值比较)。结论应结合问题情境——”有充分证据表明……”——而不仅仅是”拒绝H₀”。
Finally, remember the difference between statistical significance and practical significance. A very large sample can produce a statistically significant result even when the difference from μ₀ is tiny. Always interpret the magnitude of the difference in the context of the real-world question.
最后,注意统计显著性与实际显著性的区别。非常大的样本即使在均值与μ₀的差异很小时也能产生统计显著的结果。务必结合实际问题诠释差异的大小。
11. Summary: t-Test vs z-Test | 总结:t检验与z检验对比
The table below summarises when to use each test and the key formulas:
下表总结了两种检验的适用条件与核心公式:
| Condition | 条件 | z-Test | z检验 | t-Test | t检验 |
|---|---|---|
| Population variance σ² | 总体方差σ² | Known | 已知 | Unknown | 未知 |
| Used standard deviation | 使用的标准差 | σ (population) | 总体σ | s (sample) | 样本s |
| Test statistic | 检验统计量 | z = (x̄ – μ₀)/(σ/√n) | t = (x̄ – μ₀)/(s/√n) |
| Distribution | 分布 | Normal N(0,1) | t with df = n – 1 |
| Typical sample size | 典型样本量 | n ≥ 30 (or normal data) | Small n, normal data | 小样本、正态数据 |
In summary, when the population variance is unknown — which is the case in almost every real application — the t-test is the correct tool. Master the formula, the degrees of freedom, and the logic of critical regions, and you will handle any IB hypothesis-testing question with confidence.
总之,当总体方差未知时——这几乎是所有实际问题中的情形——t检验才是正确的工具。掌握公式、自由度和拒绝域的逻辑,你就能自信地应对任何IB假设检验题目。
Published by TutorHao | IB Mathematics Revision Series | aleveler.com
更多咨询请联系16621398022(同微信)
屏轩国际教育cambridge primary/secondary checkpoint, cat4, ukiset,ukcat,igcse,alevel,PAT,STEP,MAT, ibdp,ap,ssat,sat,sat2课程辅导,国外大学本科硕士研究生博士课程论文辅导