📚 KS3 Maths: Hypothesis Testing | KS3 数学:假设检验 考点精讲
Imagine you claim a coin is fair, but when you toss it 10 times, you get 9 heads. Is the coin really fair, or is something suspicious going on? Hypothesis testing helps us make a formal decision using probability and data. It is a key statistical tool that allows us to test assumptions and draw conclusions from sample results. In this KS3 revision guide, we will break down the steps of hypothesis testing in a simple and practical way, using coin tosses and dice rolls to build your understanding.
想象一下,你声称一枚硬币是公平的,但当你抛掷它 10 次时,却得到了 9 次正面。这枚硬币真的是公平的吗,还是有什么可疑之处?假设检验帮助我们利用概率和数据做出正式的决策。它是一种关键的统计工具,让我们能够检验假设并从样本结果中得出结论。在这份 KS3 复习指南中,我们将以简单实用的方式分解假设检验的步骤,利用抛硬币和掷骰子的例子来加深你的理解。
1. What is Hypothesis Testing? | 什么是假设检验?
Hypothesis testing is a statistical method used to decide whether there is enough evidence in a sample of data to support a particular belief or hypothesis about a population. It starts with a statement we want to test, and then we collect data to see if that statement is likely to be true.
假设检验是一种统计方法,用于判断样本数据中是否有足够证据支持关于总体的某种观点或假设。它从一个我们想要检验的陈述开始,然后我们收集数据,看看该陈述是否可能为真。
For example, if we suspect a coin is biased towards heads, we can state a hypothesis and then toss the coin many times to see if the results back up our suspicion. Hypothesis testing does not prove a hypothesis is true; it merely tells us if the observed data are very unlikely under the original assumption.
例如,如果我们怀疑一枚硬币倾向于正面朝上,我们可以提出假设,然后多次抛掷硬币,看看结果是否支持我们的怀疑。假设检验并不能证明假设是否正确;它只是告诉我们,在原始假设下,观察到的数据是否极不可能发生。
2. Null Hypothesis and Alternative Hypothesis | 零假设与备择假设
Every hypothesis test has two competing statements: the null hypothesis (H₀) and the alternative hypothesis (H₁ or Hₐ). The null hypothesis is the default position that nothing has changed or there is no effect. It often represents a statement of no difference or no bias. The alternative hypothesis is what we want to prove or suspect might be true.
每个假设检验都包含两个对立的陈述:零假设(H₀)和备择假设(H₁ 或 Hₐ)。零假设是默认立场,即什么都没有改变,或者没有效应。它通常代表无差异或无偏差的陈述。备择假设则是我们想要证明或怀疑可能为真的陈述。
For a coin, the null hypothesis is: H₀: The coin is fair, so the probability of heads, p = 0.5. The alternative hypothesis could be two-sided or one-sided. A two-sided alternative is H₁: p ≠ 0.5 (the coin is not fair). A one-sided alternative could be H₁: p > 0.5 (biased towards heads) or H₁: p < 0.5 (biased towards tails).
对于硬币,零假设为:H₀:硬币是公平的,因此正面朝上的概率 p = 0.5。备择假设可以是双侧的或单侧的。双侧备择假设是 H₁:p ≠ 0.5(硬币不公平)。单侧备择假设可以是 H₁:p > 0.5(偏向正面)或 H₁:p < 0.5(偏向反面)。
We write the hypotheses clearly before any experiment. The test will attempt to find evidence against the null hypothesis. If enough evidence is found, we reject H₀ in favour of H₁.
我们在进行任何实验之前,清楚地写下这些假设。检验将试图找到反对零假设的证据。如果找到足够的证据,我们就拒绝 H₀ 而接受 H₁。
3. Significance Level and the Idea of Rare Events | 显著性水平与稀有事件的概念
When we perform a hypothesis test, we set a threshold for how unusual an outcome must be before we reject the null hypothesis. This threshold is called the significance level, often denoted by the Greek letter α (alpha). Common choices are 5% (0.05) or 1% (0.01). At KS3, we will usually use the 5% level.
当我们进行假设检验时,我们设定一个阈值,来判断一个结果必须有多不寻常,我们才会拒绝零假设。这个阈值称为显著性水平,通常用希腊字母 α(alpha)表示。常见的选择是 5%(0.05)或 1%(0.01)。在 KS3 阶段,我们通常使用 5% 水平。
The significance level is the maximum probability we are willing to accept of making a wrong decision—rejecting a true null hypothesis. If the probability of getting our observed result (or something more extreme) is less than the significance level, we consider the result statistically significant and reject H₀.
显著性水平是我们愿意接受的做出错误决定——拒绝一个真的零假设——的最大概率。如果得到我们观察到的结果(或更极端结果)的概率小于显著性水平,我们就认为结果具有统计显著性,并拒绝 H₀。
For example, if we set α = 0.05, and the probability of getting at least 9 heads in 10 tosses with a fair coin is very small (about 0.0107, which is less than 0.05), we would reject the fairness hypothesis.
例如,如果我们设定 α = 0.05,而用一枚公平硬币抛出 10 次中出现至少 9 次正面的概率非常小(大约为 0.0107,小于 0.05),那么我们就会拒绝公平性假设。
4. Test Statistic and Observed Outcome | 检验统计量与观察结果
A test statistic is a number calculated from the sample data that we use to make a decision. In our coin-tossing example, the test statistic could be the number of heads we get, or the proportion of heads. We compare this to a critical value or compute the probability of observing such a value under the null hypothesis.
检验统计量是根据样本数据计算出来的一个数字,我们用它来做决策。在我们的抛硬币例子中,检验统计量可以是我们得到的正面次数,或者是正面的比例。我们将其与临界值进行比较,或者计算在零假设下观察到这样一个值的概率。
Let’s say we toss a coin 10 times and get 8 heads. The observed test statistic is 8. We then ask: if the coin is fair (p=0.5), what is the probability of getting 8 or more heads? We can work this out using binomial probabilities or refer to ready-made tables. This probability is called the p-value.
假设我们将一枚硬币抛掷 10 次,得到 8 次正面。观察到的检验统计量是 8。然后我们问:如果硬币是公平的(p=0.5),得到 8 次或更多正面的概率是多少?我们可以用二项概率计算出来,或者查阅现成的表格。这个概率就叫做 p 值。
If the p-value is smaller than the significance level, we reject H₀. The p-value helps us understand how surprising our data are, assuming the null hypothesis is true.
如果 p 值小于显著性水平,我们就拒绝 H₀。p 值帮助我们理解,假设零假设为真时,我们的数据有多么令人惊讶。
5. Carrying Out the Experiment and Collecting Data | 进行实验与收集数据
To perform a hypothesis test, we need a well-planned experiment. We decide the sample size (number of coin tosses or dice rolls) before starting. The sample must be random and independent—each trial should not influence the next. In a classroom, you might toss a coin 20 times and record the number of heads. Or you could roll a die 30 times and note how many times a six appears.
要进行假设检验,我们需要一个精心计划的实验。我们在开始之前决定样本大小(抛硬币或掷骰子的次数)。样本必须是随机的且独立的——每次试验不应影响下一次。在课堂上,你可以抛一枚硬币 20 次,并记录正面朝上的次数。或者你可以掷一枚骰子 30 次,记录出现六点的次数。
It is crucial to define the test statistic before collecting data. For instance, we might agree to count the number of heads. Then we conduct the experiment carefully, ensuring no cheating or bias in how we toss the coin. The raw data are then summarised into the test statistic.
在收集数据之前定义检验统计量至关重要。例如,我们可以约定计算正面的次数。然后我们小心地进行实验,确保抛掷硬币的方式没有作弊或偏差。接着将原始数据归纳为检验统计量。
Remember, hypothesis testing always involves uncertainty. Even a fair coin can give 8 heads in 10 tosses by chance. But if the probability is low, we may question the coin’s fairness.
请记住,假设检验总是涉及不确定性。即使是公平的硬币,也可能在 10 次抛掷中偶然出现 8 次正面。但如果这种概率很低,我们就可能质疑硬币的公平性。
6. Making a Decision: Reject or Not Reject? | 做出决策:拒绝还是不拒绝?
Once we have the p-value, we compare it to the significance level (α). If p-value ≤ α, we reject the null hypothesis. This suggests that the data provide enough evidence to support the alternative. If p-value > α, we do not reject the null hypothesis. This does not mean H₀ is true, only that we don’t have strong enough evidence against it.
一旦我们得到 p 值,就将其与显著性水平(α)进行比较。如果 p 值 ≤ α,我们拒绝零假设。这表明数据提供了足够的证据支持备择假设。如果 p 值 > α,我们不拒绝零假设。这并不意味着 H₀ 为真,只是表明我们没有足够强的证据来反驳它。
An important note: we never say we ‘accept’ the null hypothesis, because failing to find a difference does not prove there is no difference. Think of it like a court case: not guilty is not the same as innocent.
一个重要的提示:我们从来不说我们“接受”零假设,因为未能发现差异并不证明没有差异。可以把它想象成法庭案件:无罪不等于清白。
In our coin example with 8 heads in 10 tosses, the two-sided p-value is about 0.109 (10.9%), which is greater than 0.05. So we would not reject H₀ at the 5% level. But 9 heads gives a p-value around 0.0215, which is less than 0.05, so we would reject H₀.
在我们的硬币例子中,10 次抛掷出现 8 次正面的双侧 p 值大约为 0.109(10.9%),大于 0.05。因此,在 5% 显著性水平下,我们不会拒绝 H₀。但若出现 9 次正面,p 值约为 0.0215,小于 0.05,因此我们会拒绝 H₀。
7. Worked Example: Testing a Coin for Fairness | 实例分析:检验硬币的公平性
Let’s step through a complete example. Suppose we suspect a coin is biased towards heads. We set up our hypotheses:
让我们逐步完成一个完整的例子。假设我们怀疑一枚硬币倾向于正面朝上。我们建立假设:
H₀: p = 0.5 (fair coin)
H₀: p = 0.5(公平硬币)
H₁: p > 0.5 (biased towards heads)
H₁: p > 0.5(偏向正面)
We choose significance level α = 0.05. We decide to toss the coin 12 times and count the number of heads. The test statistic is X = number of heads. After tossing, we get X = 10 heads. We need to find the probability of getting 10 or more heads when p = 0.5. Using binomial distribution:
我们选择显著性水平 α = 0.05。我们决定抛掷硬币 12 次,并计算正面次数。检验统计量为 X = 正面次数。抛掷后,我们得到 X = 10 次正面。我们需要找出当 p = 0.5 时,得到 10 次或更多正面的概率。使用二项分布:
P(X ≥ 10) = P(X=10) + P(X=11) + P(X=12) ≈ 0.0161 + 0.0029 + 0.0002 = 0.0192 (about 1.92%).
P(X ≥ 10) = P(X=10) + P(X=11) + P(X=12) ≈ 0.0161 + 0.0029 + 0.0002 = 0.0192(约 1.92%)。
This p-value (0.0192) is less than 0.05. Therefore, we reject the null hypothesis and conclude there is sufficient evidence that the coin is biased towards heads.
这个 p 值(0.0192)小于 0.05。因此,我们拒绝零假设,并得出结论:有足够证据表明这枚硬币偏向正面。
If the alternative were two-sided (H₁: p ≠ 0.5), we would double the one-sided p-value for extreme outcomes, giving 2 × 0.0192 = 0.0384, still significant. So the conclusion is the same: the coin seems unfair.
如果备择假设是双侧的(H₁: p ≠ 0.5),我们需要将极端结果的单侧 p 值加倍,得到 2 × 0.0192 = 0.0384,仍然显著。所以结论是相同的:这枚硬币似乎不公平。
8. Worked Example: Testing a Die for Fairness | 实例分析:检验骰子的公平性
Now imagine we roll a six-sided die 24 times and get a six on 8 rolls. We want to test if the die is fair, i.e., probability of a six = 1/6. Hypotheses:
现在设想我们掷一枚六面骰子 24 次,有 8 次得到六点。我们想要检验骰子是否公平,即出现六点的概率等于 1/6。假设:
H₀: p = ⅙
H₁: p ≠ ⅙ (two-sided test)
With α = 0.05, we compute the probability of observing 8 or more sixes (or an equally extreme result on the lower side). We can use a probability table for binomial(24, ⅙). The p-value for X ≥ 8 is about 0.034. Because the test is two-sided, we also consider the lower tail and double the one-tailed p-value if it is the extreme direction. However, here 8 is above the expected value (4), so the two-sided p-value is approximately 2 × P(X ≥ 8). But careful: we only double the probability of the observed tail if the distribution is symmetric in a certain sense. A simpler approach is to use a calculator and find P(|X – 4| ≥ 4) or use critical region tables.
在 α = 0.05 下,我们计算观察到 8 次或更多六点的概率(或者在下侧同样极端的结果)。我们可以使用二项分布 Binomial(24, ⅙) 的概率表。X ≥ 8 的 p 值大约为 0.034。由于这是双侧检验,我们还需要考虑下尾,并将观察到的极端方向的单侧 p 值加倍。但要注意,我们只在观察到极端方向的概率上乘以 2,这里 8 大于期望值 4。因此双侧 p 值大约为 2 × 0.034 = 0.068,大于 0.05。所以我们不能拒绝零假设;没有充分证据表明骰子不公平。
A more precise computation gives one-sided P(X ≥ 8) ≈ 0.034, two-sided p ≈ 0.068 > 0.05; fail to reject H₀. So the data do not provide enough evidence to say the die is biased.
更精确的计算给出单侧 P(X ≥ 8) ≈ 0.034,双侧 p ≈ 0.068 > 0.05;无法拒绝 H₀。因此,数据没有提供足够证据表明骰子有偏差。
This example shows that even getting twice the expected number of sixes might not be sufficient to prove unfairness with a small sample.
这个例子表明,即使出现六点的次数是期望值的两倍,在样本量较小时也可能不足以证明不公平。
9. Common Mistakes and Key Points to Remember | 常见错误与记忆要点
Many students confuse the null and alternative hypotheses. Always remember: the null hypothesis includes an equality (p = some value), and the alternative is what you are trying to prove (p ≠, >, or <). Also, never use the sample result to formulate the hypotheses after the experiment; hypotheses come first.
许多学生混淆零假设和备择假设。始终记住:零假设包含等式(p = 某个值),备择假设是你要试图证明的(p ≠、> 或 <)。此外,永远不要在实验之后用样本结果来构造假设;假设必须先确定。
A common error is interpreting a high p-value as proof that H₀ is true. A high p-value simply means we lack evidence against H₀; it does not confirm H₀. Think of a lack of proof, not proof of lack.
一个常见错误是将较高的 p 值解读为 H₀ 为真的证据。高 p 值仅仅意味着我们缺乏反对 H₀ 的证据;它并不能确认 H₀。可以理解为“没有证据表明有罪”,而不是“证明无罪”。
The significance level must be chosen before the test, not after seeing the p-value. Also, ensure the sample is random and trials are independent. If you toss a coin and it lands on the same surface every time, that’s fine; but if you alter the technique, independence may be lost.
显著性水平必须在检验之前选定,而不是在看到 p 值之后。另外,要确保样本是随机的,且试验是独立的。如果你抛硬币时每次都让它落在同一个表面上,那没有问题;但如果你改变了抛掷手法,独立性就可能丧失。
Finally, always phrase your conclusion clearly: “There is (or is not) sufficient evidence at the α% level to reject the null hypothesis.” Do not say “the hypothesis is proven true/false”.
最后,始终清晰地陈述你的结论:“在 α% 显著性水平下,有(或没有)足够证据拒绝零假设。”不要说“该假设被证明为真/假”。
10. Summary and Real-Life Connections | 总结与实际生活中的应用
Hypothesis testing is a foundational concept in statistics. It allows us to make sense of variability and chance. Whether we are checking if a new medicine works, if a dice is loaded, or if a coin is fair, the same logical framework applies. At KS3, you only need to grasp the basic steps: state hypotheses, collect data, compute a p-value (or compare with a critical value), and make a decision.
假设检验是统计学中的一个基础概念。它使我们能够理解变异性和偶然性。无论我们是在检验一种新药是否有效,一个骰子是否被做了手脚,还是一枚硬币是否公平,都适用同一个逻辑框架。在 KS3 阶段,你只需要掌握基本步骤:陈述假设、收集数据、计算 p 值(或与临界值比较),然后做出决策。
Understanding hypothesis testing not only helps with maths exams but also develops critical thinking skills. In everyday life, we informally test hypotheses all the time—like guessing whether a bus is late on purpose or by chance. With the formal tool, we can back up our intuition with probability.
理解假设检验不仅有助于数学考试,还能培养批判性思维能力。在日常生活中,我们一直在非正式地检验假设——比如猜测公交车晚点是有意还是偶然。借助正式的工具,我们可以用概率来支撑我们的直觉。
Keep practising with different sample sizes, probabilities, and hypotheses. Use online binomial calculators or tables to check your p-values. Soon, you’ll find hypothesis testing a logical and exciting way to explore the world of data!
不断练习不同的样本大小、概率和假设。使用在线二项式计算器或表格来检查你的 p 值。很快,你就会发现假设检验是一种合乎逻辑且令人兴奋的探索数据世界的方法!
Published by TutorHao | Mathematics Revision Series | aleveler.com
更多咨询请联系16621398022(同微信)
屏轩国际教育cambridge primary/secondary checkpoint, cat4, ukiset,ukcat,igcse,alevel,PAT,STEP,MAT, ibdp,ap,ssat,sat,sat2课程辅导,国外大学本科硕士研究生博士课程论文辅导