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

15B t-tests | t检验

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

📚 15B t-tests | t检验

Welcome to the IB Mathematics exploration of t-tests, a fundamental set of tools in inferential statistics. This topic, often labelled as 15B in the syllabus, provides the methods needed to test hypotheses about population means when the population standard deviation is unknown and must be estimated from sample data. Understanding t-tests enables you to draw meaningful conclusions from small samples, assess the significance of experimental results, and build the foundation for more advanced statistical reasoning.

欢迎学习 IB 数学中关于 t 检验的内容,这是推断统计中一套基础而重要的工具。本主题通常在教学大纲中标为 15B,提供了在总体标准差未知且必须由样本数据估计时,检验总体均值假设的方法。理解 t 检验能让你从小样本中得出有意义的结论,评估实验结果的显著性,并为更高级的统计推理打下基础。

1. Introduction to Hypothesis Testing | 假设检验简介

ternative hypothesis (H₁). The null hypothesis represents the status quo or a statement of 'no effect' ₁: μ ≠ μ₀ for a two-tailed test, or H₁: μ > μ₀ for a right-tailed test. The decision is based on a test statistic calculated from the sample data.

在深入 t 检验之前,我们必须回顾假设检验的结构。每一个检验都始于一个原假设(H₀)和一个备择假设(H₁)。原假设代表现状或“无效应”的陈述,而备择假设陈述了我们希望证明的内容。在 t 检验的语境中,这些假设通常涉及总体均值 μ。对于单样本检验,我们可能设定 H₀: μ = μ₀ 对 H₁: μ ≠ μ₀(双尾检验),或 H₁: μ > μ₀(右尾检验)。决策基于从样本数据计算出的检验统计量。

The hypothesis testing framework also requires us to choose a significance level α (often 5% or 1%), which determines the rejection region. If the probability of observing our sample statistic under H₀ is less than α, we reject the null hypothesis. This probability is the p-value. When the population standard deviation σ is unknown, the z-test is no longer appropriate, and the t-test becomes the correct tool.

假设检验框架还要求我们选择一个显著性水平 α(通常为 5% 或 1%),它决定了拒绝域。如果在 H₀ 下观察到样本统计量的概率小于 α,我们就拒绝原假设。这个概率就是 p 值。当总体标准差 σ 未知时,z 检验不再适用,t 检验就成为正确的工具。


2. The t-distribution | t分布

stribution but with heavier tails. It was introduced by William Gosset under the pseudonym 'Student' ze. As the degrees of freedom increase, the t-distribution approaches the standard normal distribution N(0,1).

t 分布是一族对称的钟形分布,形状类似于标准正态分布,但尾部更厚。它由威廉·戈塞特以笔名“学生”引入。t 分布的具体形状取决于一个称为自由度(df)的参数。对于单样本 t 检验,df = n − 1,其中 n 是样本量。随着自由度的增加,t 分布趋近于标准正态分布 N(0,1)。

Why do we need a different distribution? When σ is unknown, we use the sample standard deviation s, which introduces extra uncertainty. This additional variability is accounted for by the thicker tails of the t-distribution. Consequently, critical values for a t-test (t-critical) are larger in magnitude than the corresponding z-critical values for the same confidence level, making it harder to reject H₀ and thus guarding against false positives with small samples.

为什么我们需要不同的分布?当 σ 未知时,我们使用样本标准差 s,这引入了额外的不确定性。这种额外的变异性由 t 分布较厚的尾部所补偿。因此,对于相同的置信水平,t 检验的临界值(t 临界值)比相应的 z 临界值绝对值更大,使得拒绝 H₀ 更难,从而在小样本下防止假阳性。


3. One-sample t-test | 单样本t检验

The one-sample t-test is used to determine whether a sample mean x̄ differs significantly from a hypothesised population mean μ₀. The test statistic is given by:

t = (x̄ − μ₀) / (s / √n)

Here, x̄ is the sample mean, s is the sample standard deviation, and n is the sample size. This t-value measures how many standard errors the sample mean is away from μ₀. Under the null hypothesis, this statistic follows a t-distribution with n − 1 degrees of freedom.

单样本 t 检验用于判断样本均值 x̄ 是否与假设的总体均值 μ₀ 有显著差异。检验统计量为:

t = (x̄ − μ₀) / (s / √n)

