📚 PDF资源导航

A-Level Further Mathematics: Introduction to Goodness of Fit Tests | A-Level进阶数学:拟合优度检验入门

📚 A-Level Further Mathematics: Introduction to Goodness of Fit Tests | A-Level进阶数学:拟合优度检验入门

A goodness of fit test is a statistical procedure used to decide whether a set of observed categorical frequencies is consistent with a proposed theoretical distribution. In Edexcel A-Level Further Mathematics, this is almost always carried out using the chi-square test statistic.

拟合优度检验是一种统计方法,用于判断一组观测到的分类频数是否与某一理论分布一致。在 Edexcel 进阶数学中,这一检验几乎总是通过卡方统计量来完成。

This article introduces the core ideas step by step, from hypotheses and expected frequencies to degrees of freedom and worked examples. You will also learn how to adjust the test when model parameters must be estimated from the data.

本文将逐步介绍其核心概念,从假设与期望频数,到自由度与完整示例。你还会学习当模型参数需要从数据中估计时,如何对检验进行相应调整。


1. What is a Goodness of Fit Test? | 什么是拟合优度检验?

A goodness of fit test compares observed frequencies, denoted Oᵢ, with expected frequencies, denoted Eᵢ, under a stated null hypothesis. If the observed values are close to the expected values, the model is said to fit well; if they are far apart, the model is rejected.

拟合优度检验将观测频数 Oᵢ 与零假设下预期的理论频数 Eᵢ 进行比较。如果观测值接近期望值,则称模型拟合良好;如果相差较大,则拒绝该模型。

For example, a die might be rolled 60 times to test whether it is fair. The observed counts for each face are compared with the expected count of 10 per face under a uniform distribution.

例如,将一个骰子掷 60 次以检验其是否均匀。每个面出现的观测次数与均匀分布下每面期望次数 10 进行比较。


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

The null hypothesis, H₀, states that the data follow a specified distribution. The alternative hypothesis, H₁, states that the data do not follow that distribution.

零假设 H₀ 表示数据服从某个指定分布;备择假设 H₁ 表示数据不服从该分布。

It is important to write these hypotheses clearly in an exam, because the expected frequencies are calculated directly from the distribution stated in H₀. A vague or incorrect H₀ will lead to wrong expected values.

在考试中清晰写出假设非常重要,因为期望频数直接由 H₀ 中给出的分布计算得到。如果 H₀ 表述含糊或错误,会导致期望值计算错误。


3. The Chi-Square Test Statistic | 卡方检验统计量

The test statistic for a goodness of fit test is given by the following formula:

拟合优度检验的统计量由以下公式给出:

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

Here Oᵢ is the observed frequency in category i, Eᵢ is the expected frequency in that category, and the summation is over all categories. The statistic measures the total squared deviation between observation and expectation, scaled by the expected frequency.

其中 Oᵢ 是第 i 类的观测频数,Eᵢ 是该类的期望频数,求和符号对所有类别进行。该统计量衡量观测值与期望值之间的总体平方偏差,并以期望频数作为比例尺度。

If the model fits well, each term will be small, so χ² will be small. If the model fits poorly, one or more terms will be large, leading to a large χ² value.

如果模型拟合良好,每一项都会较小,因此 χ² 较小;如果拟合很差,某些项会很大,导致 χ² 值较大。


4. Degrees of Freedom and Critical Values | 自由度与临界值

In a standard goodness of fit test with k categories, the degrees of freedom are usually df = k − 1, because the total observed frequency is fixed. If parameters are estimated from the data, the degrees of freedom are reduced by the number of estimated parameters, p, giving df = k − 1 − p.

在具有 k 个类别的标准拟合优度检验中,自由度通常为 df = k − 1,因为总观测频数是固定的。如果参数是从数据中估计的,则自由度需要减去已估计参数的个数 p,即 df = k − 1 − p。

The critical value is found from the chi-square distribution table using the chosen significance level, usually 5% or 1%. The null hypothesis is rejected if the calculated χ² is greater than the critical value.

临界值根据选定的显著性水平(通常为5%或1%)从卡方分布表中查得。如果计算得到的 χ² 大于临界值,则拒绝零假设。


