Unit 1, topics 1.11 and 1.12第 1 单元,主题 1.11 与 1.12
Sampling bias versus sampling variability抽样偏差与抽样变异性
A population of 1,000 has two groups. Group A has 500 people with 400 successes; Group B has 500 people with 100 successes, so the true proportion is p = 0.50. Compare a simple random sample of the whole population with a sample drawn only from Group A. Raising n shrinks the spread of both, but only the random sample is centered on the truth.总体共 1,000 人,分为两组。A 组 500 人,其中 400 人为成功;B 组 500 人,其中 100 人为成功,故真实比例 p = 0.50。比较整个总体的简单随机样本与只从 A 组抽取的样本。增大 n 会使两者的离散程度变小,但只有随机样本以真值为中心。
Controls控制
The same seed and settings always reproduce the same picture. Keyboard: Tab to a button, then press Enter or Space.相同的种子与设置总会得到相同的图形。键盘操作:用 Tab 移到按钮,再按 Enter 或空格。
Results结果
- SRS of all 1,000 (without replacement)全体 1,000 人的 SRS(不放回)
- Sample from Group A only (coverage bias)只从 A 组抽取(覆盖偏差)
| Quantity量 | Simulated模拟值 | Exact value精确值 |
|---|
Exact effect of increasing n增大 n 的精确效应
| n | SD, SRSSRS 标准差 | SD, Group AA 组标准差 | Bias, Group AA 组偏差 |
|---|
Larger samples cut the variability, but the bias stays at 0.30 for every n. A bigger sample cannot repair a flawed sampling method.样本越大,变异性越小,但对任何 n 偏差都保持 0.30。更大的样本无法修复有缺陷的抽样方法。
Each run uses 1,000 repeated samples without replacement. Reference SDs use the finite-population (hypergeometric) formula. Synthetic teaching data; no network needed.每次运行重复抽取 1,000 个不放回样本。参考标准差使用有限总体(超几何)公式。 合成教学数据,无需联网。