Hypothesis Testing for Population Mean with Unknown Variance | 方差未知时总体均值的假设检验

📚 Hypothesis Testing for Population Mean with Unknown Variance | 方差未知时总体均值的假设检验

When we want to draw conclusions about a population mean, the population variance is often unknown. In this situation we cannot use the standard normal (z) test, because the true sampling distribution of the mean involves the unknown σ. Instead we replace σ with the sample standard deviation s, and the resulting test statistic follows a Student’s t-distribution. This is the foundation of the one‑sample t‑test.

当我们希望对总体均值作出推断时,总体方差往往是未知的。此时不能直接使用标准正态(z)检验,因为均值的真实抽样分布涉及未知的 σ。我们需要用样本标准差 s 代替 σ,得到的检验统计量服从学生 t 分布。这就是单样本 t 检验的基础。


1. When to Use the t-Test | 何时使用 t 检验

The t‑test is the correct choice whenever the population variance is unknown. It is especially important for small samples, where using the normal distribution would lead to inaccurate p‑values. For large samples, the t-distribution approaches the normal distribution, but the t‑test remains valid and is preferred in IB statistics problems.

只要总体方差未知,t 检验就是正确的选择。在小样本情形下尤其重要,因为使用正态分布会产生不准确的 p 值。当样本量较大时,t 分布趋近于正态分布,但 t 检验仍然有效,也是 IB 统计题目中更推荐的检验方法。

In practice, the t‑test requires the sample data to come from a random sample. If the sample size is small (n < 30), the data should be approximately normally distributed. If n is large, the Central Limit Theorem ensures that the sampling distribution of the mean is approximately normal, making the t‑test robust to non‑normality.

实际应用中,t 检验要求样本来自随机抽样。如果样本量较小(n < 30),数据应近似服从正态分布。如果 n 较大,中心极限定理保证均值的抽样分布近似正态,因此 t 检验对非正态性具有较强的稳健性。


2. Hypotheses and Significance Level | 原假设、备择假设与显著性水平

We always begin by stating the null hypothesis. For a test about a population mean μ, the null hypothesis is H₀: μ = μ₀, where μ₀ is a specified numerical value. The alternative hypothesis can be one‑sided or two‑sided:

我们总是从写出原假设开始。对于总体均值 μ 的检验,原假设为 H₀: μ = μ₀,其中 μ₀ 是一个确定的数值。备择假设可以是单侧的或双侧的:

  • H₁: μ > μ₀ (right‑tailed test)

    H₁: μ > μ₀(右侧检验)

  • H₁: μ < μ₀ (left‑tailed test)

    H₁: μ < μ₀(左侧检验)

  • H₁: μ ≠ μ₀ (two‑tailed test)

    H₁: μ ≠ μ₀(双侧检验)

The significance level α is the probability of rejecting a true null hypothesis. Common choices are α = 0.05, 0.01 or 0.10. In IB examinations α is usually given, but if not, you may assume α = 0.05.

显著性水平 α 是拒绝真实原假设的概率。常见取值为 α = 0.05、0.01 或 0.10。在 IB 考试中通常会给出 α,若未给出,可默认取 α = 0.05。


3. The t-Statistic | t 统计量

When the population variance is unknown, the test statistic is calculated using the sample mean x̄, the sample standard deviation s, and the sample size n. Its formula is:

当总体方差未知时,检验统计量由样本均值 x̄、样本标准差 s 和样本容量 n 计算得到,公式为:

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

This statistic measures how many standard errors the sample mean lies from the hypothesised value μ₀. The denominator s/√n is called the standard error of the mean. Under H₀, this t-statistic follows a t-distribution with degrees of freedom df = n − 1.

该统计量衡量样本均值与假设值 μ₀ 之间相隔多少个标准误差。分母 s/√n 称为均值的标准误差。在原假设成立时,该 t 统计量服从自由度为 df = n − 1 的 t 分布。

As n increases, the t-distribution becomes closer to the standard normal distribution Z. For n > 30, the two distributions are nearly identical, but many statisticians still use the t‑distribution for exactness.

随着 n 增大,t 分布逐渐趋近于标准正态分布 Z。当 n > 30 时,二者几乎相同,但许多统计学家仍坚持使用 t 分布以保证精确性。


4. Conditions and Assumptions | 使用条件与假设

Before performing a one‑sample t‑test, you must verify that the following conditions are met:

在进行单样本 t 检验之前,必须确认以下条件是否满足:

  • The data are a simple random sample from the population.

    数据是来自总体的简单随机样本。

  • Observations are independent of each other.

    观测值之间相互独立。

  • The population distribution is approximately normal, especially for small n. A boxplot or a normal probability plot can be used to check this.

    总体分布近似正态,尤其当 n 较小时。可通过箱线图或正态概率图来检验。

  • There are no extreme outliers that can heavily influence the sample mean and standard deviation.

    没有会强烈影响样本均值和标准差的极端离群值。

If these conditions are seriously violated, the test results may be misleading. In later IB courses, you will learn other robust methods, but for the t‑test these assumptions are essential.

如果这些条件被严重违背,检验结果可能产生误导。在更高级的 IB 课程中,你会学到其他稳健方法,但对 t 检验而言,这些假设必不可少。


5. Steps for a Hypothesis Test | 假设检验的步骤

Performing a hypothesis test with the t‑distribution involves a consistent sequence of steps. In IB exams, showing all steps earns method marks.

使用 t 分布进行假设检验需要遵循一系列固定步骤。在 IB 考试中,写出完整步骤可获得方法分。

  • Step 1: Write down the null and alternative hypotheses.

    第一步:写出原假设和备择假设。

  • Step 2: Choose the significance level α.

    第二步:选择显著性水平 α。

  • Step 3: Calculate the sample mean x̄ and sample standard deviation s (if not provided). Then compute the t‑statistic using the formula.

    第三步:计算样本均值 x̄ 和样本标准差 s(如未给出),然后代入公式计算 t 统计量。

  • Step 4: Obtain the p‑value from the t‑distribution with df = n − 1, or find the critical value t* from the t‑table.

    第四步:从自由度为 df = n − 1 的 t 分布中获得 p 值,或从 t 分布表中查找临界值 t*。

  • Step 5: Decide whether to reject H₀. If p ≤ α, reject H₀; otherwise do not reject H₀.

    第五步:判断是否拒绝 H₀。若 p ≤ α,拒绝 H₀;否则不拒绝 H₀。

  • Step 6: Write a conclusion in the context of the original problem.

    第六步:结合实际问题背景写出结论。

Remember that “do not reject H₀” does not mean H₀ is true; it simply means there is insufficient evidence to prove H₁.

请注意,“不拒绝 H₀”并不意味着 H₀ 为真,仅表示没有足够证据支持 H₁。


6. Worked Example 1: One-Tailed Test | 例 1:单侧检验

A tea company claims that the mean caffeine content in its small bottle is 50 mg. A consumer group randomly selects 15 bottles and obtains a sample mean of 52 mg with a sample standard deviation of 8 mg. Test at the 5% significance level whether the mean caffeine content is greater than 50 mg.

某茶饮料公司声称小瓶装饮料的平均咖啡因含量为 50 mg。一个消费者组织随机抽取 15 瓶,得到样本均值为 52 mg,样本标准差为 8 mg。在 5% 显著性水平下检验平均咖啡因含量是否大于 50 mg。

The hypotheses are H₀: μ = 50 and H₁: μ > 50. Here n = 15, x̄ = 52, s = 8, and α = 0.05.

原假设为 H₀: μ = 50,备择假设为 H₁: μ > 50。已知 n = 15,x̄ = 52,s = 8,α = 0.05。

t = (52 − 50) / (8 / √15) = 2 / 2.0656 ≈ 0.968

The degrees of freedom are df = 14. Using a t‑table, the critical value for a one‑tailed test with α = 0.05 and df = 14 is t* = 1.761. Since 0.968 < 1.761, we do not reject H₀. The p‑value is about 0.174, which is larger than 0.05.

自由度为 df = 14。查 t 分布表可知,当 α = 0.05、df = 14 时,单侧检验的临界值为 t* = 1.761。因为 0.968 < 1.761,所以不拒绝 H₀。对应的 p 值约为 0.174,大于 0.05。

Conclusion: There is insufficient evidence to conclude that the mean caffeine content exceeds 50 mg.

结论:没有足够证据表明平均咖啡因含量超过 50 mg。


7. Worked Example 2: Two-Tailed Test from Raw Data | 例 2:基于原始数据的双侧检验

In a biology experiment, 12 seed plants produced the following number of seeds per plant: 45, 48, 52, 49, 50, 47, 53, 44, 51, 48, 50, 49. The textbook hypothesis states the average should be 50. Test at the 1% significance level whether the sample mean differs from 50.