5. Conditions for Validity | 检验的有效条件

For the chi-square approximation to be reliable, the expected frequency in each category should generally be at least 5. When some categories have expected frequencies below this threshold, adjacent categories should be combined to increase the expected frequency.

为了使卡方近似可靠,每个类别的期望频数通常应至少为 5。当某些类别的期望频数低于此标准时,应将相邻类别合并以提高期望频数。

The observed frequencies must also be independent, and the total of the expected frequencies must equal the total of the observed frequencies. These conditions are essential for the test result to be meaningful.

观测频数之间还必须是独立的,且期望频数总和必须等于观测频数总和。这些条件对于检验结果具有实际意义是至关重要的。


6. Example: Testing a Uniform Distribution | 示例:均匀分布检验

Consider a tetrahedral die labelled 1, 2, 3, 4 that is thrown 80 times. The observed frequencies are 18, 22, 20 and 20 respectively. We test whether the die is fair at the 5% significance level.

考虑一个四面骰子,分别标有 1、2、3、4,共投掷 80 次。各面观测频数分别为 18、22、20 和 20。在 5% 显著性水平下检验骰子是否均匀。

Under H₀, each face has probability ¼, so the expected frequency for each face is 80 × ¼ = 20. The chi-square statistic is:

在 H₀ 下,每个面出现的概率为 ¼,因此每面的期望频数为 80 × ¼ = 20。卡方统计量为:

χ² = (18−20)²/20 + (22−20)²/20 + (20−20)²/20 + (20−20)²/20 = 0.4

Here k = 4, so df = 3. The critical value at 5% is 7.815. Since 0.4 < 7.815, we do not reject H₀; there is insufficient evidence that the die is biased.

这里 k = 4,因此 df = 3。5% 显著性水平下的临界值为 7.815。由于 0.4 < 7.815,我们不能拒绝 H₀;没有充分证据表明骰子存在偏差。


7. Testing Fit to a Binomial Distribution | 二项分布拟合检验

When testing data against a binomial distribution B(n, p), the parameter p often must be estimated from the sample. In that case, the expected probabilities are calculated using the estimated value of p, and the degrees of freedom become df = k − 2.

当检验数据是否服从二项分布 B(n, p) 时,参数 p 通常需要从样本中估计。此时应使用 p 的估计值来计算期望概率,自由度变为 df = k − 2。

Categories at the upper or lower tail with very small expected frequencies should be combined. For example, if a survey asks 10 people and counts how many prefer a brand, the possible counts 0 to 10 might have some tail categories merged to satisfy the condition Eᵢ ≥ 5.

对于上尾或下尾中期望频数很小的类别,应进行合并。例如,调查 10 个人并统计偏好某品牌的人数时,可能要把 0 到 10 中的某些尾端类别合并,以满足 Eᵢ ≥ 5 的条件。


8. Testing Fit to a Poisson Distribution | 泊松分布拟合检验

The Poisson distribution is often used to model the number of rare events occurring in a fixed interval. Its single parameter λ is usually estimated by the sample mean, so the degrees of freedom are reduced by one: df = k − 2.

泊松分布常用于模拟固定区间内稀有事件的发生次数。其唯一参数 λ 通常用样本均值估计,因此自由度需要减一:df = k − 2。

For example, the number of mutations in 200 DNA segments might be recorded, and the observed frequencies compared with a Poisson distribution. Expected probabilities are calculated using the formula P(X = r) = e⁻λ λʳ / r!, then multiplied by the total number of segments.

例如,记录 200 个 DNA 片段中的突变数,并将观测频数与泊松分布进行比较。期望概率使用公式 P(X = r) = e⁻λ λʳ / r! 计算,再乘以总片段数。

Because λ is estimated from the same data, the test is less powerful than if λ were known. This is reflected in the reduced degrees of freedom, which makes the critical value larger and rejection harder.

由于 λ 是从同一组数据中估计的,检验的功效低于 λ 已知的情况。自由度的减少使临界值变大,从而更难以拒绝原假设。


9. Testing Fit to a Normal Distribution | 正态分布拟合检验

