📚 The Independence of Court Cards | 花牌的独立性检验
In A-Level Mathematics, the concept of independence is fundamental to both probability and statistical inference. When we draw playing cards, a natural question arises: is the appearance of a court card (jack, queen, or king) independent of the card's colour? This article explores the statistical test for independence using a chi-squared contingency table, framed around the playful yet instructive context of court cards. Understanding independence not only deepens your grasp of probability but also equips you with a powerful tool for analysing categorical data in real-world situations.
在A-Level数学中,独立性是概率论和统计推断的基础概念。当我们抽取扑克牌时,一个自然的问题就是:花牌(J、Q、K)的出现是否与牌的颜色相互独立?本文围绕花牌这一轻松但有启发性的情境,使用卡方列联表来探讨独立性的统计检验。理解独立性不仅能加深你对概率的掌握,还能让你掌握分析现实世界分类数据的强大工具。
1. Introduction to Independence in Probability | 概率中的独立性简介
ndent if the occurrence of one does not affect the probability of the other. Mathematically, independence is defined by the condition P(A ∩ obability of drawing a court card is the same regardless of whether we look at red cards or black cards, then 'court card' and 'colour' cal hypothesis testing, we often use a chi-squared test for independence to determine whether observed categorical data supports such a theoretical relationship.
如果两个事件A和B中一个的发生不影响另一个发生的概率,则称它们是独立的。数学上,独立性由条件 P(A ∩ B) = P(A) × P(B) 定义。例如,无论我们看红色牌还是黑色牌,抽到花牌的概率都相同,那么“花牌”和“颜色”就是独立事件。在统计假设检验中,我们经常使用卡方独立性检验来判断观测到的分类数据是否支持这种理论关系。
In an experiment, we collect frequency data across two categories and arrange them in a contingency table. Under the null hypothesis of independence, the expected frequency for each cell is calculated from the marginal totals. The chi-squared statistic then measures how far the observed frequencies deviate from these expected values. A large deviation suggests that the variables may not be independent.
在实验中,我们收集两个类别下的频数数据,并将其排列在列联表中。在独立性原假设下,每个单元格的期望频数由边缘总计计算得出。然后卡方统计量度量观测频数与这些期望值之间的偏离程度。较大的偏离表明变量之间可能不独立。
2. Defining Court Cards | 定义花牌
In a standard deck of 52 playing cards, the court cards—also known as face cards— are black (26 cards). This clear structure lets us construct a 2 × 2 table with categories 'Court' vs 'Non-court' and 'Red' vs 'Black'.
在一副标准的52张扑克牌中,花牌(也称人头牌)是J、Q和K。总共有12张花牌:每种花色各3张。其余40张是数字牌(A到10,这里A被当作非花牌)。对于颜色分类,红心和方块是红色(26张),梅花和黑桃是黑色(26张)。这种清晰的结构使我们能够构建一个2×2表格,类别为“花牌”与“非花牌”以及“红色”与“黑色”。
If we repeatedly draw a card from a well-shuffled deck, record whether it is a court card and its colour, and then replace it, we can accumulate observed frequencies. The key question is: Does the proportion of court cards among red cards differ from that among black cards? Statistical independence implies these proportions are equal.
如果我们从充分洗匀的牌组中反复抽牌,记录它是否为花牌及其颜色,然后放回,就可以累积观测频数。关键问题是:红色牌中花牌的比例是否与黑色牌中花牌的比例不同?统计独立性意味着这两个比例相等。
3. Setting Up the Contingency Table | 建立列联表
Suppose we perform 200 trials, each time noting both colour and court status. The observed results might be organised as follows:
假设我们进行200次试验,每次记录颜色和是否为花牌。观测结果可以整理如下:
| Red | Black | Row total | |
|---|---|---|---|
| Court card | 30 | 20 | 50 |
| Non-court card | 70 | 80 | 150 |
| Column total | 100 | 100 | 200 |
Here, the observed frequencies are denoted by O. The totals provide the information needed to compute expected frequencies assuming independence.
这里,观测频数用 O 表示。总计提供了在独立性假设下计算期望频数所需的信息。
4. Formulating Hypotheses | 提出假设
The chi-squared test for independence uses a pair of statistical hypotheses. The null hypothesis H₀ states that the two categorical variables are independent. In our context, H₀: The distribution of court cards is independent of colour. The alternative hypothesis H₁ asserts that they are not independent: H₁: Court card occurrence and colour are associated (dependent).
卡方独立性检验使用一对统计假设。原假设 H₀ 陈述两个分类变量是独立的。在我们的情境中,H₀:花牌的分布与颜色独立。备择假设 H₁ 断言它们不独立:H₁:花牌的出现与颜色有关联(不独立)。
We test H₀ against H₁ at a chosen significance level, commonly 5% eds a critical value determined by the chi-squared distribution, we reject H₀ in favour of dependence.
我们在选定的显著性水平上检验 H₀ 和 H₁,通常为5%(α = 0.05)。如果检验统计量超过了由卡方分布决定的临界值,我们就拒绝 H₀ 而支持依赖关系。
5. Expected Frequencies Under Independence | 独立性下的期望频数
ue, the expected number of red court cards is (50 × 100) / 200 = 25. Similarly, we obtain:
对于列联表中的每个单元格,期望频数 E 的计算公式为(行总计 × 列总计)÷ 总总计。假设 H₀ 为真,红色花牌的期望频数为 (50 × 100) / 200 = 25。同理可得:
- Expected red non-court: (150 × 100) / 200 = 75
- Expected black court: (50 × 100) / 200 = 25
- Expected black non-court: (150 × 100) / 200 = 75
注意:期望频数(红色非花牌):(150 × 100) / 200 = 75;黑色花牌:25;黑色非花牌:75。
| Red (E) | Black (E) | |
|---|---|---|
| Court | 25 | 25 |
| Non-court | 75 | 75 |
All expected frequencies are at least 5, satisfying the standard condition for the chi-squared approximation to be valid.
所有期望频数都至少为5,满足了卡方近似有效的标准条件。
6. Calculating the Chi-Squared Statistic | 计算卡方统计量
ic is given by χ² = Σ (O - E)² / E, where the sum is taken over all cells. Using our data:
检验统计量的公式为 χ² = Σ (O - E)² / E,对所有的单元格求和。使用我们的数据:
- Red court: (30 - 25)² / 25 = 25 / 25 = 1
- Red non-court: (70 - 75)² / 75 = 25 / 75 ≈ 0.333
- Black court: (20 - 25)² / 25 = 25 / 25 = 1
- Black non-court: (80 - 75)² / 75 = 25 / 75 ≈ 0.333
红色花牌:(30 - 25)² / 25 = 1;红色非花牌:(70 - 75)² / 75 ≈ 0.333;黑色花牌:(20 - 25)² / 25 = 1;黑色非花牌:(80 - 75)² / 75 ≈ 0.333。
Summing these contributions gives χ² = 1 + 0.333 + 1 + 0.333 ≈ 2.667.
将这些贡献求和得到 χ² ≈ 2.667。
ximation to the continuous chi-squared distribution, some textbooks suggest applying Yates' correction for a 2 × 2 table, which reduces each |O - E| , the standard chi-squared test without correction is generally expected unless instructed otherwise, and both approaches are acceptable when assumptions are met.
由于我们使用连续卡方分布的近似,某些教材建议对2×2表格应用叶氏校正,即在平方前将每个 |O - E| 减去0.5。这将得到稍小的统计量(约2.08),其使用由考试局决定。对于爱德思A-Level,除非另有说明,通常期望使用标准的不带校正的卡方检验,并且在假设条件满足时这两种方法都是可接受的。
7. Degrees of Freedom | 自由度
- 1) × (number of columns - 1). Here we have a 2 × 2 table, so ν = (2 - 1) × (2 - 1) = 1.
对于列联表的独立性检验,自由度(ν)的计算公式为(行数 - 1)×(列数 - 1)。这里我们有一个2×2表格,因此 ν = 1。
With one degree of freedom, the distribution of χ² under H₀ is heavily centred near zero but has a long right tail. This reflects the fact that small deviations from independence are expected by chance, while large deviations indicate a significant association.
在自由度为1时,H₀ 下 χ² 的分布高度集中在零附近,但有一个长长的右尾。这反映了小的独立性偏离可能只是偶然,而较大的偏离则表明存在显著关联。
8. Critical Value and Decision Rule | 临界值与决策规则
At the 5% not independent. If χ² ≤ 3.841, we do not have sufficient evidence to reject independence.
在5%显著性水平且自由度为1时,从卡方分布表中查得的临界值为3.841。这意味着如果 χ² > 3.841,我们拒绝 H₀ 并得出花牌的出现与颜色不独立的结论。如果 χ² ≤ 3.841,则没有足够证据拒绝独立性。
The p-value approach can also be used: the p-value is the probability of observing a χ² value as extreme as, or more extreme than, the one calculated, assuming H₀ is true. A p-value less than 0.05 would lead to rejection.
也可以使用 p 值方法:p 值是在 H₀ 为真的条件下,观测到与计算值同等极端或更极端的 χ² 值的概率。p 值小于0.05将导致拒绝 H₀。
9. Performing the Test with an Example | 实例检验
. Since 2.667 < 3.841, the test statistic does not fall into the critical region. Therefore, we do not reject the null hypothesis at the 5% level.
回想我们计算的 χ² 约为2.667。由于 2.667 < 3.841,检验统计量未落入拒绝域。因此,在5%水平下我们不拒绝原假设。
If we had applied Yates' remains unchanged. So, based on this sample of 200 draws, there is no statistically significant evidence to suggest that the occurrence of a court card depends on the colour of the card.
如果我们应用了叶氏校正(约2.08),结论仍然不变。因此,根据这200次抽牌的样本,没有统计上显著证据表明花牌的出现取决于牌的颜色。
ds (20/100 = 0.2), and the slight difference is fully explainable by sampling variability.
这一结果与我们关于充分洗匀的牌组的理论知识一致:红色牌中花牌的比例(30/100 = 0.3)与黑色牌中花牌的比例(20/100 = 0.2)接近,微小的差异完全可由抽样变异性解释。
10. Interpreting the Results | 结果解释
Failing to reject H₀ does not prove that the variables are independent; it only means the data are consistent with independence. In contrast, had we observed a much larger discrepancy—say, 45 red court cards and 5 black court cards—the χ² value would have been far above the critical threshold, leading to a conclusion of dependence.
未能拒绝 H₀ 并不能证明变量是独立的;它仅意味着数据与独立性一致。反之,如果我们观测到更大的差异——比如45张红色花牌和5张黑色花牌——χ² 值将远高于临界阈值,从而导致不独立的结论。
In the context of court cards, dependence could arise from a biased shuffling technique or a non-standard deck composition. The chi-squared test provides an objective, quantitative way to detect such anomalies.
在花牌的情境中,不独立可能源于有偏的洗牌手法或非标准的牌组构成。卡方检验提供了一种客观、定量的方法来检测此类异常。
11. Assumptions and Limitations | 假设条件与局限性
For the chi-squared test of independence to be valid, several assumptions must be met. First, the data must come from a random sample or a randomised experiment. Second, the observations must be independent of each other—here each draw is independent because we replace the card and shuffle thoroughly. Third, all expected frequencies should be at least 5; if any expected frequency is less than 5, Fisher's exact test or combining categories might be required.
为了使卡方独立性检验有效,必须满足若干假设条件。第一,数据必须来自随机样本或随机化实验。第二,观测值必须相互独立——这里每次抽牌是独立的,因为我们放回并充分洗牌。第三,所有期望频数应至少为5;如果任何期望频数小于5,则可能需要费雪精确检验或合并类别。
Additionally, the test is sensitive to sample size: with very large samples, even tiny departures from independence can produce statistically significant results that may not be practically important. Thus, always interpret the results in context.
此外,该检验对样本大小敏感:在非常大的样本中,即使是微小的独立性偏离也可能产生统计上显著但实际意义不大的结果。因此,务必结合情境解释结果。
12. Conclusion | 总结
The chi-squared test for independence is a versatile and essential tool in the A-Level statistician's toolkit. By applying it to the playful yet concrete example of court cards and colour, we have walked through formulating hypotheses, computing expected frequencies, calculating the test statistic, and interpreting the results. The same procedure can be extended to any pair of categorical variables, from product preferences to biological traits.
卡方独立性检验是A-Level统计学家工具箱中多功能且必不可少的工具。通过将其应用于花牌和颜色这一有趣而具体的例子,我们逐步经历了提出假设、计算期望频数、计算检验统计量以及解释结果的过程。同样的步骤可以扩展到任何一对分类变量,从产品偏好到生物学特征。
Mastery of this topic not only prepares you for Edexcel exam questions but also cultivates a habit of critical reasoning about association and causality in data. With practice, you will be able to judge whether two factors are truly independent or whether there is a relationship worth investigating further.
掌握这一专题不仅能帮助你应对爱德思考题,还能培养你对数据中的关联性和因果性进行批判性推理的习惯。通过练习,你将能够判断两个因素是否真正独立,或者是否存在值得进一步探究的关系。
Published by TutorHao | Mathematics Revision Series | aleveler.com
更多咨询请联系16621398022(同微信)

或截图后用「扫一扫 → 相册」选择本图