在某生物实验中,12 株植物产生的种子数如下:45, 48, 52, 49, 50, 47, 53, 44, 51, 48, 50, 49。教科书给出的假设认为平均值为 50。在 1% 显著性水平下检验样本均值是否与 50 有显著差异。

First calculate the sample mean and sample standard deviation. The sample mean is x̄ = 48.833. The sample standard deviation is s ≈ 2.855.

首先计算样本均值和样本标准差。样本均值为 x̄ = 48.833。样本标准差为 s ≈ 2.855。

Hypotheses: H₀: μ = 50, H₁: μ ≠ 50. The t‑statistic is:

原假设:H₀: μ = 50,备择假设:H₁: μ ≠ 50。t 统计量为:

t = (48.833 − 50) / (2.855 / √12) ≈ −1.416

With df = 11 and α = 0.01 for a two‑tailed test, the critical values are ±3.106. Since −1.416 lies between −3.106 and 3.106, we cannot reject H₀. The p‑value is \(|t|=1.416\) with two tails, approximately 0.184, which is greater than 0.01.

在 df = 11、α = 0.01 的双侧检验中,临界值为 ±3.106。由于 −1.416 位于 −3.106 与 3.106 之间,因此不能拒绝 H₀。取绝对值后双尾 p 值约为 0.184,大于 0.01。

Conclusion: There is no significant evidence that the true mean number of seeds differs from 50.

结论:没有显著证据表明真实的种子平均数与 50 有差异。


8. Using a GDC for the t-Test | 使用图形计算器进行 t 检验

On IB examinations, calculators are permitted and often required. The GDC can perform the entire one‑sample t‑test quickly, but you still need to interpret the output correctly.

在 IB 考试中,允许且经常需要使用计算器。GDC 能快速完成整个单样本 t 检验,但你仍需要正确解读输出结果。

  • On a TI‑84: Press STAT, then TESTS, choose T‑Test. Select “Data” if the raw data are stored, or “Stats” if you know x̄, s and n. Enter μ₀, the sample information, the alternative direction (≠, <, >), and set the confidence level. The calculator outputs t and p.

    在 TI‑84 上:按 STAT 键,进入 TESTS,选择 T‑Test。若原始数据已存储则选 “Data”,若已知 x̄、s 和 n 则选 “Stats”。输入 μ₀、样本信息、备择方向(≠、<、>),设置置信水平。计算器会输出 t 和 p。

  • On a Casio fx‑CG50: Go to STATISTICS → TEST → t → One‑Sample. Choose list or parameter input. Enter the required values and press EXECUTE. Read the t and p values.

    在 Casio fx‑CG50 上:进入 STATISTICS → TEST → t → One‑Sample。选择列表或参数输入方式,输入所需数值后按 EXECUTE。读取 t 和 p 值。

Always check the sign of t and whether p is for a one‑tail or two‑tail test. Many calculators allow you to select the tail directly; otherwise, double‑tailed p may need to be doubled for one‑tailed tests (or halved, depending on your output).

务必检查 t 的符号以及 p 是单尾还是双尾。许多计算器可直接选择尾部类型;若没有,则可能需将双尾 p 值减半或加倍来得到单尾 p 值。


9. Common Mistakes and Tips | 常见错误与提示

Even strong students make avoidable errors in hypothesis tests. Here are the most common mistakes, and how to avoid them.

即使是优秀学生也会在假设检验中犯可避免的错误。以下是最常见的错误及避免方法。

  • Using a known σ and the z‑test when the question says “variance is unknown”. Always choose t‑test if σ is not given.

    当题目说明“方差未知”时仍使用 σ 已知的 z 检验。只要 σ 未给出,就应选择 t 检验。

  • Mixing up the sample standard deviation s and the standard error s/√n. The formula for t requires the standard error in the denominator.

    混淆样本标准差 s 和标准误差 s/√n。计算 t 时分母必须使用标准误差。

  • Using one‑tailed critical values for a two‑tailed test. For two‑tailed tests, allocate α/2 to each tail.

    在双侧检验中错用单侧临界值。双侧检验时,应将 α/2 分配到两个尾端。

  • Incorrectly interpreting the p‑value. A p‑value is the probability of obtaining a test statistic as extreme as the one observed, assuming H₀ is true. It is not the probability that H₀ is true.

    错误解读 p 值。p 值是在假定 H₀ 为真的情况下,观测到与当前统计量同样极端的结果的概率,并不是 H₀ 成立的概率。

  • Forgetting to check whether the sample data are approximately normal when n is small. Use a boxplot or a normal quantile plot.

    当 n 较小时,忘记检验样本数据是否近似正态。应使用箱线图或正态分位图进行判断。