For grouped continuous data, a normal distribution can be tested by first estimating the mean μ and standard deviation σ from the data. Each class interval is converted to a standard normal z-score to calculate its theoretical probability.

对于分组连续数据,可先由数据估计均值 μ 和标准差 σ,然后检验其是否符合正态分布。每个组区间通过转换为标准正态 z 分数来计算其理论概率。

Because two parameters are estimated, the degrees of freedom are df = k − 3. The expected frequency for each class is obtained by multiplying the class probability by the total sample size, and classes with expected counts below 5 must be merged.

由于估计了两个参数,自由度为 df = k − 3。每组的期望频数通过将区间概率乘以总样本量得到,期望计数低于 5 的组必须合并。


10. Adjusting Degrees of Freedom when Estimating Parameters | 估计参数时自由度的调整

The rule df = k − 1 − p is one of the most frequently tested ideas in Edexcel further statistics. Here, p is the number of unknown parameters estimated from the data before calculating expected frequencies.

规则 df = k − 1 − p 是 Edexcel 进阶统计中最常考查的考点之一。其中 p 是在计算期望频数之前,从数据中估计的未知参数个数。

For a uniform distribution, no parameters are estimated, so p = 0 and df = k − 1. For a Poisson distribution, λ is estimated, so p = 1 and df = k − 2. For a normal distribution, both μ and σ are estimated, so p = 2 and df = k − 3.

对于均匀分布,无需估计参数,因此 p = 0,df = k − 1;对于泊松分布,λ 被估计,因此 p = 1,df = k − 2;对于正态分布,μ 和 σ 都被估计,因此 p = 2,df = k − 3。


11. Common Mistakes and Pitfalls | 常见错误与陷阱

  • Using observed frequencies instead of expected frequencies in the denominator of χ². The formula requires Eᵢ in the denominator.
  • 在 χ² 的分母中使用观测频数而非期望频数。公式要求分母为 Eᵢ。
  • Forgetting to combine categories when many expected frequencies are below 5. This invalidates the chi-square approximation.
  • 当许多期望频数低于 5 时忘记合并类别。这会使卡方近似失效。
  • Using df = k − 1 when parameters have been estimated from the data. Always count the estimated parameters and subtract them.
  • 当参数从数据中估计时,仍使用 df = k − 1。务必数清已估计的参数个数并予以扣除。
  • Stating the alternative hypothesis incorrectly, such as saying the data follow a different distribution instead of saying they do not follow the specified distribution.
  • 错误表述备择假设,例如说数据服从另一种分布,而不是说数据不服从指定分布。

12. Summary and Exam Tips | 总结与考试技巧

Goodness of fit testing is a structured process: write hypotheses, calculate expected frequencies, verify the conditions, compute χ², find the critical value, and make a conclusion in context. In an exam, always show the expected frequency table and state the degrees of freedom clearly.

拟合优度检验是一个结构化的过程:写出假设,计算期望频数,验证条件,计算 χ²,查找临界值,并联系实际情境下结论。在考试中,务必展示期望频数表,并清楚写出自由度。

Remember that the conclusion should be phrased in terms of the original problem, not just “reject H₀”. If χ² is less than the critical value, say there is insufficient evidence to conclude that the data do not follow the stated distribution.

请记住,结论应结合原问题来表述,而不仅仅是”拒绝 H₀”。如果 χ² 小于临界值,应说明没有充分证据表明数据不服从指定分布。

Practicing with past paper questions is essential, especially for determining which parameter has been estimated and how many degrees of freedom are lost. With careful attention to these details, goodness of fit tests become a secure source of marks.

通过练习历年真题十分重要,尤其是判断哪个参数被估计以及自由度损失多少。只要对这些细节足够细心,拟合优度检验就能成为稳定的得分点。


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

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

Comments

屏轩国际教育cambridge primary/secondary checkpoint, cat4, ukiset,ukcat,igcse,alevel,PAT,STEP,MAT, ibdp,ap,ssat,sat,sat2课程辅导,国外大学本科硕士研究生博士课程论文辅导Cancel reply

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

Exit mobile version