Homogeneity or Independence?
引入
7:48
分类数据的推断:卡方
掷一枚公平骰子六十次。每个面应出现十次。但从未如此——这里八次,那里十三次。差距始终存在。因此再掷一次…
英文讲解 · 可切换中英文字幕
本课内容
| English | 释义 | 拼音 |
|---|---|---|
| Homogeneity/ˈhɒməʊdʒneɪti/ | 齐性 | qí xìng |
| Independence/ˌɪndɪˈpendəns/ | 独立性 | dú lì xìng |
| two-way table/tuː weɪ ˈteɪbl/ | 双向列联表 | shuāng xiàng liè lián biǎo |
| chi-square/kaɪ skweə/ | 卡方 | kǎ fāng |
| design/dɪˈzaɪn/ | 研究设计 | yán jiū shè jì |
| sample/ˈsæmpl/ | 样本 | yàng běn |
| distribution/ˌdɪstrɪˈbjuːʃn/ | 分布 | fēn bù |
| variable/ˈveərɪəbl/ | 变量 | biàn liàng |
| hypotheses | 假设 | jiǎ shè |
| populations | 总体 | zǒng tǐ |
| categorical variable/ˌkætɪˈɡɒrɪkl ˈveərɪəbl/ | 分类变量 | fēn lèi biàn liàng |
| association/əˌsəʊsɪˈeɪʃn/ | 关联 | guān lián |
| expected count/ekˈspektɪd kaʊnt/ | 期望频数 | qī wàng pín shù |
| Degrees of freedom/dɪˈɡriːz ɒv ˈfriːdəm/ | 自由度 | zì yóu dù |
| chi-square statistic/kaɪ skweə stəˈtɪstɪk/ | 卡方统计量 | kǎ fāng tǒng jì liàng |
| random sample/ˈrændəm ˈsæmpl/ | 随机样本 | suí jī yàng běn |
齐性与独立性
- 两者都使用双向列联表和相同的卡方计算——设计将它们区分开。
- 齐性:对几个组分别抽样;它们的某一个变量是否具有相同的分布?
- 独立性:对一个样本记录两个变量;这两个变量是否相关?
- 计算相同,但问题和假设不同。
齐性检验
- 当你从不同总体或组中分别抽取样本时使用。
- $H_0$:该分类变量的分布在所有组中相同。
- $H_a$:至少一个组的分布不同。
- 例如:三所学校学生最爱运动的分布是否相同?

齐性检验比较不同总体中一个变量的分布;独立性检验考察一个样本中的两个变量
独立性检验
- 当你抽取一个样本并记录两个分类变量时使用。
- $H_0$:两个变量独立(无关联)。
- $H_a$:两个变量相关联。
- 例如:在一次调查中,性别和惯用手是否相关?
条件与期望频数
- 两者的条件相同:随机、10%、每个期望频数 $\ge 5$。
- 期望频数使用相同的 $\frac{(\text{row})(\text{col})}{\text{grand total}}$ 公式。
- 自由度:$(\text{rows}-1)(\text{columns}-1)$,与 8.4 相同。
- 两种检验之间只有 $H_0/H_a$ 的措辞不同。
齐性与独立性的区分由设计决定,而非计算。比较几个分别抽样的组在一个变量上的分布 → 齐性。按两个变量对一个样本分类 → 独立性。卡方统计量、期望频数和 $df$ 完全相同——只有假设和结论的措辞不同。

两项研究,看起来相同的 $2\times3$ 表:
- 分别抽样 $100$ 个男生和 $100$ 个女生,记录最爱科目 → 齐性(两组分布是否相同?)。
- 一次性调查 $200$ 人,记录性别和科目 → 独立性(两者是否相关?)。

卡方齐性检验和独立性检验使用相同的计算,但根据设计区分:齐性检验比较几个分别抽取的样本中一个变量的分布;独立性检验考察一个样本中的两个变量是否相关。两者都要检查随机、**10%和每个期望频数 $\ge 5$**这三个条件。
根据这个情境写出
- 从人群中随机抽取一个样本,询问两个分类变量。
- 问题是这两个变量是否相关。
One random sample of people records two categorical variables. To assess association between them, which chi-square test fits?
One sample measuring two categorical variables gives an independence question; two categories of a single variable do not.
Which chi-square test assesses association between two categorical variables recorded in one random sample?
难度 1/5 · 今日首次完成可获 100 金币及少量额外奖励
The design is one sample measuring two variables.
One group's category distribution
Homogeneity asks if this distribution is the same across groups.
You sample 100 boys and 100 girls SEPARATELY and compare favorite subject. This is a test of...
难度 1/5 · 今日首次完成可获 100 金币及少量额外奖励
Several separate samples compared on one variable → homogeneity.
You survey ONE sample of 200 people, recording gender AND handedness. This is a test of...
难度 1/5 · 今日首次完成可获 100 金币及少量额外奖励
One sample, two variables → independence.
Homogeneity and independence tests use the same chi-square statistic and expected-count formula.
难度 1/5 · 今日首次完成可获 100 金币及少量额外奖励
Only the hypotheses/design differ; the math is identical.
What decides whether a two-way chi-square test is homogeneity or independence?
难度 1/5 · 今日首次完成可获 100 金币及少量额外奖励
Design decides it — several samples vs. one sample.
A test of ___ checks whether two variables in one sample are related (one word).
难度 1/5 · 今日首次完成可获 100 金币及少量额外奖励
Independence: one sample, two variables.
出了什么问题?只有网站团队能看到这些信息。