Carrying Out a Two-Way Chi-Square Test · 执行双向卡方检验
Compute the statistic
- The chi-square statistic is the same sum over every cell of the table:
-
$$\chi^2 = \sum \frac{(\text{observed} - \text{expected})^2}{\text{expected}}$$
- Use each cell's observed count and its expected count from 8.4.
- Add all the cell terms into one $\chi^2$.
计算统计量
- 卡方统计量是对表格每个单元格的同一个求和:
-
$$\chi^2 = \sum \frac{(\text{observed} - \text{expected})^2}{\text{expected}}$$
- 用每个单元格的观察计数和它来自 8.4 的期望计数。
- 把所有单元格项加成一个 $\chi^2$。
Find the p-value
- Use the chi-square distribution with $df = (\text{rows}-1)(\text{columns}-1)$.
- The p-value is the right-tail area beyond your $\chi^2$.
- A large $\chi^2$ → small p-value → strong evidence against $H_0$.
- Get the correct $df$ from the table's shape, not the sample size.
求 p 值
- 使用 $df = (\text{rows}-1)(\text{columns}-1)$ 的卡方分布。
- p 值是超过你的 $\chi^2$ 的右尾面积。
- 大的 $\chi^2$ → 小的 p 值 → 反对 $H_0$ 的强证据。
- 从表的形状取得正确 $df$,而非样本量。
Make a decision
- Compare the p-value to $\alpha$:
- p $\le \alpha$ → reject $H_0$; p $> \alpha$ → fail to reject.
- Reject: the groups differ (homogeneity) or the variables are associated (independence).
- Fail to reject: not convincing evidence of a difference/association.
做出决策
- 把 p 值与 $\alpha$ 比较:
- p $\le \alpha$ → 拒绝 $H_0$;p $> \alpha$ → 不拒绝。
- 拒绝:各组不同(齐性)或变量相关联(独立性)。
- 不拒绝:没有令人信服的差异/关联证据。
Conclude in context
- For homogeneity: "convincing evidence the distributions differ across the groups" (if rejected).
- For independence: "convincing evidence the two variables are associated" (if rejected).
- Name the variables/groups and the actual context.
- Failing to reject never proves the groups are the same / variables independent.
结合语境下结论
- 对齐性:“有令人信服的证据表明各组的分布不同”(若拒绝)。
- 对独立性:“有令人信服的证据表明两个变量相关联”(若拒绝)。
- 点明变量/组以及实际语境。
- 不拒绝永远不能证明各组相同 / 变量独立。
Word the conclusion to match the test. Reject in a homogeneity test → the group distributions differ; reject in an independence test → the variables are associated. Don't say "the variables are related" for a homogeneity design, or "the groups differ" for an independence design — the math is shared but the claim is not.
让结论的措辞匹配检验。在齐性检验中拒绝 → 各组分布不同;在独立性检验中拒绝 → 变量相关联。不要对齐性设计说“变量相关”,也不要对独立性设计说“各组不同”——数学是共享的,但主张不是。
A $2\times2$ independence test gives $\chi^2 = 6.0$, $df = 1$, $\alpha = 0.05$.
- p-value: right-tail area beyond $6.0$ at $df=1 \approx 0.014$.
- Decide: $0.014 \le 0.05$ → reject $H_0$.
- Conclude: convincing evidence the two variables are associated (in context).
一个 $2\times2$ 独立性检验给出 $\chi^2 = 6.0$,$df = 1$,$\alpha = 0.05$。
- p 值:$df=1$ 时超过 $6.0$ 的右尾面积 $\approx 0.014$。
- 决策:$0.014 \le 0.05$ → 拒绝 $H_0$。
- 结论:有令人信服的证据表明两个变量相关联(结合语境)。
Compute $\chi^2 = \sum \frac{(\text{observed}-\text{expected})^2}{\text{expected}}$ over all cells, find the right-tail p-value at $df = (\text{rows}-1)(\text{columns}-1)$, and compare to $\alpha$. Word the conclusion to match the design: distributions differ (homogeneity) or variables associated (independence), in context.
对所有单元格计算 $\chi^2 = \sum \frac{(\text{observed}-\text{expected})^2}{\text{expected}}$,在 $df = (\text{rows}-1)(\text{columns}-1)$ 处求右尾 p 值,并与 $\alpha$ 比较。让结论匹配设计:分布不同(齐性)或变量相关联(独立性),结合语境。
The right-tailed chi-square area · 右尾卡方面积
The p-value is the right-tail area at df = (r−1)(c−1). · p 值是 df = (r−1)(c−1) 处的右尾面积。
With χ² = 6.0 at df = 1, the p-value ≈ 0.014. At α = 0.05, the decision is... · χ² = 6.0、df = 1 时 p 值 ≈ 0.014。在 α = 0.05 下,决策是……
0.014 ≤ 0.05 → reject H0. · 0.014 ≤ 0.05 → 拒绝 H0。
Rejecting H0 in a test of INDEPENDENCE means... · 在独立性检验中拒绝 H0 意味着……
Independence: reject → the variables are associated. · 独立性:拒绝 → 变量相关联。
Rejecting H0 in a test of HOMOGENEITY means... · 在齐性检验中拒绝 H0 意味着……
Homogeneity: reject → the group distributions differ. · 齐性:拒绝 → 各组分布不同。
The p-value for a two-way chi-square test is a right-tail area. · 双向卡方检验的 p 值是一块右尾面积。
Chi-square is always right-tailed. · 卡方永远是右尾的。
For a 3×4 two-way table, find the degrees of freedom (r−1)(c−1). · 对一个 3×4 双向表,求自由度 (r−1)(c−1)。
(3−1)(4−1) = 2×3 = 6. · (3−1)(4−1) = 2×3 = 6。