In your final answer, include the value of the test statistic, the degrees of freedom, the p‑value (or critical value), and a clear decision sentence.

在最终答案中,应包含检验统计量的值、自由度、p 值(或临界值)以及明确的决策语句。


10. Connection to Confidence Intervals | 与置信区间的联系

The one‑sample t‑test and a confidence interval for the mean are based on the same t‑distribution. In fact, a two‑sided test of H₀: μ = μ₀ at level α is equivalent to checking whether μ₀ lies inside a (1 − α)100% confidence interval for μ.

单样本 t 检验与均值的置信区间基于相同的 t 分布。事实上,对 H₀: μ = μ₀ 在显著性水平 α 下进行双侧检验,等价于检查 μ₀ 是否位于 μ 的 (1 − α)100% 置信区间内。

The confidence interval has the form:

置信区间的形式为:

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

where t* is the critical value for the desired level of confidence with df = n − 1. If the hypothesised value μ₀ is outside this interval, we reject H₀ at significance level α; if it is inside, we do not reject.

其中 t* 是置信水平对应的临界值,自由度为 df = n − 1。如果假设值 μ₀ 位于区间之外,则在显著性水平 α 下拒绝 H₀;若位于区间之内,则不拒绝。

This connection reinforces the idea of estimation: a hypothesis test based on data can be understood as checking whether a plausible value of the population mean lies inside our interval estimate.

这种联系强化了估计的思想:基于数据的假设检验,可以理解为检查总体均值的某个可能值是否位于我们的区间估计内。


11. One-Tailed vs Two-Tailed p-Values | 单尾与双尾 p 值

When using a GDC or a t‑table, it is crucial to match the p‑value to the alternative hypothesis. The t‑distribution is symmetric, so the p‑value for a right‑tailed test is the area under the curve to the right of the observed t. For a left‑tailed test, it is the area to the left.

使用 GDC 或 t 分布表时,务必使 p 值与备择假设相匹配。t 分布是对称的,因此右侧检验的 p 值是曲线下观察到 t 值右侧的面积;左侧检验则是左侧的面积。

For a two‑tailed test, the p‑value is the sum of the area to the left of −|t| and the area to the right of |t|. This is often written as 2 × P(T > |t|). Some calculators directly output a two‑tailed p‑value; if not, double the one‑tailed p‑value.

对于双侧检验,p 值是曲线下 −|t| 左侧面积与 |t| 右侧面积之和,通常写作 2 × P(T > |t|)。有些计算器直接输出双尾 p 值;若没有,则将单尾 p 值乘以 2。

A common shortcut is to compare the calculated t with the critical value from a table. If the absolute value of t exceeds the critical value, we reject H₀. This method avoids p‑value conversions but gives the same result.

一种常用捷径是将计算出的 t 与表中的临界值比较。若 |t| 大于临界值,则拒绝 H₀。此法避免了 p 值换算,但结果一致。


12. Summary | 总结

When the population variance is unknown, a one‑sample t‑test is the appropriate tool for testing a claim about the population mean. The key formula is t = (x̄ − μ₀) / (s/√n) with df = n − 1.

当总体方差未知时,单样本 t 检验是检验总体均值假设的最合适工具。关键公式为 t = (x̄ − μ₀) / (s/√n),自由度为 df = n − 1。

Always state the null and alternative hypotheses, choose a significance level, verify assumptions, calculate the test statistic, and conclude in context. Remember that a p‑value below α leads to rejection of the null hypothesis, while a larger p‑value means insufficient evidence.

务必写出原假设与备择假设、选择显著性水平、验证假设条件、计算检验统计量并结合背景得出结论。记住,p 值小于 α 时拒绝原假设,而 p 值较大时表示证据不足。

Finally, check the tails carefully and understand the connection between the t‑test and the corresponding confidence interval. With careful practice, hypothesis testing becomes a clear and reliable procedure.

最后,仔细确认单尾或双尾类型,并理解 t 检验与相应置信区间之间的联系。通过认真练习,假设检验将成为一套清晰且可靠的流程。


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