📚 The Chi-squared (χ²) Test | 卡方(χ²)检验
The chi-squared (χ²) test is a statistical tool used in biology to decide whether observed categorical data differ significantly from expected values. It compares frequencies rather than measurements, making it especially useful in genetics and ecology.
卡方(χ²)检验是生物学中用来判断观察到的分类数据是否与期望值存在显著差异的统计工具。它比较的是频数而不是测量值,因此在遗传学和生态学中特别有用。
1. What is the chi-squared test? | 什么是卡方检验?
The χ² test measures how well observed frequencies fit a predicted or expected distribution. It does this by summing the standardised squared differences between each observed value (O) and its expected value (E).
卡方检验衡量观察频数与预测或期望分布的吻合程度。方法是将每个观察值(O)与期望值(E)之差的平方标准化后再求和。
The test is only valid for categorical data, such as counts of phenotypes, genotypes, or numbers of organisms in different habitats. It cannot be used for continuous measurements like height or mass.
该检验仅适用于分类数据,例如表现型、基因型的计数,或不同生境中生物的数量。它不能用于身高或质量等连续测量数据。
2. When to use χ² in biology | 生物中何时使用卡方检验
In A-Level biology, χ² is commonly used in two situations: testing genetic ratios from breeding experiments and testing whether ecological distributions are random or uniform.
在 A-Level 生物中,卡方检验常用于两种情况:检验杂交实验中的遗传比例,以及检验生态分布是随机还是均匀的。
For example, a geneticist may cross two heterozygous pea plants and expect a 3:1 ratio of tall to dwarf offspring. An ecologist may sample four habitat types and test whether a species is evenly distributed across them.
例如,遗传学家可能让两株杂合豌豆杂交,预期高茎与矮茎后代的比例为 3:1。生态学家可能对四种生境进行取样,检验某一物种是否均匀分布其中。
3. Stating hypotheses | 提出假设
Before performing a χ² test, you must state a null hypothesis (H₀) and an alternative hypothesis (H₁). The null hypothesis always states that there is no significant difference between observed and expected frequencies, and any difference is due to chance alone.
在进行卡方检验之前,必须先提出零假设(H₀)和替代假设(H₁)。零假设总是表明观察频数与期望频数之间没有显著差异,任何差异仅由偶然因素造成。
The alternative hypothesis states that there is a significant difference between observed and expected frequencies. The χ² test allows you to decide whether to reject or retain H₀ at a chosen probability level, usually 0.05.
替代假设则表明观察频数与期望频数之间存在显著差异。卡方检验可以帮助你在选定的概率水平(通常为 0.05)下决定拒绝还是保留零假设。
4. Calculating expected frequencies | 计算期望频数
Expected frequencies are calculated from a theoretical model. In genetics, this often means using Mendelian ratios such as 1:1, 3:1, 9:3:3:1, or 1:2:1 multiplied by the total number of offspring.
期望频数根据理论模型计算。在遗传学中,通常使用孟德尔比例,例如 1:1、3:1、9:3:3:1 或 1:2:1,再乘以后代总数。
In ecology, if you expect a uniform distribution, the expected value for each category is the total sample size divided by the number of categories. If you expect a specific ratio, multiply the total by each proportion.
在生态学中,如果预期为均匀分布,则每个类别的期望值为总样本数除以类别数。如果预期为特定比例,则用总数乘以每个比例。
5. The χ² formula | 卡方公式
The chi-squared statistic is calculated using the formula shown below. For each category, subtract the expected value from the observed value, square the result, divide by the expected value, then sum all categories.
卡方统计量使用以下公式计算。对于每个类别,用观察值减去期望值,将结果平方,再除以期望值,最后将所有类别的结果相加。
χ² = Σ (O − E)² ÷ E
O represents the observed frequency and E represents the expected frequency. The summation symbol Σ means that the calculation is repeated for every category or class.
O 代表观察频数,E 代表期望频数。求和符号 Σ 表示对每一个类别或组重复该计算。
6. Degrees of freedom | 自由度
Degrees of freedom (df) are needed to interpret the χ² value. For most A-Level tests, df is calculated as the number of categories minus one, provided no parameters have been estimated from the data.
解释卡方值需要用到自由度(df)。在大多数 A-Level 测验中,自由度为类别数减一,前提是没有从数据中估计任何参数。
The formula is df = n − 1, where n is the number of phenotypic classes or ecological categories. A dihybrid cross with four phenotypes has 3 degrees of freedom.
公式为 df = n − 1,其中 n 是表现型类别或生态类别的数量。具有四种表现型的双因子杂交有 3 个自由度。
7. Critical values and p-value | 临界值与 p 值
After calculating χ², compare it with a critical value from a chi-squared distribution table. A-Level exams usually use a significance level of p = 0.05.
计算卡方值后,将其与卡方分布表中的临界值进行比较。A-Level 考试通常使用 p = 0.05 的显著性水平。
The table below shows critical values at p = 0.05 for common degrees of freedom. If your calculated χ² is greater than the critical value, the probability of getting such a difference by chance is less than 5%.
下表显示了 p = 0.05 时常见自由度对应的临界值。如果计算出的卡方值大于临界值,则这种差异由偶然造成的概率小于 5%。
| Degrees of freedom (df) | Critical value at p = 0.05 |
|---|---|
| 1 | 3.841 |
| 2 | 5.991 |
| 3 | 7.815 |
| 4 | 9.488 |
8. Interpreting the result | 解释结果
If χ² calculated is greater than the critical value, you reject the null hypothesis. There is a statistically significant difference between observed and expected frequencies at the chosen significance level.
如果计算出的卡方值大于临界值,则拒绝零假设。在选定的显著性水平下,观察频数与期望频数之间存在统计学上的显著差异。
If χ² calculated is less than or equal to the critical value, you retain the null hypothesis. The difference is not statistically significant and can be attributed to chance or sampling error.
如果计算出的卡方值小于或等于临界值,则保留零假设。差异不具有统计学意义,可以归因于偶然或抽样误差。
9. Worked example: genetics | 实例:遗传学
A breeding experiment produced 556 pea seeds with four phenotypes: 315 round yellow, 108 round green, 101 wrinkled yellow, and 32 wrinkled green. The expected Mendelian ratio is 9:3:3:1.
一个杂交实验产生了 556 颗豌豆种子,四种表现型分别为:圆黄 315、圆绿 108、皱黄 101、皱绿 32。预期的孟德尔比例为 9:3:3:1。
Expected values are 312.75, 104.25, 104.25, and 34.75 respectively. The χ² calculation gives approximately 0.47.
期望值分别为 312.75、104.25、104.25 和 34.75。卡方计算结果约为 0.47。
There are 4 categories, so df = 3. The critical value at p = 0.05 is 7.815. Since 0.47 is much smaller than 7.815, the null hypothesis is retained. The observed ratio fits the expected 9:3:3:1 ratio.
共有 4 个类别,因此 df = 3。p = 0.05 时的临界值为 7.815。由于 0.47 远小于 7.815,零假设被保留。观察比例符合预期的 9:3:3:1 比例。
10. Worked example: ecology | 实例:生态学
An ecologist counted a flower species in three fields and found 50 red, 30 pink, and 20 white individuals. The null hypothesis is that the three colour forms are equally frequent.
一位生态学家统计了三个田地中某种花的颜色,发现红色 50 株、粉色 30 株、白色 20 株。零假设是三种花色出现频率相等。
The total is 100, so the expected value for each colour is 100 ÷ 3 = 33.33. The χ² value is (50−33.33)²÷33.33 + (30−33.33)²÷33.33 + (20−33.33)²÷33.33 ≈ 14.0.
总数为 100,因此每种颜色的期望值为 100 ÷ 3 = 33.33。卡方值为 (50−33.33)²÷33.33 + (30−33.33)²÷33.33 + (20−33.33)²÷33.33 ≈ 14.0。
With df = 2, the critical value is 5.991. Since 14.0 is greater than 5.991, the null hypothesis is rejected. The colour forms are not equally frequent in this sample.
自由度为 2,临界值为 5.991。由于 14.0 大于 5.991,零假设被拒绝。该样本中三种花色并非等频率出现。
11. Common mistakes | 常见错误
Students sometimes use percentages or proportions instead of actual frequencies in the χ² formula. The test must always use raw counts, never fractions or ratios.
学生有时会在卡方公式中使用百分比或比例,而不是实际频数。该检验必须使用原始计数,绝不能使用分数或比率。
Another common error is forgetting to use the correct degrees of freedom. Using the number of observations instead of the number of categories leads to the wrong critical value.
另一个常见错误是忘记使用正确的自由度。使用观察次数而不是类别数会导致临界值判断错误。
Expected values below 5 can also make the χ² test unreliable. If any expected frequency is too small, you should state that the test may be invalid or combine categories where appropriate.
期望值低于 5 也会使卡方检验不可靠。如果任何期望频数过小,应指出该检验可能无效,或在适当时合并类别。
12. Exam tips | 考试技巧
Always show your working clearly: state the null hypothesis, calculate each (O−E)²÷E component, sum them to get χ², determine df, compare with the critical value, and write a conclusion.
始终清楚展示计算过程:提出零假设,计算每个 (O−E)²÷E 分量,求和得到 χ²,确定自由度,与临界值比较,并写出结论。
In exam answers, use phrases such as ‘there is a significant difference’ or ‘there is no significant difference’ and always relate the conclusion back to the biological context of the question.
在考试答案中,使用“存在显著差异”或“不存在显著差异”等表述,并始终将结论与题目中的生物学情境联系起来。
Published by TutorHao | Biology Revision Series | aleveler.com
更多咨询请联系16621398022(同微信)
屏轩国际教育cambridge primary/secondary checkpoint, cat4, ukiset,ukcat,igcse,alevel,PAT,STEP,MAT, ibdp,ap,ssat,sat,sat2课程辅导,国外大学本科硕士研究生博士课程论文辅导