Unit 11: Solutions单元 11:详解
Inference for Categorical Data: Chi-Square分类数据的推断:卡方检验
All datasets, counts, probabilities and study scenarios here are synthetic illustrative teaching examples. They are not reports of actual research. Choose the most defensible statistical statement and justify free responses in context.本页全部数据、计数、概率与研究情景均为合成教学示例,不是真实研究报告。选择最有统计依据的陈述,简答应结合情景论证。
Part I: Multiple Choice Solutions第一部分:选择题详解
expected count)都是 17.5。观测计数(observed count)为 12、18、25 和 15。卡方统计量(chi-square statistic) $\chi^2=\sum\frac{(O-E)^2}{E}$ 的值是多少?Reasoning推理1 point1 分
Each category contributes $\frac{(O-E)^2}{E}$ with $E=17.5$: $\frac{(12-17.5)^2}{17.5}=1.729$, $\frac{(18-17.5)^2}{17.5}=0.014$, $\frac{(25-17.5)^2}{17.5}=3.214$, $\frac{(15-17.5)^2}{17.5}=0.357$. Adding gives $\chi^2=5.314\approx5.31$.每个类别的贡献为 $\frac{(O-E)^2}{E}$,其中 $E=17.5$:$\frac{(12-17.5)^2}{17.5}=1.729$,$\frac{(18-17.5)^2}{17.5}=0.014$,$\frac{(25-17.5)^2}{17.5}=3.214$,$\frac{(15-17.5)^2}{17.5}=0.357$。相加得 $\chi^2=5.314\approx5.31$。
- Divides each squared difference by the observed count $O$ instead of the expected count $E$: $\frac{30.25}{12}+\frac{0.25}{18}+\frac{56.25}{25}+\frac{6.25}{15}=5.20$.把每个平方差除以观测计数 $O$ 而不是期望计数 $E$:$\frac{30.25}{12}+\frac{0.25}{18}+\frac{56.25}{25}+\frac{6.25}{15}=5.20$。
- Drops the square and adds the sizes of the differences over $E$: $\frac{5.5+0.5+7.5+2.5}{17.5}=0.91$. Without the square the signed differences cancel to 0.漏掉平方,只把差的大小除以 $E$ 后相加:$\frac{5.5+0.5+7.5+2.5}{17.5}=0.91$。不平方时带符号的差会相互抵消为 0。
- Correct: the four contributions add to 5.314.正确:四项贡献之和为 5.314。
- Adds the squared differences and never divides by $E$: $30.25+0.25+56.25+6.25=93.0$.把平方差直接相加而没有除以 $E$:$30.25+0.25+56.25+6.25=93.0$。
██
████
█████
██████
████████
█████████
████████████
████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓
+---+---+---+---+---+---+---+--
0 2 4 6 8 10 12 14
^ 8.2Which statement is a correct interpretation of 0.042?goodness of fit)检验得到 $\chi^2=8.20$。图中是自由度(degrees of freedom)为 3 的卡方分布。阴影区域(▓)是 8.20 右侧的面积,该面积为 0.042。 ██
████
█████
██████
████████
█████████
████████████
████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓
+---+---+---+---+---+---+---+--
0 2 4 6 8 10 12 14
^ 8.2下列哪项对 0.042 的解释是正确的?Reasoning推理1 point1 分
The p-value is the area to the right of the observed statistic, computed assuming $H_0$ is true: $\chi^2\text{cdf}(8.20,\,1E99,\,3)=0.042$. It is the chance, under the claimed distribution, of a statistic at least as large as the one observed.p 值是观测统计量右侧的面积,并且是在假定 $H_0$ 成立时计算的:$\chi^2\text{cdf}(8.20,\,1E99,\,3)=0.042$。它是在给定分布成立的前提下,得到不小于观测值的统计量的概率。
- Turns the p-value into the probability that the null hypothesis is true. The area is computed assuming $H_0$ is true, so it cannot be the chance that $H_0$ is true.把 p 值当成原假设为真的概率。该面积是在假定 $H_0$ 成立时算出的,不可能是 $H_0$ 为真的概率。
- Correct: a right-tail area computed under $H_0$.正确:在 $H_0$ 下计算的右尾面积。
- Mistakes an area under the curve for a share of individuals. The curve describes the statistic over many samples, not the people in this sample.把曲线下的面积当成个体所占的比例。曲线描述的是多次抽样得到的统计量,而不是这个样本里的人。
- Uses the wrong tail: the area to the left of 8.20 is $1-0.042=0.958$, and a chi-square p-value is never a left-tail area.用错了尾部:8.20 左侧的面积是 $1-0.042=0.958$,卡方检验的 p 值从来不是左尾面积。
goodness of fit)检验得到 $\chi^2=9.2$。哪个计算器命令能给出 p 值?Reasoning推理1 point1 分
The p-value is the right-tail area, so the lower bound is the statistic and the upper bound is a huge number. With $k=5$ categories, $\text{df}=k-1=4$, so the command is $\chi^2\text{cdf}(9.2,\,1E99,\,4)=0.056$.p 值是右尾面积,所以下限取统计量,上限取一个很大的数。$k=5$ 个类别时 $\text{df}=k-1=4$,命令为 $\chi^2\text{cdf}(9.2,\,1E99,\,4)=0.056$。
- Finds the left-tail area: $\chi^2\text{cdf}(0,9.2,4)=0.944$, which is $1-p$.求的是左尾面积:$\chi^2\text{cdf}(0,9.2,4)=0.944$,等于 $1-p$。
- Doubles the tail as for a two-sided z or t test, giving 0.113. A chi-square test has no two-sided version.像双侧 z 或 t 检验那样把尾部面积加倍,得到 0.113。卡方检验没有双侧版本。
- Uses $\text{df}=k=5$ instead of $k-1=4$, which gives 0.101.用 $\text{df}=k=5$ 而不是 $k-1=4$,得到 0.101。
- Correct: right tail, $\text{df}=4$, value 0.056.正确:右尾,$\text{df}=4$,值为 0.056。
Reasoning推理1 point1 分
The mean of a chi-square distribution is its df, so compare the statistic with the mean of its own curve. Test A: the mean is 2, and $\frac{9.0}{2}=4.5$ times the mean puts the statistic far out in the right tail. Test B: the mean is 8, and $\frac{9.0}{8}=1.125$ times the mean is only slightly above the middle of the curve, which is typical. A statistic that is typical has a large right-tail area and one far out has a small area, so Test B has the larger p-value (about 0.342, against about 0.011 for Test A).卡方分布的均值等于自由度(degrees of freedom),所以要把统计量与它自己那条曲线的均值比较。检验 A:均值为 2,$\frac{9.0}{2}=4.5$ 倍于均值,统计量位于右尾很远处。检验 B:均值为 8,$\frac{9.0}{8}=1.125$ 倍于均值,只略高于曲线的中部,属于典型值。典型的统计量右尾面积大,远在尾部的统计量面积小,所以检验 B 的 p 值更大(约 0.342,检验 A 约 0.011)。
- Correct: compare the statistic with the mean df of each curve.正确:把统计量与每条曲线的均值(即自由度)比较。
- Reverses the comparison: with $\text{df}=2$ the p-value is about 0.011, much smaller than 0.342 for $\text{df}=8$.把比较方向弄反了:$\text{df}=2$ 时 p 值约为 0.011,远小于 $\text{df}=8$ 时的 0.342。
- Treats the statistic alone as the evidence. The same $\chi^2$ is ordinary on one curve and extreme on another, so the df must be reported with it.只看统计量本身。同一个 $\chi^2$ 在一条曲线上很普通,在另一条上却很极端,所以必须同时给出自由度。
- The sample size enters only through the statistic. Once $\chi^2$ and df are known, the p-value is fixed.样本量只通过统计量起作用。已知 $\chi^2$ 与自由度后,p 值就确定了。
Reasoning推理1 point1 分
Expected counts come from the claimed percentages and the sample size: $150(0.50)=75$, $150(0.30)=45$, $150(0.20)=30$. Then $\chi^2=\frac{(82-75)^2}{75}+\frac{(41-45)^2}{45}+\frac{(27-30)^2}{30}=0.653+0.356+0.300=1.309\approx1.31$.期望计数(expected count)由给定百分比与样本量得到:$150(0.50)=75$,$150(0.30)=45$,$150(0.20)=30$。于是 $\chi^2=\frac{(82-75)^2}{75}+\frac{(41-45)^2}{45}+\frac{(27-30)^2}{30}=0.653+0.356+0.300=1.309\approx1.31$。
- Uses the percentages 50, 30 and 20 as if they were expected counts: $\frac{32^2}{50}+\frac{11^2}{30}+\frac{7^2}{20}=26.96$. Expected counts are $np$, not $100p$.把百分数 50、30、20 当成期望计数:$\frac{32^2}{50}+\frac{11^2}{30}+\frac{7^2}{20}=26.96$。期望计数是 $np$,而不是 $100p$。
- Adds the squared differences and never divides by $E$: $49+16+9=74$.把平方差直接相加而没有除以 $E$:$49+16+9=74$。
- Drops the squares and adds the sizes of the differences over $E$: $\frac{7}{75}+\frac{4}{45}+\frac{3}{30}=0.28$.漏掉平方,只把差的大小除以 $E$ 后相加:$\frac{7}{75}+\frac{4}{45}+\frac{3}{30}=0.28$。
- Correct: 1.309, with expected counts 75, 45 and 30.正确:1.309,期望计数为 75、45、30。
| Category | Claimed percent | Observed count |
|---|---|---|
| A | 35% | 62 |
| B | 25% | 58 |
| C | 20% | 36 |
| D | 15% | 32 |
| E | 5% | 12 |
| 类别 | 声称的百分比 | 观测计数(observed count) |
|---|---|---|
| A | 35% | 62 |
| B | 25% | 58 |
| C | 20% | 36 |
| D | 15% | 32 |
| E | 5% | 12 |
Reasoning推理1 point1 分
Expected counts are $200p$: 70, 50, 40, 30 and 10. The contributions are $\frac{(62-70)^2}{70}=0.914$, $\frac{(58-50)^2}{50}=1.280$, $\frac{(36-40)^2}{40}=0.400$, $\frac{(32-30)^2}{30}=0.133$ and $\frac{(12-10)^2}{10}=0.400$, so $\chi^2=3.128$. Category B is largest, at 1.28.期望计数(expected count)为 $200p$:70、50、40、30、10。各项贡献为 $\frac{(62-70)^2}{70}=0.914$,$\frac{(58-50)^2}{50}=1.280$,$\frac{(36-40)^2}{40}=0.400$,$\frac{(32-30)^2}{30}=0.133$,$\frac{(12-10)^2}{10}=0.400$,所以 $\chi^2=3.128$。类别 B 最大,为 1.28。
- A and B are both off by 8, but A expects 70 and B expects 50. Dividing by the smaller $E$ makes B's contribution larger: $\frac{64}{70}=0.91$ against $\frac{64}{50}=1.28$.A 与 B 都偏离 8,但 A 的期望是 70,B 的期望是 50。除以较小的 $E$ 使 B 的贡献更大:$\frac{64}{70}=0.91$,$\frac{64}{50}=1.28$。
- Correct: B contributes 1.28 of the total 3.13.正确:B 贡献了总和 3.13 中的 1.28。
- E has the largest percentage error (20%), which is tempting, but its difference of 2 gives only $\frac{4}{10}=0.40$.E 的相对误差最大(20%),这很有迷惑性,但它的差只有 2,贡献仅为 $\frac{4}{10}=0.40$。
- Names the right category but reports the raw difference $O-E=8$ instead of $\frac{(O-E)^2}{E}$.类别选对了,但报告的是原始差 $O-E=8$,而不是 $\frac{(O-E)^2}{E}$。
goodness of fit)检验的大计数条件(large-counts condition),下列哪项正确?Reasoning推理1 point1 分
The condition is about expected counts $np_i$, not observed counts. Here they are $40(0.50)=20$, $40(0.30)=12$, $40(0.15)=6$ and $40(0.05)=2$. The last is below 5, so the condition fails and the chi-square test is not valid as set up (a larger sample or a combined category would fix it).这个条件针对的是期望计数(expected count) $np_i$,而不是观测计数(observed count)。这里分别为 $40(0.50)=20$,$40(0.30)=12$,$40(0.15)=6$,$40(0.05)=2$。最后一个小于 5,条件不满足,按现在的设置卡方检验无效(增大样本或合并类别可以解决)。
- Checks the observed counts (18, 10, 7, 5), which are all at least 5. The condition is on the expected counts, and a test can fail it even when every observed count looks large.检查的是观测计数(18、10、7、5),它们都不小于 5。条件针对期望计数,即使每个观测计数看起来都很大,检验仍可能不满足条件。
- Imports the $n\ge30$ rule of thumb for means. For counts, what matters is each expected count, not the total sample size.搬来了均值的 $n\ge30$ 经验规则。对计数而言,要看的是每个期望计数,而不是总样本量。
- Correct: the water expected count is 2.正确:水的期望计数为 2。
- Misreads the 10% condition. A sample smaller than 10% of the population satisfies it, so this is not a failure.误读了 10% 条件。样本小于总体的 10% 恰好满足该条件,不是不满足。
expected count)都是 15。步骤 2:观测计数(observed count)为 22、10、18、9、17、14,所以 $\chi^2=\sum\frac{(O-E)^2}{E}=8.27$。步骤 3:$\text{df}=n-1=89$。步骤 4:p 值 $=\chi^2\text{cdf}(8.27,\,1E99,\,89)\approx1.000$,所以没有证据反对 $H_0$。第一个出错的是哪一步?Reasoning推理1 point1 分
Step 1 is right: the null says all six snacks have proportion $\frac16$ and $90\cdot\frac16=15$. Step 2 is right: the contributions are 3.267, 1.667, 0.600, 2.400, 0.267 and 0.067, which add to 8.27. Step 3 is the first error: for goodness of fit $\text{df}=k-1=6-1=5$, the number of categories minus one, not $n-1$. With the correct df, the p-value is $\chi^2\text{cdf}(8.27,\,1E99,\,5)=0.142$.步骤 1 正确:原假设(null hypothesis)是六种零食的比例都为 $\frac16$,且 $90\cdot\frac16=15$。步骤 2 正确:各项贡献为 3.267、1.667、0.600、2.400、0.267、0.067,和为 8.27。步骤 3 是第一处错误:拟合优度(goodness of fit)检验的 $\text{df}=k-1=6-1=5$,即类别数减一,而不是 $n-1$。用正确的自由度(degrees of freedom),p 值为 $\chi^2\text{cdf}(8.27,\,1E99,\,5)=0.142$。
- Step 1 is correct, so it is not the first error.步骤 1 是对的,所以不是第一处错误。
- Step 2 recomputes to 8.27, so it is correct.步骤 2 重新计算后确为 8.27,是对的。
- Correct: the degrees of freedom are $k-1=5$. Using $n-1=89$ pushes the curve so far to the right that any statistic gives a p-value near 1.正确:自由度应为 $k-1=5$。用 $n-1=89$ 会使曲线整体右移,几乎任何统计量的 p 值都接近 1。
- Step 4 uses the right method (a right-tail area) with the df it was given. The mistake it inherits comes from Step 3. Here the corrected p-value 0.142 still gives no convincing evidence, but the work would have been wrong.步骤 4 的方法(右尾面积)和它所用的自由度是一致的,它的错误来自步骤 3。这里改正后的 p 值 0.142 仍然是没有令人信服的证据,但过程依然是错的。
A ████████████████ 33 B ██████████████ 28 C █████████████████████████ 50 D ██████████ 19 E ██████████ 20 Each block is about 2 orders; expected count = 30 for every flavorWhich statement is best supported?
observed count)如图。卡方拟合优度(goodness of fit)检验得到 $\chi^2=21.13$,$\text{df}=4$,p 值 $=0.0003$。A ████████████████ 33
B ██████████████ 28
C █████████████████████████ 50
D ██████████ 19
E ██████████ 20
每格约 2 单;每种口味的期望计数(expected count) E = 30下列哪项陈述得到最好的支持?Reasoning推理1 point1 分
Expected count is $150\cdot\frac15=30$ for each flavor. Contributions: A 0.300, B 0.133, C $\frac{(50-30)^2}{30}=13.333$, D $\frac{(19-30)^2}{30}=4.033$, E 3.333; they add to 21.13. The p-value 0.0003 is below any usual $\alpha$, so we reject $H_0$. Flavor C supplies $\frac{13.33}{21.13}=63\%$ of the statistic, and its observed count is far above expected. The test alone gives no direction; the counts do.每种口味的期望计数为 $150\cdot\frac15=30$。各项贡献:A 0.300,B 0.133,C $\frac{(50-30)^2}{30}=13.333$,D $\frac{(19-30)^2}{30}=4.033$,E 3.333;总和为 21.13。p 值 0.0003 小于常用的 $\alpha$,所以拒绝 $H_0$。口味 C 提供了统计量的 $\frac{13.33}{21.13}=63\%$,观测计数远高于期望。检验本身不给方向,方向要靠计数。
- Correct: reject, and C drives the result.正确:拒绝 $H_0$,且 C 是造成结果的主要原因。
- Rejecting $H_0$ only says at least one flavor differs. A (33), B (28), D (19) and E (20) are each within 11 of 30 and contribute little.拒绝 $H_0$ 只说明至少有一种口味不同。A(33)、B(28)、D(19)、E(20)都在 30 的 11 以内,贡献很小。
- The smallest count is not the largest contribution. D contributes 4.03, while C, with the largest count, contributes 13.33. A contribution depends on $(O-E)^2$, so a large excess counts as much as a large shortfall.最小的计数并不是最大的贡献。D 的贡献为 4.03,而计数最大的 C 贡献 13.33。贡献取决于 $(O-E)^2$,所以大幅偏多与大幅偏少的作用一样。
- Ignores the p-value: 0.0003 is far below 0.05, so the test rejects. One large deviation is enough to give a large $\chi^2$.忽略了 p 值:0.0003 远小于 0.05,检验应当拒绝。只要有一个很大的偏差,就足以使 $\chi^2$ 很大。
| Online | Paper | Total | |
|---|---|---|---|
| Sophomores | 66 | 54 | 120 |
| Juniors | 24 | 56 | 80 |
| Total | 90 | 110 | 200 |
| 线上 | 纸质 | 合计 | |
|---|---|---|---|
| 高二 | 66 | 54 | 120 |
| 高三 | 24 | 56 | 80 |
| 合计 | 90 | 110 | 200 |
expected count)是多少?Reasoning推理1 point1 分
$E=\frac{(\text{row total})(\text{column total})}{\text{table total}}=\frac{(120)(90)}{200}=54$.$E=\frac{(\text{row total})(\text{column total})}{\text{table total}}=\frac{(120)(90)}{200}=54$。
- Reports the observed count 66 from the cell. An expected count is built from the margins, not read from the table body.报告的是该单元格的观测计数 66。期望计数由边际合计得到,不是直接读表中的数。
- Correct: $\frac{(120)(90)}{200}=54$.正确:$\frac{(120)(90)}{200}=54$。
- Splits the column total 90 evenly between two rows, $\frac{90}{2}=45$. That ignores that 120 sophomores were sampled and only 80 juniors.把列合计 90 平均分给两行,$\frac{90}{2}=45$。这忽略了抽到的高二有 120 人而高三只有 80 人。
- Multiplies two proportions, $\frac{120}{200}\cdot\frac{90}{200}=0.27$. That is a probability; multiply it by 200 to get a count.把两个比例相乘,$\frac{120}{200}\cdot\frac{90}{200}=0.27$。这是概率,乘以 200 才得到计数。
two-way table)中,第 2 行合计为 84,第 3 列合计为 130,表总计为 300。第 2 行第 3 列的观测计数(observed count)为 45。该单元格对 $\chi^2$ 的贡献 $\frac{(O-E)^2}{E}$ 是多少?Reasoning推理1 point1 分
$E=\frac{(84)(130)}{300}=36.4$. The contribution is $\frac{(45-36.4)^2}{36.4}=\frac{73.96}{36.4}=2.032\approx2.03$.$E=\frac{(84)(130)}{300}=36.4$。贡献为 $\frac{(45-36.4)^2}{36.4}=\frac{73.96}{36.4}=2.032\approx2.03$。
- Divides by the observed count: $\frac{73.96}{45}=1.64$. The denominator is the expected count.除以了观测计数:$\frac{73.96}{45}=1.64$。分母应是期望计数。
- Leaves out the square: $\frac{|45-36.4|}{36.4}=\frac{8.6}{36.4}=0.24$.漏掉平方:$\frac{|45-36.4|}{36.4}=\frac{8.6}{36.4}=0.24$。
- Builds $E$ with the wrong denominator, $\frac{(84)(130)}{84+130}=51.03$, then $\frac{(45-51.03)^2}{51.03}=0.71$. The divisor is the table total 300.期望计数的分母用错了,$\frac{(84)(130)}{84+130}=51.03$,再得 $\frac{(45-51.03)^2}{51.03}=0.71$。除数应是表总计 300。
- Correct: $E=36.4$ and the contribution is 2.03.正确:$E=36.4$,贡献为 2.03。
independence)检验。参加社团的高三学生的期望计数(expected count)为 18.4。18.4 是什么意思?Reasoning推理1 point1 分
An expected count is computed assuming the null hypothesis. For a test of independence, it is the count the cell would hold, on average, if the two variables had no association: row total times column total over 230. It is not an observed count and it need not be a whole number.期望计数是在假定原假设(null hypothesis)成立时算出的。对独立性检验,它是两个变量没有关联时该单元格平均应有的计数:行合计乘列合计再除以 230。它不是观测计数(observed count),也不必是整数。
- Confuses expected with observed. The observed count is what was seen, and the gap between the two is what the test examines.把期望计数与观测计数混为一谈。观测计数是实际看到的,检验考察的正是二者之间的差距。
- Treats a count as a percentage. A count of 18.4 out of 230 would be 8%, not 18.4%.把计数当成百分比。230 人中的 18.4 人只占 8%,而不是 18.4%。
- Correct: the count under the independence model.正确:独立模型下的计数。
- Reads the expected count as the difference $O-E$. The expected count is the count under independence itself, $E=\frac{(\text{row total})(\text{column total})}{230}=18.4$; the difference $O-E$ needs an observed count, and it is the quantity that gets squared and divided by $E$ to give the contribution $\frac{(O-E)^2}{E}$.把期望计数读成差 $O-E$。期望计数就是独立模型下的计数本身,$E=\frac{(\text{row total})(\text{column total})}{230}=18.4$;差 $O-E$ 需要观测计数,它要先平方再除以 $E$,才得到贡献 $\frac{(O-E)^2}{E}$。
| Poor | Fair | Good | Total | |
|---|---|---|---|---|
| Program 1 | 3 | 17 | 40 | 60 |
| Program 2 | 9 | 21 | 30 | 60 |
| Total | 12 | 38 | 70 | 120 |
| 较差 | 一般 | 良好 | 合计 | |
|---|---|---|---|---|
| 计划 1 | 3 | 17 | 40 | 60 |
| 计划 2 | 9 | 21 | 30 | 60 |
| 合计 | 12 | 38 | 70 | 120 |
homogeneity)检验,因为有一个观测计数(observed count) 3 小于 5。下列哪项正确?Reasoning推理1 point1 分
The expected counts are $\frac{(60)(12)}{120}=6$, $\frac{(60)(38)}{120}=19$ and $\frac{(60)(70)}{120}=35$ in each row. The smallest is 6, so every expected count is at least 5 and the condition is met. A small observed count is allowed; what matters is the expected count. Random assignment replaces the 10% condition, but not the large-counts condition.每一行的期望计数(expected count)为 $\frac{(60)(12)}{120}=6$,$\frac{(60)(38)}{120}=19$,$\frac{(60)(70)}{120}=35$。最小的是 6,所以每个期望计数都不小于 5,条件满足。观测计数可以很小;要看的是期望计数。随机分配取代的是 10% 条件,而不是大计数条件(large-counts condition)。
- Applies the condition to the observed counts. Here the observed 3 sits in a cell whose expected count is 6.把条件用在了观测计数上。这里观测值 3 所在单元格的期望计数是 6。
- Invents a rule about the table total. The requirement is on every expected count, whatever the total.凭空造了一条关于表总计的规则。要求针对的是每个期望计数,与总数无关。
- Mixes up two conditions. Random assignment means the 10% condition is not needed, but every expected count must still be at least 5.混淆了两个条件。随机分配意味着不需要 10% 条件,但每个期望计数仍必须不小于 5。
- Correct: smallest expected count 6.正确:最小期望计数为 6。
expected count)是多少?Reasoning推理1 point1 分
$E=\frac{(\text{row total})(\text{column total})}{\text{table total}}=\frac{(n)(m)}{2n}=\frac{m}{2}$. The two equal samples share the yes answers equally under the null hypothesis.$E=\frac{(\text{row total})(\text{column total})}{\text{table total}}=\frac{(n)(m)}{2n}=\frac{m}{2}$。在原假设(null hypothesis)下,两个相同大小的样本平均分摊“是”的回答。
- Divides by the row total $n$ instead of the table total $2n$: $\frac{nm}{n}=m$. That would give School 1 all the yes answers.除以的是行合计 $n$ 而不是表总计 $2n$:$\frac{nm}{n}=m$。这等于把所有“是”都给了学校 1。
- Correct: $\frac{nm}{2n}=\frac{m}{2}$.正确:$\frac{nm}{2n}=\frac{m}{2}$。
- Multiplies the margins and never divides by the table total.把两个边际合计相乘后没有除以表总计。
- Gives the overall proportion of yes answers, $\frac{m}{2n}$, which is not a count. Multiply by the row total $n$ to get the count.给出的是“是”的总体比例 $\frac{m}{2n}$,不是计数。乘以行合计 $n$ 才得到计数。
| Yes | No | Total | |
|---|---|---|---|
| Group A | ? | ? | 45 |
| Group B | ? | ? | 105 |
| Total | ? | ? | 150 |
two-way table)只保留了行合计和表总计。组 A 回答“是”的期望计数(expected count)为 18。| 是 | 否 | 合计 | |
|---|---|---|---|
| 组 A | ? | ? | 45 |
| 组 B | ? | ? | 105 |
| 合计 | ? | ? | 150 |
Reasoning推理1 point1 分
Work backwards. Call the Yes column total $T_1$ and the No column total $T_2$. Then $18=\frac{(45)(T_1)}{150}$, so $T_1=\frac{18\cdot150}{45}=60$ and $T_2=150-60=90$. Then $E_{B,2}=\frac{(105)(90)}{150}=63$.倒推。把“是”一列的合计记为 $T_1$,“否”一列的合计记为 $T_2$。则 $18=\frac{(45)(T_1)}{150}$,所以 $T_1=\frac{18\cdot150}{45}=60$,$T_2=150-60=90$。于是 $E_{B,2}=\frac{(105)(90)}{150}=63$。
- Correct: column totals 60 and 90, then $\frac{(105)(90)}{150}=63$.正确:列合计 60 与 90,再算 $\frac{(105)(90)}{150}=63$。
- Gives the expected count for Group B and Yes, $\frac{(105)(60)}{150}=42$: the right row but the wrong column.给出的是组 B 回答“是”的期望计数,$\frac{(105)(60)}{150}=42$:行对了,列错了。
- Gives the expected count for Group A and No, $\frac{(45)(90)}{150}=27$: the right column but the wrong row.给出的是组 A 回答“否”的期望计数,$\frac{(45)(90)}{150}=27$:列对了,行错了。
- Stops at the No column total, 90, and never turns it into a cell count by multiplying by the row total over the table total.停在“否”的列合计 90,没有再乘行合计并除以表总计得到单元格计数。
degrees of freedom)是多少?Reasoning推理1 point1 分
There is one sample and two categorical variables measured on every voter, so this is a test of independence. The table has 4 region rows and 3 candidate columns, so $\text{df}=(4-1)(3-1)=6$.只有一个样本,且对每位选民测量了两个分类变量,所以是独立性(independence)检验。表有 4 个区域行、3 个候选人列,因此 $\text{df}=(4-1)(3-1)=6$。
- Names the wrong test. Homogeneity needs separate samples from several populations (or random assignment); here the region totals were not set by the researcher.检验名称选错了。同质性检验需要从多个总体分别抽样(或随机分配);这里各区域的人数不是研究者设定的。
- Right test, but multiplies the numbers of rows and columns, $4\cdot3=12$, instead of $(r-1)(c-1)$.检验选对了,但把行数与列数相乘 $4\cdot3=12$,而不是 $(r-1)(c-1)$。
- Correct: one sample, two variables, $\text{df}=(4-1)(3-1)=6$.正确:一个样本、两个变量,$\text{df}=(4-1)(3-1)=6$。
- Goodness of fit has one categorical variable compared with a claimed distribution. Two variables measured together call for a two-way table.拟合优度检验只有一个分类变量,并与给定分布比较。两个变量同时测量时要用双向表。
independence)检验得到 $\chi^2=11.4$,$\text{df}=2$,p 值 $=0.0033$。在 $\alpha=0.05$ 下,哪项结论最有依据?Reasoning推理1 point1 分
Because $0.0033\lt0.05$, we reject $H_0$: there is convincing evidence that neighborhood type and voting are associated for adults in this county. The data come from an observational survey, so the result shows an association only, with no direction and no cause. Rejecting says that at least one neighborhood type differs, not that all do.因为 $0.0033\lt0.05$,拒绝 $H_0$:有令人信服的证据表明该县成年人的居住地类型与是否投票有关联。数据来自观察性调查,结果只表明有关联,没有方向,也没有因果。拒绝只说明至少有一种居住地类型不同,并非全部不同。
- Claims a cause and a direction from an observational survey. A chi-square test shows association only.从观察性调查中断言因果和方向。卡方检验只能表明关联。
- Correct: an association in context, for the county's adults.正确:结合情境的关联结论,针对该县成年人。
- Reads the p-value as the probability that the null hypothesis is true. It is the chance of a result this extreme if independence were true.把 p 值读成原假设为真的概率。它是在独立成立时得到这样极端结果的概率。
- Over-reads a rejection. The alternative is that the variables are associated, which does not mean every neighborhood type has a different voting rate.过度解读了拒绝的结果。备择假设是变量有关联,并不意味着每种居住地类型的投票率都不同。
██
██
███
████
█████
██████
████████
████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
+---+---+---+---+---+---+--
0 2 4 6 8 10 12
^ 5.99A chi-square test of homogeneity on a table with 3 rows and 2 columns gives $\chi^2=5.99$. Consider three statements. I. The p-value is the shaded area, the area to the right of the test statistic. II. A larger test statistic, with the same degrees of freedom, would give a smaller p-value. III. Because the distributions could differ in either direction, the p-value must be doubled. Which statements must be true?degrees of freedom)为 2 的卡方分布。阴影区域(▓)是 $\chi^2=5.99$ 右侧的面积。██
██
███
████
█████
██████
████████
████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
+---+---+---+---+---+---+--
0 2 4 6 8 10 12
^ 5.99对一个 3 行 2 列的表进行卡方同质性(homogeneity)检验,得到 $\chi^2=5.99$。考虑三个陈述。I. p 值是阴影部分的面积,即检验统计量右侧的面积。II. 自由度相同时,更大的检验统计量会给出更小的 p 值。III. 由于各分布可能朝任一方向不同,p 值必须加倍。哪些陈述必然成立?Reasoning推理1 point1 分
The table has 3 rows and 2 columns, so $\text{df}=(3-1)(2-1)=2$, as in the graph. I is true: a chi-square p-value is the right-tail area, and $\chi^2\text{cdf}(5.99,\,1E99,\,2)=0.0500$. II is true: moving the statistic to the right shrinks the area beyond it. III is false: the statistic squares every difference, so it has no direction, and the test is already one-tailed by construction. The p-value is never doubled.表有 3 行 2 列,所以 $\text{df}=(3-1)(2-1)=2$,与图一致。I 成立:卡方检验的 p 值是右尾面积,且 $\chi^2\text{cdf}(5.99,\,1E99,\,2)=0.0500$。II 成立:统计量向右移动,其右侧面积变小。III 不成立:统计量对每个差都做了平方,没有方向,检验本来就只看右尾。p 值从不加倍。
- Correct: I and II are true, III is false.正确:I 与 II 成立,III 不成立。
- Misses II. A larger statistic lies farther into the tail, so the area to its right is smaller.漏掉了 II。更大的统计量更深入尾部,其右侧面积更小。
- Includes III and drops I. Doubling belongs to two-sided z or t tests, and the shaded area in the graph is exactly the p-value.含 III 而漏掉 I。加倍属于双侧 z 或 t 检验,而图中的阴影面积恰好就是 p 值。
- Includes III along with the two correct statements. A chi-square p-value is never doubled.在两个正确陈述之外又加上了 III。卡方检验的 p 值从不加倍。
| Passed | Did not pass | Total | |
|---|---|---|---|
| Section A | 36 | 14 | 50 |
| Section B | 22 | 28 | 50 |
| Total | 58 | 42 | 100 |
| 通过 | 未通过 | 合计 | |
|---|---|---|---|
| 班级 A | 36 | 14 | 50 |
| 班级 B | 22 | 28 | 50 |
| 合计 | 58 | 42 | 100 |
homogeneity)检验的卡方统计量(chi-square statistic)是多少?Reasoning推理1 point1 分
Expected counts are $\frac{(50)(58)}{100}=29$ and $\frac{(50)(42)}{100}=21$ in each row. Then $\chi^2=\frac{(36-29)^2}{29}+\frac{(14-21)^2}{21}+\frac{(22-29)^2}{29}+\frac{(28-21)^2}{21}=1.690+2.333+1.690+2.333=8.046\approx8.05$.每行的期望计数(expected count)为 $\frac{(50)(58)}{100}=29$ 与 $\frac{(50)(42)}{100}=21$。于是 $\chi^2=\frac{(36-29)^2}{29}+\frac{(14-21)^2}{21}+\frac{(22-29)^2}{29}+\frac{(28-21)^2}{21}=1.690+2.333+1.690+2.333=8.046\approx8.05$。
- Divides by the observed counts: $\frac{49}{36}+\frac{49}{14}+\frac{49}{22}+\frac{49}{28}=8.84$.除以的是观测计数:$\frac{49}{36}+\frac{49}{14}+\frac{49}{22}+\frac{49}{28}=8.84$。
- Takes every expected count to be 25, half of each row, ignoring the column totals: $\frac{121+121+9+9}{25}=10.40$.把每个期望计数都当成 25(每行的一半),忽略了列合计:$\frac{121+121+9+9}{25}=10.40$。
- Drops the squares: $\frac{7}{29}+\frac{7}{21}+\frac{7}{29}+\frac{7}{21}=1.15$.漏掉平方:$\frac{7}{29}+\frac{7}{21}+\frac{7}{29}+\frac{7}{21}=1.15$。
- Correct: four contributions add to 8.046.正确:四项贡献之和为 8.046。
| Study A | Yes | No | Total |
|---|---|---|---|
| Sample 1 | 40 | 60 | 100 |
| Sample 2 | 25 | 75 | 100 |
| Study B | Yes | No | Total |
|---|---|---|---|
| Sample 1 | 80 | 120 | 200 |
| Sample 2 | 50 | 150 | 200 |
homogeneity)检验判断人们是否回答“是”。研究 B 的样本比例与研究 A 相同,因为研究 B 的每个观测计数(observed count)都恰好是研究 A 对应计数的两倍。请从卡方统计量(chi-square statistic)的公式出发进行推理。| 研究 A | 是 | 否 | 合计 |
|---|---|---|---|
| 样本 1 | 40 | 60 | 100 |
| 样本 2 | 25 | 75 | 100 |
| 研究 B | 是 | 否 | 合计 |
|---|---|---|---|
| 样本 1 | 80 | 120 | 200 |
| 样本 2 | 50 | 150 | 200 |
Reasoning推理1 point1 分
Use the formula $\chi^2=\sum\frac{(O-E)^2}{E}$. Doubling every count doubles every expected count, so every squared difference becomes four times as large while the divisor only doubles, and each contribution doubles and $\chi^2_B=2\chi^2_A$. Both tables are 2 × 2, so $\text{df}=1$ for both. With the same df, a larger statistic gives a smaller p-value. Checking: $\chi^2_A=5.128$ (p-value $0.0235$) and $\chi^2_B=10.256$ (p-value $0.0014$).用公式 $\chi^2=\sum\frac{(O-E)^2}{E}$。把每个计数都翻倍,每个期望计数(expected count)也翻倍,每个平方差变为原来的 4 倍而除数只翻倍,所以每项贡献翻倍,$\chi^2_B=2\chi^2_A$。两个表都是 2 × 2,$\text{df}=1$。自由度(degrees of freedom)相同时,统计量越大,p 值越小。验算:$\chi^2_A=5.128$(p 值 $0.0235$),$\chi^2_B=10.256$(p 值 $0.0014$)。
- Treats the sample proportions as the whole story. The same difference in proportions is stronger evidence from larger samples.只看样本比例。相同的比例差异在更大的样本中是更强的证据。
- Right that the df match, wrong that the p-value stays put. With the same df, the p-value falls as the statistic grows.自由度相同这一点说对了,但 p 值不变是错的。自由度相同时,统计量越大,p 值越小。
- Correct: the statistic scales with the sample size when the proportions are fixed.正确:比例不变时,统计量随样本量成比例变大。
- Mixes up the variability of a sample statistic with the size of the test statistic. More data separates the groups more clearly, so $\chi^2$ grows.把样本统计量的变异与检验统计量的大小混在一起。数据越多,越能清楚地区分各组,所以 $\chi^2$ 变大。
Reasoning推理1 point1 分
There is one random sample, one categorical variable with two outcomes, and a claim about a single proportion $p$ with a one-sided alternative, $H_a:p\gt0.04$. That is a one-proportion $z$ test: $\hat p=\frac{29}{500}=0.058$, $z=\frac{0.058-0.04}{\sqrt{0.04(0.96)/500}}=2.05$, p-value $=0.020$.只有一个随机样本,一个有两种结果的分类变量,要检验关于单个比例 $p$ 的说法,且备择假设(alternative hypothesis)是单侧的 $H_a:p\gt0.04$。这是单比例 $z$ 检验:$\hat p=\frac{29}{500}=0.058$,$z=\frac{0.058-0.04}{\sqrt{0.04(0.96)/500}}=2.05$,p 值 $=0.020$。
- A two-category goodness-of-fit test squares the differences, so it cannot distinguish "greater than 4%" from "less than 4%". The question has a direction, so the $z$ test is needed.两类别的拟合优度检验对差做了平方,无法区分“大于 4%”与“小于 4%”。问题带有方向,所以要用 $z$ 检验。
- Correct: one proportion and a one-sided alternative.正确:单个比例且备择假设为单侧。
- Homogeneity compares distributions across several groups. There is only one sample here.同质性检验比较多个组的分布,而这里只有一个样本。
- A $t$ procedure is for the mean of a quantitative variable. Whether a part is defective is categorical.$t$ 过程用于定量变量的均值,而零件是否有缺陷是分类变量。
independence)检验,因为表有饮食和结果两个变量。步骤 2:$\text{df}=(3-1)(2-1)=2$。步骤 3:p 值很小,所以饮食 2 是最好的方案。第一个出错的是哪一步?Reasoning推理1 point1 分
Step 1 is the first error. The test is chosen by the design, not by the number of variables in the table. Volunteers were randomly assigned to three treatment groups of fixed size and one outcome was recorded, so this is a test of homogeneity: $H_0$ says the distribution of meeting or missing the goal is the same under all three diets. The df in Step 2 is right because homogeneity and independence share $(r-1)(c-1)$. Step 3 is also wrong, because a small p-value only says that at least one distribution differs, not which diet is best.步骤 1 是第一处错误。检验类型由设计决定,而不是由表里的变量个数决定。志愿者被随机分配到三个人数固定的处理组,并记录一个结果,所以这是同质性(homogeneity)检验:$H_0$ 说三种饮食下“达到/未达到目标”的分布相同。步骤 2 的自由度(degrees of freedom)是对的,因为同质性与独立性检验共用 $(r-1)(c-1)$。步骤 3 也有错:小的 p 值只说明至少有一个分布不同,并没有说明哪种饮食最好。
- The degrees of freedom are correct, $(3-1)(2-1)=2$, so this is not the first error.自由度是对的,$(3-1)(2-1)=2$,所以这不是第一处错误。
- This step is also wrong (a rejection does not name the best diet), but it comes after Step 1.这一步确实也有错(拒绝并没有指明最好的饮食),但它排在步骤 1 之后。
- Step 1 is not correct: a test of independence needs one sample with both variables measured on every individual.步骤 1 并不正确:独立性检验需要一个样本,并对每个个体测量两个变量。
- Correct: random assignment to groups with one outcome calls for homogeneity.正确:随机分配到各组且只测一个结果,应使用同质性检验。
Part II: Free Response Solutions第二部分:简答题详解
| Flavor | Claimed percent | Observed count |
|---|---|---|
| BBQ | 40% | 92 |
| Cheese | 30% | 66 |
| Plain | 20% | 62 |
| Spicy | 10% | 30 |
| 口味 | 声称的百分比 | 观测计数(observed count) |
|---|---|---|
| 烧烤 | 40% | 92 |
| 奶酪 | 30% | 66 |
| 原味 | 20% | 62 |
| 辣味 | 10% | 30 |
- State the null and alternative hypotheses in context.结合情境写出原假设与备择假设。 [2]
- Check the conditions for a chi-square goodness-of-fit test, using numbers.用数字检验卡方拟合优度检验的条件。 [2]
- Find the chi-square statistic, the degrees of freedom and the p-value.求卡方统计量、自由度与 p 值。 [2]
- State a conclusion in context.结合情境写出结论。 [1]
expected count) $250(0.40)=100$,$250(0.30)=75$,$250(0.20)=50$,$250(0.10)=25$,都不小于 5。(c) $\chi^2=\frac{(92-100)^2}{100}+\frac{(66-75)^2}{75}+\frac{(62-50)^2}{50}+\frac{(30-25)^2}{25}=0.64+1.08+2.88+1.00=5.60$;$\text{df}=4-1=3$;p 值 $=\chi^2\text{cdf}(5.60,\,1E99,\,3)=0.133$。(d) 因为 $0.133\gt0.05$,不能拒绝 $H_0$:没有令人信服的证据表明该天产品的口味分布与公司的说法不同。(a) 2 points2 分
The null states the claimed proportions for the population of chips from this day, one per flavor, and the alternative says at least one differs. It is never directional, and it does not say every proportion differs.原假设(null hypothesis)给出该天全部薯片总体中各口味的声称比例,备择假设(alternative hypothesis)说至少有一个不同。它没有方向,也不是说所有比例都不同。
(b) 2 points2 分
Random: a random sample of chips. 10%: sampling without replacement, $250$ is less than $0.10\times5000=500$. Large counts: use the expected counts $np_i$, which are 100, 75, 50 and 25, so the smallest is 25 and is at least 5.随机:薯片是随机样本。10%:不放回抽样,$250$ 小于 $0.10\times5000=500$。大计数:使用期望计数 $np_i$,分别为 100、75、50、25,最小的 25 不小于 5。
(c) 2 points2 分
The contributions are 0.64, 1.08, 2.88 and 1.00, so $\chi^2=5.60$. With $k=4$ flavors, $\text{df}=3$. On a TI-84, put the observed counts in L1 and the expected counts in L2, then STAT, TESTS, X2GOF-Test with df 3, which gives the p-value 0.133.各项贡献为 0.64、1.08、2.88、1.00,所以 $\chi^2=5.60$。共 $k=4$ 种口味,$\text{df}=3$。TI-84 上把观测计数放入 L1、期望计数放入 L2,然后 STAT、TESTS、X2GOF-Test,df 取 3,得到 p 值 0.133。
(d) 1 point1 分
Compare the p-value with $\alpha=0.05$: $0.133$ is larger, so fail to reject $H_0$. Say that the data do not give convincing evidence of a difference, and do not treat the large p-value as confirming the claim.把 p 值与 $\alpha=0.05$ 比较:$0.133$ 更大,所以不能拒绝 $H_0$。要说明数据没有提供令人信服的差异证据,而不是把大的 p 值当作对该说法的确认。
Frequent errors: building $E$ from the sample percentages, which makes every $O=E$; writing $\text{df}=250-1$; and concluding that "the company's claim is true" from a large p-value. A large p-value only says this sample is consistent with the claim.常见错误:用样本百分比计算 $E$,这会使每个 $O=E$;把自由度写成 $250-1$;以及从大的 p 值得出“公司的说法是真的”。大的 p 值只说明这个样本与该说法相容。
| Drama | Comedy | Documentary | Total | |
|---|---|---|---|---|
| Under 40 | 62 | 58 | 20 | 140 |
| 40 or older | 38 | 52 | 70 | 160 |
| Total | 100 | 110 | 90 | 300 |
| 剧情 | 喜剧 | 纪录片 | 合计 | |
|---|---|---|---|---|
| 40 岁以下 | 62 | 58 | 20 | 140 |
| 40 岁及以上 | 38 | 52 | 70 | 160 |
| 合计 | 100 | 110 | 90 | 300 |
- Name the appropriate test, justify the choice from the way the data were collected, and state the hypotheses in context.写出合适的检验,从数据的收集方式说明理由,并结合情境写出假设。 [2]
- Check the conditions, showing the expected counts.检验条件,并写出期望计数。 [2]
- Find the chi-square statistic, the degrees of freedom and the p-value.求卡方统计量、自由度与 p 值。 [2]
- State a conclusion in context.结合情境写出结论。 [1]
- Find the cell that contributes most to the statistic, say whether its observed count is above or below the expected count, and explain whether the result shows that age group causes the genre preference.找出对统计量贡献最大的单元格,说明其观测计数高于还是低于期望计数,并解释这个结果是否表明年龄组导致了类型偏好。 [1]
independence)检验:一个随机样本,对每位订阅用户测量两个分类变量。$H_0$:该服务订阅用户的年龄组与最喜欢的类型相互独立。$H_a$:二者有关联。(b) 随机样本;300 少于 20,000 多名订阅用户的 10%(20,000 的 10% 是 2,000);期望计数(expected count):第一行 $\frac{(140)(100)}{300}=46.67$,$\frac{(140)(110)}{300}=51.33$,$\frac{(140)(90)}{300}=42$,第二行 $53.33$、$58.67$、$48$,都不小于 5。(c) $\chi^2=5.04+0.87+11.52+4.41+0.76+10.08=32.68$;$\text{df}=(2-1)(3-1)=2$;p 值约为 $8\times10^{-8}$。(d) 因为 p 值远小于 0.05,拒绝 $H_0$:有令人信服的证据表明该服务订阅用户的年龄组与最喜欢的类型有关联。(e) 40 岁以下与纪录片贡献最大,$\frac{(20-42)^2}{42}=11.52$;观测计数(observed count) 20 低于期望的 42。这是观察性样本,结果只表明有关联,不表明年龄导致了偏好。(a) 2 points2 分
One sample of subscribers with both variables recorded on each person means independence. Row totals (140 and 160) were results of the sampling, not set by the researcher. $H_0$ says the variables are independent, and $H_a$ says they are associated, each naming the subscribers.一个订阅用户样本、对每个人都记录了两个变量,所以是独立性检验。行合计(140 和 160)是抽样的结果,不是研究者设定的。$H_0$ 说变量相互独立,$H_a$ 说二者有关联,都要写明是哪些订阅用户。
(b) 2 points2 分
Random: a random sample. 10%: $300\lt0.10\times20000=2000$. Expected counts are row total times column total over 300: $46.67, 51.33, 42$ and $53.33, 58.67, 48$. The smallest is 42, so large counts holds.随机:随机样本。10%:$300\lt0.10\times20000=2000$。期望计数为行合计乘列合计除以 300:$46.67, 51.33, 42$ 与 $53.33, 58.67, 48$。最小的是 42,大计数条件(large-counts condition)满足。
(c) 2 points2 分
The contributions are $\frac{(62-46.67)^2}{46.67}=5.04$, $\frac{(58-51.33)^2}{51.33}=0.87$, $\frac{(20-42)^2}{42}=11.52$, $\frac{(38-53.33)^2}{53.33}=4.41$, $\frac{(52-58.67)^2}{58.67}=0.76$, $\frac{(70-48)^2}{48}=10.08$, so $\chi^2=32.68$ and $\text{df}=(2-1)(3-1)=2$. With a matrix [A] on the TI-84, STAT, TESTS, X2-Test gives p-value $8.0\times10^{-8}$.各项贡献为 $\frac{(62-46.67)^2}{46.67}=5.04$,$\frac{(58-51.33)^2}{51.33}=0.87$,$\frac{(20-42)^2}{42}=11.52$,$\frac{(38-53.33)^2}{53.33}=4.41$,$\frac{(52-58.67)^2}{58.67}=0.76$,$\frac{(70-48)^2}{48}=10.08$,所以 $\chi^2=32.68$,$\text{df}=(2-1)(3-1)=2$。在 TI-84 上输入矩阵 [A],STAT、TESTS、X2-Test,得到 p 值 $8.0\times10^{-8}$。
(d) 1 point1 分
The p-value is below $\alpha=0.05$, so reject $H_0$ and state the association for the subscribers of this service.p 值小于 $\alpha=0.05$,拒绝 $H_0$,并针对该服务的订阅用户写出有关联的结论。
(e) 1 point1 分
Compare observed with expected in the largest cell: 20 observed against 42 expected, so fewer under-40 subscribers prefer documentaries than independence predicts. Because the sample is observational, say associated, never that age causes the preference.比较最大贡献单元格的观测与期望:观测 20、期望 42,所以偏爱纪录片的 40 岁以下订阅用户比独立模型预测的少。样本是观察性的,只能说有关联,不能说年龄导致了偏好。
Frequent errors: calling the test homogeneity because the table has rows of different sizes; writing $H_0$ as "the two age groups have the same genre" without naming the variables as independent or associated; counting the totals row and column in $\text{df}$; and ending with "age causes the preference" from an observational sample.常见错误:因为各行人数不同就叫它同质性检验;把 $H_0$ 写成“两个年龄组的类型相同”,却没有说明变量独立或有关联;计算自由度时把合计行和合计列也算进去;以及从观察性样本得出“年龄导致了偏好”。
| Fell asleep within 30 minutes | Did not | Total | |
|---|---|---|---|
| Reading | 38 | 12 | 50 |
| Stretching | 31 | 19 | 50 |
| No routine | 22 | 28 | 50 |
| Total | 91 | 59 | 150 |
| 30 分钟内入睡 | 未入睡 | 合计 | |
|---|---|---|---|
| 阅读 | 38 | 12 | 50 |
| 拉伸 | 31 | 19 | 50 |
| 无睡前活动 | 22 | 28 | 50 |
| 合计 | 91 | 59 | 150 |
- Name the appropriate test, justify the choice, and state the hypotheses in context.写出合适的检验,说明选择的理由,并结合情境写出假设。 [2]
- Check the conditions, showing the expected counts.检验条件,并写出期望计数。 [2]
- Find the chi-square statistic, the degrees of freedom and the p-value, and state a conclusion in context.求卡方统计量、自由度与 p 值,并结合情境写出结论。 [3]
- May the lab conclude that the routines cause different rates of falling asleep quickly? To whom may it generalize? Explain.实验室能否得出不同的睡前活动导致不同的快速入睡比例这一结论?结论可以推广到哪些人?请说明。 [2]
- Which cell contributes most to the statistic, and does the test alone show which routine is best?哪个单元格对统计量的贡献最大?仅凭这个检验能否说明哪种活动最好? [1]
homogeneity)检验:志愿者被随机分配到三个人数固定的组,并记录一个分类结果。$H_0$:对于与这些志愿者相似的人,三种睡前活动下“30 分钟内入睡(是/否)”的分布相同。$H_a$:至少有一种活动的分布不同。(b) 睡前活动是随机分配的,独立性(independence)来自设计,不需要 10% 条件。期望计数(expected count):每一行入睡为 $\frac{(50)(91)}{150}=30.33$,未入睡为 $\frac{(50)(59)}{150}=19.67$,都不小于 5。(c) $\chi^2=1.94+2.99+0.01+0.02+2.29+3.53=10.78$;$\text{df}=(3-1)(2-1)=2$;p 值 $=0.0046$。因为 $0.0046\lt0.05$,拒绝 $H_0$:有令人信服的证据表明,对与这些志愿者相似的人,三种睡前活动中至少有一种的“30 分钟内入睡”分布不同。(d) 因果:可以。睡前活动是随机分配的,排除了混杂,所以比例的差异可以归因于睡前活动。推广:只能推广到与这些志愿者相似的人,因为志愿者不是从更大的总体中随机选取的。(e) “无睡前活动、未入睡”单元格贡献最大,$\frac{(28-19.67)^2}{19.67}=3.53$,观测 28、期望 19.67。检验只说明分布在某处不同,并不给各活动排序。比较各组比例(76%、62%、44%)才能看出哪种最高。(a) 2 points2 分
Random assignment to three treatment groups, with one categorical outcome, calls for a test of homogeneity. Name the three routines and the outcome, and say that the null is the same distribution under every routine.随机分配到三个处理组且只有一个分类结果,应使用同质性检验。要写出三种活动和结果,并说明原假设(null hypothesis)是每种活动下的分布相同。
(b) 2 points2 分
Treatments were randomly assigned, which gives independent groups, so no 10% check is needed. Expected counts are $\frac{(50)(91)}{150}=30.33$ and $\frac{(50)(59)}{150}=19.67$, so every expected count is at least 5.处理是随机分配的,各组独立,所以不需要检验 10% 条件。期望计数为 $\frac{(50)(91)}{150}=30.33$ 与 $\frac{(50)(59)}{150}=19.67$,每个期望计数都不小于 5。
(c) 3 points3 分
Contributions: reading $1.94$ and $2.99$; stretching $0.01$ and $0.02$; no routine $2.29$ and $3.53$. So $\chi^2=10.78$ with $\text{df}=(3-1)(2-1)=2$, and $\chi^2\text{cdf}(10.78,\,1E99,\,2)=0.0046$. Compare with $\alpha=0.05$ and write the conclusion for volunteers like these.各项贡献:阅读 $1.94$ 与 $2.99$;拉伸 $0.01$ 与 $0.02$;无睡前活动 $2.29$ 与 $3.53$。所以 $\chi^2=10.78$,$\text{df}=(3-1)(2-1)=2$,且 $\chi^2\text{cdf}(10.78,\,1E99,\,2)=0.0046$。与 $\alpha=0.05$ 比较,并针对与这些志愿者相似的人写出结论。
(d) 2 points2 分
Cause: random assignment is what allows a cause-and-effect conclusion. Generalization: random selection would be needed to extend the result to all adults, and these were volunteers.因果:随机分配使因果结论成为可能。推广:要把结果推广到所有成年人,需要随机选取样本,而这里是志愿者。
(e) 1 point1 分
The largest contribution is $3.53$ for no routine and not asleep, where fewer volunteers fell asleep quickly than expected. The statistic has no direction and does not rank the routines.最大的贡献是“无睡前活动、未入睡”的 $3.53$,即快速入睡的人比期望的少。统计量没有方向,也不对各活动排序。
Frequent errors: calling this a test of independence because the table has two variables; checking a 10% condition for an experiment; claiming certainty that the routines differ; extending the cause-and-effect result to all adults; and reading the rejection as "all three routines differ".常见错误:因为表有两个变量就称之为独立性检验;对实验检验 10% 条件;断言睡前活动的差异确定无疑;把因果结论推广到所有成年人;以及把拒绝理解为“三种活动都不同”。
| Completed | Did not | Total | |
|---|---|---|---|
| App 1 | 68 | 32 | 100 |
| App 2 | 52 | 48 | 100 |
| Total | 120 | 80 | 200 |
| 完成 | 未完成 | 合计 | |
|---|---|---|---|
| 应用 1 | 68 | 32 | 100 |
| 应用 2 | 52 | 48 | 100 |
| 合计 | 120 | 80 | 200 |
- Carry out a chi-square test of homogeneity at $\alpha=0.05$: state the hypotheses, find the expected counts, the statistic, the degrees of freedom and the p-value.在 $\alpha=0.05$ 下进行卡方同质性检验:写出假设,求期望计数、统计量、自由度与 p 值。 [3]
- Carry out the two-proportion $z$ test of $H_0:p_1=p_2$ with the pooled proportion, and show that $z^2$ equals the chi-square statistic from part (a).用合并比例进行 $H_0:p_1=p_2$ 的双比例 $z$ 检验,并说明 $z^2$ 等于 (a) 中的卡方统计量。 [2]
- The developers' question is whether App 1 is better. State $H_a$, say which of the two tests answers it, and find the p-value.开发者的问题是应用 1 是否更好。写出 $H_a$,说明用哪个检验回答,并求 p 值。 [2]
- A student writes: "The chi-square p-value is 0.0209, so App 1 is better." Locate the flaw.一名学生写道:“卡方检验的 p 值是 0.0209,所以应用 1 更好。”指出其中的缺陷。 [1]
expected count):每行 $\frac{(100)(120)}{200}=60$ 与 $\frac{(100)(80)}{200}=40$,都不小于 5。$\chi^2=\frac{(68-60)^2}{60}+\frac{(32-40)^2}{40}+\frac{(52-60)^2}{60}+\frac{(48-40)^2}{40}=1.067+1.600+1.067+1.600=5.33$;$\text{df}=1$;p 值 $=0.0209$。(b) $\hat p_1=0.68$,$\hat p_2=0.52$,合并比例 $\hat p=\frac{120}{200}=0.60$,$SE=\sqrt{0.60(0.40)\left(\frac1{100}+\frac1{100}\right)}=0.0693$,$z=\frac{0.16}{0.0693}=2.31$,且 $z^2=5.33=\chi^2$。(c) $H_a:p_1\gt p_2$;使用单侧双比例 $z$ 检验;p 值为 $P(Z\gt2.31)=0.0105$,是双侧值 0.0209 的一半,因为 $\hat p_1\gt\hat p_2$。(d) 卡方检验只说明分布不同,没有方向,所以单靠它不能说明应用 1 更好。(a) 3 points3 分
Random assignment to two groups with one categorical outcome is homogeneity. Expected counts come from the margins, 60 and 40. The contributions are 1.067, 1.600, 1.067 and 1.600, so $\chi^2=5.33$ with $\text{df}=(2-1)(2-1)=1$, and $\chi^2\text{cdf}(5.33,\,1E99,\,1)=0.0209$.随机分配到两个组且只有一个分类结果,是同质性(homogeneity)检验。期望计数由边际合计得到,为 60 与 40。各项贡献为 1.067、1.600、1.067、1.600,所以 $\chi^2=5.33$,$\text{df}=(2-1)(2-1)=1$,且 $\chi^2\text{cdf}(5.33,\,1E99,\,1)=0.0209$。
(b) 2 points2 分
The pooled proportion is $\frac{68+52}{200}=0.60$. $SE=\sqrt{0.60(0.40)(0.02)}=0.0693$ and $z=\frac{0.68-0.52}{0.0693}=2.31$. Then $z^2=5.33$, the same as the chi-square statistic, and the two-sided $z$ p-value is also 0.0209.合并比例为 $\frac{68+52}{200}=0.60$。$SE=\sqrt{0.60(0.40)(0.02)}=0.0693$,$z=\frac{0.68-0.52}{0.0693}=2.31$。于是 $z^2=5.33$,与卡方统计量(chi-square statistic)相同,双侧 $z$ 检验的 p 值也是 0.0209。
(c) 2 points2 分
The question has a direction, so $H_a:p_1\gt p_2$ (with $p_i$ the completion proportion for App $i$ among volunteers like these). The sample difference $0.16$ points the right way, so the one-sided p-value is half of 0.0209, which is 0.0105. A chi-square test cannot be one-sided.问题带有方向,所以 $H_a:p_1\gt p_2$($p_i$ 为与这些志愿者相似的人使用应用 $i$ 的完成比例)。样本差 $0.16$ 的方向与之一致,所以单侧 p 值是 0.0209 的一半,即 0.0105。卡方检验不能是单侧的。
(d) 1 point1 分
The statistic squares every difference, so a significant chi-square result says only that the completion distributions differ. Direction has to come from the sample proportions or from the one-sided $z$ test.统计量对每个差都做了平方,所以显著的卡方结果只说明完成情况的分布不同。方向要由样本比例或单侧 $z$ 检验给出。
Frequent errors: using the unpooled standard error in a test of $H_0:p_1=p_2$; reporting $z=2.31$ but comparing $z$ with the chi-square table; halving the p-value in part (a) without first checking that the sample difference favors App 1; and reading a chi-square rejection as a ranking of the apps.常见错误:在 $H_0:p_1=p_2$ 的检验中用未合并的标准误;报告 $z=2.31$ 却拿它去查卡方表;在 (a) 中直接把 p 值减半而不先检查样本差是否有利于应用 1;以及把卡方检验的拒绝理解为对两个应用排序。
| Supplier | On time | Delayed | Total |
|---|---|---|---|
| 1 | 39 | 21 | 60 |
| 2 | 52 | 48 | 100 |
| 3 | 29 | 31 | 60 |
| Total | 120 | 100 | 220 |
| 供应商 | 按时 | 延迟 | 合计 |
|---|---|---|---|
| 1 | 39 | 21 | 60 |
| 2 | 52 | 48 | 100 |
| 3 | 29 | 31 | 60 |
| 合计 | 120 | 100 | 220 |
homogeneity)检验。- State the hypotheses and verify the conditions for a chi-square test of homogeneity.写出假设并验证卡方同质性检验的条件。 [2]
- Compute the expected counts and the chi-square statistic, showing at least the largest contribution.计算期望计数与卡方统计量,至少写出最大的一项贡献。 [3]
- Report the degrees of freedom and the p-value, and state the conclusion in context.给出自由度与 p 值,并结合情境给出结论。 [2]
- A student writes: "The p-value is greater than 0.05, so the three suppliers are equally reliable." Locate the flaw in this conclusion.某学生写道:“p 值大于 0.05,所以三家供应商同样可靠。”指出该结论的缺陷。 [1]
expected count)都不小于 5(最小为 27.27)。(b) 期望计数:$\frac{(60)(120)}{220}=32.73$ 与 $\frac{(60)(100)}{220}=27.27$;$54.55$ 与 $45.45$;$32.73$ 与 $27.27$。各项贡献:$1.20, 1.44, 0.12, 0.14, 0.42, 0.51$,最大的是 $\frac{(21-27.27)^2}{27.27}=1.44$。所以 $\chi^2=3.84$。(c) $\text{df}=(3-1)(2-1)=2$;p 值 $=0.147$。因为 $0.147\gt0.05$,不能拒绝 $H_0$:没有令人信服的证据表明三家供应商的按时分布不同。(d) 不能拒绝并不说明各供应商同样可靠;它只表示这个样本没有提供足够的差异证据。(a) 2 points2 分
Separate random samples from three suppliers with one categorical outcome call for a test of homogeneity. The null is the same distribution for all suppliers. Each sample is less than a tenth of its supplier's shipments, and the smallest expected count (27.27, computed in part (b)) is at least 5.从三家供应商分别随机抽样、且只有一个分类结果,应使用同质性检验。原假设(null hypothesis)是各供应商的分布相同。每个样本都不到其供应商货量的十分之一,最小的期望计数(在 (b) 中算出的 27.27)不小于 5。
(b) 3 points3 分
Each expected count is row total times column total over 220: 32.73, 27.27, 54.55, 45.45, 32.73, 27.27. The six contributions are 1.202, 1.443, 0.119, 0.143, 0.424 and 0.509, and they add to $\chi^2=3.840$.每个期望计数为行合计乘列合计除以 220:32.73、27.27、54.55、45.45、32.73、27.27。六项贡献为 1.202、1.443、0.119、0.143、0.424、0.509,总和为 $\chi^2=3.840$。
(c) 2 points2 分
$\text{df}=(3-1)(2-1)=2$. The p-value is the right-tail area $\chi^2\text{cdf}(3.84,\,1E99,\,2)=0.147$. Since $0.147\gt0.05$, fail to reject $H_0$ and write the conclusion for the three suppliers' recent shipments.$\text{df}=(3-1)(2-1)=2$。p 值是右尾面积 $\chi^2\text{cdf}(3.84,\,1E99,\,2)=0.147$。因为 $0.147\gt0.05$,不能拒绝 $H_0$,并针对三家供应商的近期货物写出结论。
(d) 1 point1 分
A large p-value is not evidence that the distributions are identical. "Equally reliable" claims more than the data support.大的 p 值并不是分布相同的证据。“同样可靠”说得比数据所能支持的更多。
Frequent errors: dividing by observed counts instead of expected counts; using $\text{df}=3\times2=6$; doubling the tail area; and turning "fail to reject" into "the suppliers are the same".常见错误:除以观测计数而不是期望计数;把自由度写成 $3\times2=6$;把尾部面积加倍;以及把“不能拒绝”说成“各供应商相同”。
observed count)和每个期望计数(expected count)都乘以同一个因子,而百分比保持不变;请从卡方公式出发进行推理。- State the hypotheses in context and check the conditions, using numbers.结合情境写出假设,并用数字检验条件。 [3]
- Find the chi-square statistic, the degrees of freedom and the p-value, and state a conclusion in context.求卡方统计量、自由度与 p 值,并结合情境写出结论。 [3]
- Which zone contributes most to the statistic? Compare its observed and expected counts.哪个站区对统计量的贡献最大?比较它的观测计数与期望计数。 [1]
- Suppose a second random sample of $200c$ trips (with $0\lt c\le4$, so the 10% condition still holds) has exactly the same percentage in each zone. Show that its statistic is $6.28c$, and find the values of $c$ for which the test would reject $H_0$.假设第二个 $200c$ 次骑行的随机样本($0\lt c\le4$,因此 10% 条件仍然成立)在各站区的百分比与第一个样本完全相同。证明其统计量为 $6.28c$,并求使检验拒绝 $H_0$ 的 $c$ 的取值。 [2]
- A classmate says: "Because we failed to reject in part (b), the four zones are used equally." Locate the flaw.一位同学说:“因为我们在 (b) 中不能拒绝,所以四个站区被同样频繁地使用。”指出其中的缺陷。 [1]
(a) 3 points3 分
The null gives $p=0.25$ for each of the four zones, and the alternative says at least one differs. Random: a random sample. 10%: $200\lt0.10\times10000=1000$. Large counts: $E=200(0.25)=50$ for every zone, at least 5.原假设(null hypothesis)给出四个站区各为 $p=0.25$,备择假设(alternative hypothesis)说至少有一个不同。随机:随机样本。10%:$200\lt0.10\times10000=1000$。大计数:每个站区 $E=200(0.25)=50$,不小于 5。
(b) 3 points3 分
The contributions are 2.88, 1.62, 0.50 and 1.28, so $\chi^2=6.28$ with $\text{df}=4-1=3$ and $\chi^2\text{cdf}(6.28,\,1E99,\,3)=0.099$. The X2GOF-Test on a TI-84 gives the same values from L1 (observed) and L2 (expected). Since $0.099\gt0.05$, fail to reject $H_0$, in context.各项贡献为 2.88、1.62、0.50、1.28,所以 $\chi^2=6.28$,$\text{df}=4-1=3$,$\chi^2\text{cdf}(6.28,\,1E99,\,3)=0.099$。TI-84 的 X2GOF-Test 用 L1(观测)与 L2(期望)给出相同结果。因为 $0.099\gt0.05$,结合情境写出不能拒绝 $H_0$。
(c) 1 point1 分
North has the largest contribution, $\frac{(62-50)^2}{50}=2.88$. Its observed count 62 is above the expected 50.北区的贡献最大,$\frac{(62-50)^2}{50}=2.88$,其观测计数 62 高于期望的 50。
(d) 2 points2 分
With the same percentages, every observed and expected count is multiplied by $c$, so from the formula each contribution becomes $\frac{(cO-cE)^2}{cE}=c\,\frac{(O-E)^2}{E}$, which is $c$ times the old one: $\chi^2=6.28c$. Solve $6.28c\gt7.815$ for $c\gt1.244$, which is within the allowed range $c\le4$ (800 trips is under 1,000). At $c=3$ the statistic is $18.84$ and $\chi^2\text{cdf}(18.84,\,1E99,\,3)=0.0003$.百分比相同时,每个观测计数和期望计数都乘以 $c$,所以由公式,每项贡献变为 $\frac{(cO-cE)^2}{cE}=c\,\frac{(O-E)^2}{E}$,即原来的 $c$ 倍:$\chi^2=6.28c$。解 $6.28c\gt7.815$ 得 $c\gt1.244$,在允许的范围 $c\le4$ 之内(800 次小于 1,000)。当 $c=3$ 时统计量为 $18.84$,$\chi^2\text{cdf}(18.84,\,1E99,\,3)=0.0003$。
(e) 1 point1 分
A non-significant result means the evidence was not strong enough with this sample size. It does not establish equal use, and part (d) shows how the verdict can change with more data.不显著的结果表示在这个样本量下证据不够强。它并没有确立使用频率相同,(d) 说明了数据更多时结论可能改变。
Frequent errors: computing $E$ from the sample percentages; using $\text{df}=n-1$; reporting only that "the p-value is large" without a decision tied to $\alpha$; scaling the statistic by $\sqrt c$ instead of $c$; and treating a fail to reject as agreement with $H_0$.常见错误:用样本百分比计算 $E$;用 $\text{df}=n-1$;只说“p 值很大”而不与 $\alpha$ 联系起来作决定;把统计量按 $\sqrt c$ 而不是 $c$ 缩放;以及把不能拒绝当作同意 $H_0$。
Curriculum:课程依据: College Board AP Statistics CED, effective fall 2026 · Chi-square goodness of fit has no topic in the fall 2026 CED.卡方拟合优度在 2026 年秋季 CED 中没有对应主题。