其中,x̄ 是样本均值,s 是样本标准差,n 是样本量。这个 t 值衡量了样本均值距离 μ₀ 有多少个标准误。在原假设下,该统计量服从自由度为 n − 1 的 t 分布。

cereal company claims their boxes contain 500 g on average. You sample 20 boxes and find x̄ t if the true mean is different from 500 g at α = 0.05, you compute t = (492 − 500) / (15/√20 this t-value with the critical values from t-distribution with 19 df, or find the p-value.

例如,假设一家麦片公司声称其盒装产品平均重量为 500 g。你抽样了 20 盒,得到 x̄ = 492 g,s = 15 g。要检验真实均值是否与 500 g 不同(α = 0.05),计算 t = (492 − 500) / (15/√20) ≈ −2.385。然后将该 t 值与自由度为 19 的 t 分布临界值比较,或求出 p 值。


4. Degrees of Freedom and the t-table | 自由度与t值表

eedom to estimate the sample mean when calculating the sample standard deviation. When using a t-table, you look up the row corresponding to your df and the column for your significance level (one-tailed or two-tailed). If the absolute value of your calculated t exceeds the critical value, you reject H₀.

自由度(df)反映了样本中独立信息的数量。对于单样本 t 检验,df = n − 1,因为我们在计算样本标准差时使用了一个自由度来估计样本均值。使用 t 值表时,你查找对应自由度的行以及对应显著性水平(单尾或双尾)的列。如果计算出的 t 绝对值大于临界值,则拒绝 H₀。

or a two-tailed test with α = 0.05, the p-value is the probability in both tails combined.

现代计算器和软件通常直接给出 p 值。p 值是在 H₀ 为真时,获得至少与观测值同样极端的 t 统计量的概率。p 值越小,反对 H₀ 的证据越强。若 p < α,则拒绝 H₀。记住,对于双尾检验且 α = 0.05,p 值是两尾概率之和。


5. Two-sample t-test (Independent Samples) | 双样本t检验(独立样本)

he alternative can be two-tailed (≠) or one-tailed (> or <). The test statistic has a slightly more complex form due to combining information from two samples. The general formula for equal variances assumed (pooled t-test) is:

t = (x̄₁ − x̄₂) / (sₚ × √1/n₁ + 1/n₂)

where sₚ is the pooled standard deviation, calculated as:

sₚ = √[ ((n₁−1)s₁² + (n₂−1)s₂²) / (n₁ + n₂ − 2) ]

当比较两个独立组的均值时,应使用双样本 t 检验。原假设通常是 H₀: μ₁ = μ₂(或 μ₁ − μ₂ = 0)。备择假设可以是双尾(≠)或单尾(> 或 <)。由于结合了两个样本的信息,检验统计量的形式稍复杂。假设方差相等的合并 t 检验公式为:

t = (x̄₁ − x̄₂) / (sₚ × √1/n₁ + 1/n₂)

其中 sₚ 为合并标准差,计算如下:

sₚ = √[ ((n₁−1)s₁² + (n₂−1)s₂²) / (n₁ + n₂ − 2) ]

An alternative version exists for unequal variances (Welch's t-test), where degrees of freedom are calculated using a more complicated formula that often results in a non-integer value. IB typically focuses on the pooled version when we can assume homogeneity of variance, but it is valuable to know that Welch's test is more robust when variances differ.

另一种版本针对不等方差(Welch t 检验),此时自由度用更复杂的公式计算,常得出非整数值。IB 课程通常侧重于当我们能假设方差齐性时的合并版本,但了解 Welch 检验在方差不相等时更加稳健是很有价值的。


6. Assumptions of the Two-sample t-test | 双样本t检验的假设

For the two-sample t-test to yield valid conclusions, certain conditions must be met. First, the samples must be independent – observations in one group should not influence the other. Second, the data in each group should be approximately normally distributed. This assumption becomes less critical with larger sample sizes due to the Central Limit Theorem. Third, the assumption of equal variances (homoscedasticity) is needed for the pooled version. You can check this informally by comparing sample standard deviations; if the ratio of larger s to smaller s exceeds 2, the assumption may be questionable.

为了使双样本 t 检验得出有效的结论,必须满足某些条件。第一,样本必须是独立的——一个组中的观测值不应影响另一个组。第二,每组的数据应近似服从正态分布。由于中心极限定理,样本量越大,这一假设就越不重要。第三,合并版本需要满足方差相等(方差齐性)的假设。你可以通过比较样本标准差来非正式地检验这一点;如果较大 s 与较小 s 之比超过 2,该假设可能存疑。

If these assumptions are severely violated, non-parametric alternatives like the Mann-Whitney U test may be considered. In IB exam problems, you are often told to assume the necessary conditions hold, but it is good practice to comment on them when interpreting results.

如果这些假设严重不满足,可以考虑非参数替代方法,如 Mann-Whitney U 检验。在 IB 考试题目中,通常会告知你可以假设必要条件成立,但在解释结果时对这些假设加以评论是一种良好习惯。


广告 / Sponsored

7. Paired t-test | 配对t检验

A paired t-test is used when the data consist of matched pairs – average difference. The test statistic reduces to a one-sample t-test on the differences:

t = d̄ / (sd / √n)

where d̄ is the mean of the differences, sd rd deviation of the differences, and n is the number of pairs. Degrees of freedom = n − 1.

配对 t 检验用于数据由匹配对组成的情况——例如,对同一受试者进行的前后测量,或双胞胎研究。在这种设计中,我们关心每对差值 dᵢ = xᵢ − yᵢ 的均值。原假设为 H₀: μ_d = 0,表示没有平均差异。检验统计量转化为对差值进行的单样本 t 检验:

t = d̄ / (sd / √n)

其中 d̄ 是差值的均值,sd 是差值的标准差,n 是对数。自由度 = n − 1。

The paired design is powerful because it removes variability between individuals, focusing only on the change. For example, testing whether a training programme improves test scores by comparing each student’s pre-test and post-test scores uses a paired t-test, not a two-sample test.

配对设计之所以有效,是因为它消除了个体之间的变异性,只关注变化本身。例如,通过比较每个学生的前测和后测成绩来检验培训项目是否提高分数,就应使用配对 t 检验,而不是双样本检验。


8. Confidence Intervals with t-distribution | 使用t分布的置信区间

In addition to hypothesis testing, t-procedures can construct confidence intervals for population means. A (1 − α)100% confidence interval for μ (when σ unknown) is given by:

x̄ ± t* × (s / √n)

where t* is the critical value from the t-distribution with n − 1 df such that the area between −t* and t* equals the desired confidence level. This interval captures the unknown population mean with the stated confidence in the long run.

除了假设检验,t 程序还可以构建总体均值的置信区间。当 σ 未知时,μ 的 (1 − α)100% 置信区间为:

x̄ ± t* × (s / √n)

其中 t* 是自由度为 n − 1 的 t 分布临界值,使得 −t* 到 t* 之间的面积等于所需的置信水平。从长期看,该区间以所述置信水平包含未知的总体均值。

oes not contain zero, we can reject the null hypothesis of equal means at the corresponding significance level.

置信区间提供了参数的可能取值范围。对于两个独立样本,均值差 (μ₁ − μ₂) 的置信区间使用合并标准误和自由度为 n₁ + n₂ − 2 的 t 临界值。如果该区间不包含零,我们就可以在相应的显著性水平上拒绝均值相等的原假设。


9. Interpreting Results: Statistical Significance vs. Practical Importance | 解读结果:统计显著性与实际重要性

A statistically significant result (p < α) simply indicates that the observed effect is unlikely to have occurred by random chance if H₀ were true. It does not automatically mean the effect is large or practically important. Very large sample sizes can detect tiny, trivial differences. Always consider the effect size alongside the p-value. For a one-sample t-test, a simple effect size measure is the observed difference (x̄ − μ₀) relative to the standard deviation. For two samples, Cohen's d provides a standardised effect size.

统计显著的结果(p < α)仅表明,如果 H₀ 为真,观察到的效应不太可能偶然发生。这并不自动意味着该效应很大或具有实际重要性。极大的样本量可以检测出微小而无实际意义的差异。在查看 p 值时,务必同时考虑效应量。对于单样本 t 检验,一个简单的效应量度量是观测差值 (x̄ − μ₀) 相对于标准差的大小。对于双样本,Cohen's d 提供了标准化的效应量。

Similarly, failing to reject H₀ does not prove H₀ true; it merely suggests insufficient evidence against it. This could be due to a small sample size or high variability. Good reports include confidence intervals to show the precision of the estimates.

同样,未能拒绝 H₀ 并不证明 H₀ 为真;它仅表明反对它的证据不足。这可能是由于样本量小或变异性高所致。良好的报告应包含置信区间,以显示估计的精度。


10. Common Mistakes and How to Avoid Them | 常见错误与如何避免


11. Calculator Skills for t-tests | t检验的计算器技巧

s, choose the correct test from the STAT TESTS menu, and interpret the output. For a one-sample t-test, you typically select 'T-Test' The calculator will give you the t-value and the p-value. For a two-sample t-test, choose '2-SampTTest' and select whether to pool variances (usually 'Yes' a, enter the differences into a list and run a one-sample T-Test on that list with μ₀ = 0.

IB 考试通常要求你使用图形计算器(如 TI-84、TI-Nspire)执行 t 检验。你应该能够将数据输入列表,从 STAT TESTS 菜单中选择正确的检验,并解读输出。对于单样本 t 检验,通常选择“T-Test”,输入 μ₀、包含数据的列表以及备择假设。计算器会给出 t 值和 p 值。对于双样本 t 检验,选择“2-SampTTest”并选择是否合并方差(如有指示,通常选“Yes”)。对于配对数据,将差值输入一个列表,并对该列表进行 μ₀ = 0 的单样本 t 检验。

Always double-check that you have correctly specified the alternative hypothesis. A common error is leaving the default two-tailed setting when a one-tailed test is required. Additionally, know how to find critical values using the 'invT' function, which gives the t-value for a given left-tail area and degrees of freedom.

务必仔细检查你是否正确指定了备择假设。一个常见错误是在需要单尾检验时,却保留了默认的双尾设置。此外,还应知道如何使用“invT”函数查找临界值,该函数给出给定左尾面积和自由度下的 t 值。


12. Worked Example: Two-sample t-test | 例题:双样本t检验

Scenario: A researcher compares the reaction times of two groups: Group A (n₁ = 15, x̄₁ = 250 ms, s₁ = 30 ms) and Group B (n₂ = 12, x̄ s, s₂ = 28 ms). Test at α = 0.05 if the population means differ, assuming equal variances.

场景: 一位研究者比较了两组的反应时间:A 组(n₁ = 15,x̄₁ = 250 ms,s₁ = 30 ms)和 B 组(n₂ = 12,x̄₂ = 275 ms,s₂ = 28 ms)。在 α = 0.05 下检验总体均值是否存在差异,假设方差相等。

Solution: State hypotheses: H₀: μ_A = μ_B, H₁: μ_A ≠ μ_B. Compute pooled standard deviation:

30² + 11×28²) / (15 + 12 − 2) ] = √[ (14×900 + 11×784) / 25 ] = √[ (12600 + 8624) / 25 ] = √21224/25 = √848.96 ≈ 29.14

Then the standard error: SE = sₚ × √1/15 + 1/12 = 29.14 × √0.0667 + 0.0833 = 29.14 × √0 215 < −2.060, we reject H₀. There is sufficient evidence that the population means differ.

解答: 陈述假设:H₀: μ_A = μ_B,H₁: μ_A ≠ μ_B。计算合并标准差:

30² + 11×28²) / (15 + 12 − 2) ] = √[ (14×900 + 11×784) / 25 ] = √[ (12600 + 8624) / 25 ] = √21224/25 = √848.96 ≈ 29.14

然后计算标准误:SE = sₚ × √1/15 + 1/12 = 29.14 × √0.0667 + 0.0833 = 29.14 × √0.15 ≈ 29.14 × 0.3873 ≈ 11.29。检验统计量:t = (250 − 275) / 11.29 ≈ −2.215。自由度 = 25。对于 α = 0.05 的双尾检验,临界值 t* ≈ ±2.060。由于 −2.215 < −2.060,我们拒绝 H₀。有充分证据表明总体均值不同。

be about 0.036 (from technology), which is less than 0.05, confirming the conclusion. A 95% 0 × 11.29 = (−48.24, −1.76), which does not include zero, consistent with the test result.

该双尾检验的 p 值约为 0.036(通过技术工具获得),小于 0.05,验证了结论。μ_A − μ_B 的 95% 置信区间为 (−25) ± 2.060 × 11.29 = (−48.24, −1.76),该区间不包含零,与检验结果一致。


Published by TutorHao | IB Mathematics Revision Series | aleveler.com

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

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

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