课程总览:这门课在训练什么能力Course Map: What This Course Trains
AP 统计学不考"背公式",考的是在不确定性下说话的能力:你能不能从一个样本出发,给出一个既明确又诚实的结论?整门课 23 讲就是围绕这一件事,从"描述数据"一路搭到"带条件的推断"。这一页是地图,先看清地形再出发。
AP Statistics does not test memorised formulas; it tests reasoning under uncertainty: can you start from one sample and reach a conclusion that is both definite and honest? The 23 lectures build exactly that, from describing data to conditional inference. This page is the map — read the terrain before you walk it.
一、课程地图:23 讲怎么排1 The Map: How the 23 Lectures Fit
整门课只有一条主线:数据 → 分布 → 抽样 → 推断。前三步是"看懂世界",最后一步才是"下结论"。跳过前三步直接背检验步骤,是 AP 统计学最常见的失败方式。
One thread runs through everything: data → distribution → sampling → inference. The first three steps let you see the world; only the last lets you conclude. Skipping to test procedures is the most common way to fail AP Statistics.
| 部分Part | 讲次Lectures | 主题Topic | 教材Textbook | 学完你应该能By the end you can |
|---|---|---|---|---|
| I | 1 | 概率论与统计学的分工Probability vs statistics | 导论Intro | 说清"随机变量、分布、推断"三个词define random variable, distribution, inference |
| 2–5 | 描述数据(图 + 数 + 位置)Describing data | Ch 1–2.1 | 用 SOCS 描述任何一组数据,判断异常值describe any distribution with SOCS, flag outliers | |
| II | 6 | 密度曲线与正态模型Density curves & the Normal model | Ch 2.2 | 把"面积"翻译成"概率",做 z 运算translate area into probability, work with z |
| III | 7–8 | 相关与回归Correlation & regression | Ch 3 | 读散点图、写 LSRL、用 r² 与残差判断拟合read scatterplots, fit a LSRL, judge fit with r² and residuals |
| 9–10 | 抽样与实验设计Sampling & experiments | Ch 4 | 指出一项研究的偏差来源,说清能否谈因果name the bias in a study, decide whether causation is claimable | |
| 11–12 | 概率法则与条件概率Probability rules & conditional probability | Ch 5 | 用树状图/双向表算条件概率,判独立compute conditional probabilities, test independence | |
| IV | 13–15 | 随机变量与特殊分布Random variables & special distributions | Ch 6 | 算 RV 的 μ/σ,认出二项与几何场景compute μ/σ of RVs, recognise binomial and geometric settings |
| V | 16–17 | 抽样分布Sampling distributions | Ch 7 | 写出 \(\hat p\) 与 \(\bar x\) 的中心/离散/形状state center, spread and shape for \(\hat p\) and \(\bar x\) |
| VI | 19–20 | 置信区间Confidence intervals | Ch 8 | 四步法写出 p 与 μ 的区间并解释build and interpret CIs for p and μ in four steps |
| 21–22 | 显著性检验Significance tests | Ch 9 | 写 H₀/Hₐ、算 P 值、下"拒绝/不拒绝"的结论state hypotheses, get a P-value, conclude properly | |
| VII | 23–24 | 卡方检验与回归推断Chi-square & regression inference | Ch 11–12 | 区分三种卡方,检验回归斜率distinguish the three χ² tests, test a regression slope |
原始讲义中不存在第 18 讲(编号从 17 直接跳到 19),内容上并没有缺环:Chapter 7 的抽样分布在 16–17 讲讲完,Chapter 8 的区间估计从 19 讲开始。课件沿用原始编号,方便你对照手上的 PPT 与作业。
There is no Lecture 18 in the original slides (the numbering jumps from 17 to 19), and nothing is missing content-wise: Chapter 7 sampling distributions occupy Lectures 16–17, and Chapter 8 begins at Lecture 19. The numbering is preserved so you can match the courseware to your own slides and homework.
二、考试长什么样2 What the Exam Looks Like
Section I · 选择题Section I · Multiple Choice
40 题 / 90 分钟,占总分 50%。平均每题 2 分 15 秒。它不考计算量,考条件有没有检查、解释有没有到位。
40 questions / 90 minutes, 50% of the score. About 2 min 15 s each. It rewards checking conditions and interpreting correctly, not heavy computation.
Section II · 自由回答Section II · Free Response
6 题 / 90 分钟,占 50%:前 5 题各 4 分(其中 1 题是 Investigative Task,分值更高),另有 1 题综合。每一分都对应明确的评分点(Essentially Correct / Partially Correct / Incorrect)。
6 questions / 90 minutes, 50%: five 4-point questions plus one larger Investigative Task. Every point maps to a rubric line (Essentially Correct / Partially Correct / Incorrect).
① 没检查条件就套公式(例如 np<10 还用正态近似);② 把"不拒绝 H₀"说成"接受 H₀";③ 解释 r²、P 值、置信水平时差一句话——这三处几乎年年出现。
① Using a formula without checking conditions (Normal approximation when np<10); ② saying "accept H₀" instead of "fail to reject"; ③ a missing clause when interpreting r², a P-value or a confidence level. These three recur every year.
三、怎么用这份课件3 How to Use This Courseware
四、四条学习路径(按你的处境选)4 Four Study Paths
| 你的处境Your situation | 建议路径Suggested path | 重点提醒Watch out for |
|---|---|---|
| 零基础 / 刚开学Starting from zero | 1 → 2 → 3 → 4 → 5 → 6,按顺序,每讲做完随堂练习1 → 2 → 3 → 4 → 5 → 6 in order, doing the checks | 第 4、5 讲(数值描述与 z 分数)是后面所有推断的地基Lectures 4–5 (numbers, z-scores) are the foundation of all inference |
| 学过但要复习Reviewing | 先读每讲 summary,再只做 qbank 里做错的题Read each summary, then redo only the checks you missed | 重点补 16–17(抽样分布)与 21(P 值逻辑)Patch Lectures 16–17 and 21 first |
| 考前两周Two weeks out | 23 → 24 → 21 → 22 → 19 → 20,专攻 FRQ 四步法23 → 24 → 21 → 22 → 19 → 20, drilling the four-step FRQ | 结论句必须含"in context";条件检查单独占分Conclusions must be in context; conditions earn their own points |
| 只想知道怎么算Just want the computation | 跳到文末附录:公式表 + 计算器速查Jump to the appendix: formula sheet + calculator quick reference | 但 AP 的分数大头在解释,不在按键But the marks live in interpretation, not keystrokes |
统计学的每个结论都带着条件:在什么前提下、用多少样本、有多大的不确定性。答不出这三件事,任何数字都不能算答案。
Every statistical conclusion carries its conditions: under what assumptions, from how large a sample, with how much uncertainty. A number without those three is not an answer.
概率论与统计学:从随机到数据Probability and Statistics: From Randomness to Data
整门 AP 统计只回答两个问题:这个世界的不确定性有规律吗?(概率论)以及怎样用有限的数据去猜总体的真相?(统计学)。第一讲不推导公式,只搭骨架:随机变量、分布、离散与连续、以及为什么“看起来更危险”的结论常常是假的。
This course answers two questions: does uncertainty follow any pattern? (probability) and how do we use limited data to infer the truth about a population? (statistics). This first lecture builds the skeleton — random variables, distributions, discrete vs continuous, and why "it looks more dangerous" is often an illusion.
本讲学习目标Learning Objectives
- 说清楚概率论在研究什么,以及它在整门课中扮演“语言”而不是“符号”的角色。
- 区分常数与随机变量取值由随机试验结果决定、在试验之前无法确定的量,通常用大写字母 X、Y 表示;它取到的具体数值用小写 x 表示。A quantity whose value comes from the outcome of a chance process and is unknown before the experiment; usually written X, with a realized value x.,并说明“随机”不等于“没有规律”。
- 用自己的话说出分布一个随机变量取各个值(或落在各个区间)的可能性大小的整体描述。离散变量用概率表或概率直方图,连续变量用密度曲线。The complete description of how likely a random variable is to take each value (or fall in each interval). Discrete: a probability table or histogram; continuous: a density curve.的含义,并分清离散型与连续型随机变量。
- 认出本课程会反复用到的分布家族:正态、二项、几何、t、χ²,知道它们各自“管什么事情”。
- 理解统计学的三步走:总体 → 抽样 → 推断,以及为什么推断必然伴随不确定性。
- 通过一个真实例子体会:粗率的比较为什么会被混杂变量带偏,从而理解“控制变量”的必要性。
- Explain what probability theory studies, and why it serves this course as a language rather than a pile of symbols.
- Distinguish constants from random variablesA quantity whose value comes from a chance process and is unknown before the experiment.取值由随机试验结果决定、试验前无法确定的量。, and explain that "random" does not mean "patternless".
- Describe what a distributionThe complete description of how likely a random variable is to take each value or fall in each interval.随机变量取各个值(或落在各个区间)的可能性大小的整体描述。 is, and tell discrete from continuous random variables.
- Recognise the distribution families used throughout the course: Normal, binomial, geometric, t, χ² — and what each one is for.
- Understand the three-step logic of statistics: population → sample → inference, and why inference always carries uncertainty.
- See, through a real example, how a comparison of crude rates can be distorted by a confounding variable — the reason we control variables.
核心概念Core Concepts
1.1 世界上的两种数:确定的与不确定的1.1 Two Kinds of Numbers: Certain and Uncertain
数学里的数大多确定;可现实里的数大多还没发生。概率论就是研究“还没发生的数”的学问——它不给答案,它给可能性的大小。
Most numbers in mathematics are certain; most numbers in real life have not happened yet. Probability studies these not-yet-happened numbers — it does not give answers, it gives degrees of possibility.
先把两类数摆在一起看。左边的数是常数:它今天是这个值,明天还是这个值,问一百个人答案都一样。右边的数是随机变量:在它真正发生之前,没有人能说出确切数值,但它的取值并非毫无章法。
Put the two kinds of numbers side by side. On the left are constants: the same value today and tomorrow, the same for anyone who checks. On the right are random variables: before the event happens nobody can state the exact value — yet the values are far from patternless.
| 常数(确定)Constant (certain) | 随机变量(不确定,但有规律)Random variable (uncertain, but patterned) |
|---|---|
| 圆周率 \( \pi = 3.14159\ldots \) | 明天本市报告的新增病例数new cases reported in the city tomorrow |
| 你现在的身高(已测出) | 接下来 10 位顾客中会买咖啡的人数how many of the next 10 customers buy coffee |
| 水的沸点(标准大气压) | 一名随机抽到的同学的 AP 统计学分数the AP Statistics score of a randomly chosen student |
| 抛硬币结果的总和恒为 1 | 抛 100 次硬币正面出现的次数the number of heads in 100 tosses |
1.2 随机变量与分布:把“可能性”画出来1.2 Random Variables and Distributions: Drawing Possibility
一个随机变量的全部可能取值 + 每个取值的可能性,合起来就叫它的分布。拿到一个分布,你就掌握了这个随机变量的全部信息。
All possible values of a random variable plus how likely each one is — together that is its distribution, and it tells you everything there is to know about the variable.
想象一个城市每天报告的新增病例数 \(X\)。它可以是 0、1、2、3……提前没人知道明天是多少。但如果这个城市平均每天报告 4 例,那么“明天 0 例”和“明天 15 例”的可能性差得非常远——这种差异就是分布。
Imagine a city's daily reported case count \(X\). It can be 0, 1, 2, 3… and nobody knows tomorrow's value in advance. But if the city averages 4 cases a day, "0 tomorrow" and "15 tomorrow" are wildly different in likelihood — that difference is the distribution.
两个城市平均新增病例都是 4 例,但 A 城几乎每天 4 例,B 城在 0 和 8 之间剧烈跳动。只看平均数你分不出它们,必须看分布。这门课后面反复出现的“形状、中心、离散程度”,就是在描述分布。
Two cities both average 4 cases a day, yet city A reports exactly 4 almost every day while city B swings between 0 and 8. The mean cannot tell them apart — you need the distribution. "Shape, center, spread", which recurs all course long, is precisely this description.
1.3 离散型与连续型:能“数”还是能“量”1.3 Discrete vs Continuous: Counting or Measuring
能一个一个数出来的,是离散型;只能用尺子或仪器量出来的,是连续型。连续型随机变量取到某一个精确值的概率是 0,我们只能谈“落在某个区间”的概率。
If you can count the values one by one, it is discrete; if you can only measure them, it is continuous. A continuous variable has probability 0 of hitting any exact value — we only ask about intervals.
离散型随机变量Discrete random variable
取值可以列成一张清单(通常是 0, 1, 2, …)。概率用表或概率直方图表示,所有概率加起来恰好等于 1。
Values form a list (usually 0, 1, 2, …). Probabilities are given by a table or a probability histogram, and they must add up to exactly 1.
例10 次投篮命中数、掷骰子点数、明天新增病例数、家庭中男孩的人数。
e.g. baskets in 10 shots, a die roll, tomorrow's case count, number of boys in a family.
连续型随机变量Continuous random variable
取值铺满一个区间,无法逐个列出。概率由密度曲线下的面积给出:\(P(a\le X\le b)\) 就是曲线上 \(a\) 到 \(b\) 之间的面积。
Values fill an interval and cannot be listed. Probability is the area under a density curve: \(P(a\le X\le b)\) is the area between \(a\) and \(b\).
例身高、体重、反应时间、考试分数、某人的潜伏期。
e.g. height, weight, reaction time, an exam score, an incubation period.
对连续型变量,\(P(X = 142)=0\),但 \(P(141.5 < X < 142.5)\) 可能不小。所以“概率为 0”不等于“不可能发生”,只是“这一个精确值占的面积为 0”。
For a continuous variable, \(P(X = 142)=0\), yet \(P(141.5 < X < 142.5)\) may be substantial. So "probability 0" does not mean "impossible" — it means that single exact value carries zero area.
1.4 本课程的“分布工具箱”全景1.4 The Distribution Toolkit at a Glance
统计学的题目千变万化,但分布的家族只有少数几个。认出“这题属于哪个家族”,就相当于完成了一半。
Statistics problems look endlessly varied, yet the distribution families are few. Recognising "which family is this?" is half the work.
| 分布Distribution | 类型Type | 什么时候用When it is used | 本课程位置Where in this course |
|---|---|---|---|
| Normal 正态 | 连续Continuous | 对称、钟形、由均值与标准差完全决定;大量自然量近似服从symmetric, bell-shaped, fixed by mean and SD; many natural measurements | Lec 6 |
| Binomial 二项 | 离散Discrete | \(n\) 次独立重复试验中成功的次数the number of successes in \(n\) independent trials | Lec 15 |
| Geometric 几何 | 离散Discrete | 第一次成功之前需要试验多少次the number of trials until the first success | Lec 15 |
| Poisson 泊松 | 离散Discrete | 单位时间/面积内稀有事件发生的次数counts of rare events per unit time or space | 拓展extension |
| t 分布 | 连续Continuous | 总体标准差未知、用小样本估计均值时when σ is unknown and a mean is estimated from a small sample | Lec 20 |
| χ² 卡方 | 连续Continuous | 比较大样本里计数的差异时comparing counts among categories | Lec 23 |
1.5 统计学要做什么:总体 → 样本 → 推断1.5 What Statistics Does: Population → Sample → Inference
概率论是从分布推出数据(已知模型,算概率);统计学是从数据反推分布(只有数据,猜模型)。方向刚好相反——这是本课程最重要的一个区分。
Probability goes from the model to the data (model known, compute probabilities); statistics goes from the data back to the model (data only, guess the model). The direction is reversed — and this is the single most important distinction in the course.
下面这个三维模型把“分布”从平面里拿出来看看:一条正态密度曲线其实是一张“曲面”的剖面,曲线下方的面积就是概率。拖动旋转,注意中间高、两侧低;把阴影区想成“这块面积就是 \(Z\) 落在这一段的概率”。
The 3D model below lifts the distribution out of the plane: a Normal density curve is the cross-section of a surface, and the area beneath it is probability. Drag to rotate — notice the tall centre, low tails; read the shaded slab as "this area is the probability that \(Z\) lands in this range".
1.6 开篇案例:“病毒在武汉更毒吗?”1.6 Opening Case: "Was the virus deadlier in Wuhan?"
两个城市一比,武汉的死亡率更高。但这并不能说明病毒在武汉更毒——因为两座城市的年龄结构完全不同。年龄同时影响“是否住院”和“是否死亡”,这就是混杂变量同时与解释变量和响应变量都有关联的第三个变量。它会让两个变量之间凭空出现(或消失)一个虚假的关联。A third variable associated with both the explanatory and the response variable. It can create — or hide — an association that is not really there.。
Comparing two cities, Wuhan shows a higher death rate. That alone does not mean the virus was more virulent there — the two populations differ hugely in age structure. Age affects both "who gets counted" and "who dies": that is a confounding variableA third variable associated with both the explanatory and the response variable; it can create or hide an association.同时与解释变量和响应变量都有关联的第三个变量,会让两个变量之间凭空出现(或消失)一个虚假的关联。.
| 城市City | 报告病例数Reported cases | 死亡数Deaths | 粗死亡率(每 100 例)Crude rate per 100 | ≥60 岁占比Share aged ≥60 | 同年龄结构下的标准化率Age-standardised rate |
|---|---|---|---|---|---|
| Wuhan 武汉 | 50 340 | 3 869 | 7.69 | 31% | 4.1 |
| Outside Hubei 湖北以外 | 13 152 | 108 | 0.82 | 15% | 0.9 |
把上表读成一句话:粗死亡率差 9 倍,标准化之后差距只剩 4 倍多——也就是说,相当一部分“更毒”的印象,其实来自“武汉当时住院人群更老”。这就是为什么本课程在讲完描述数据(Unit 1–2)、讲完抽样与实验设计(Unit 3–4)之后,才有资格谈“比较”和“推断”。
Read the table as one sentence: a nine-fold gap in crude rates shrinks to a little over four-fold once age is standardised — much of the "more virulent" impression came from Wuhan's hospitalised population being older. This is exactly why the course first covers describing data (Units 1–2) and sampling/experiment design (Units 3–4) before it dares to compare or infer.
例题精讲Worked Examples
例 1 从“描述”到“推断”:这个样本能说明什么?Example 1 From description to inference: what can this sample support?
- 总体是“想知道的全部对象”:全体 1200 名学生;样本是被实际量到的 60 名同学。 Population is whom you want to know about: all 1 200 students. Sample is who was actually measured: the 60 stopped at lunch.
- 参数是总体的平均睡眠时间 \(\mu\),固定但未知;统计量是样本均值 \(\bar x = 6.8\),它随抽到的样本不同而变。 Parameter is the population mean \(\mu\), fixed but unknown; statistic is \(\bar x = 6.8\), which changes from sample to sample.
- 关键陷阱:午休时间拦截会系统性地漏掉“此刻正在补觉 / 忙于社团 / 逃课睡觉”的人。这属于方便抽样只挑选容易接触到的人作为样本。它几乎必然带来偏差,因为“容易被找到”本身与所研究的特征相关。Choosing whoever is easy to reach. It almost always biases results, because being easy to reach is itself related to the variable studied.式的偏倚,扩大样本量只会把同一个偏差放大得更精确。 The trap: stopping people at lunch systematically misses those napping, at club meetings, or skipping class. This is convenience samplingChoosing whoever is easy to reach; being reachable is itself related to the variable studied.只挑选容易接触到的人作为样本;"容易被找到"本身与所研究的特征相关。 bias — and a larger sample only estimates the same wrong number more precisely.
例 2 概率论方向:已知分布求概率Example 2 The probability direction: distribution known, find the probability
- 先标准化:把 \(X\) 换成 \(Z=\dfrac{X-\mu}{\sigma}\),这样任何正态问题都变成标准正态问题。 First standardise: replace \(X\) by \(Z=\dfrac{X-\mu}{\sigma}\), turning every Normal question into a standard-Normal one. \[z_1=\frac{4-3.2}{0.7}=1.143,\qquad z_2=\frac{2.5-3.2}{0.7}=-1.0\]
- 再把问题翻成面积语言:\(P(X>4)=P(Z>1.143)\),查表或按图形求右侧尾部面积。 Then translate into areas: \(P(X>4)=P(Z>1.143)\); read the right-tail area from the table or the figure. \[P(Z>1.143)=1-\Phi(1.143)\approx 0.1265\]
- (b) 是两个 z 之间的面积,用“大减小”: Part (b) is the area between two z-values — "big minus small": \[P(-1.0<Z<1.143)=\Phi(1.143)-\Phi(-1.0)\approx 0.8735-0.1587=0.7148\]
normalcdf(2.5, 4, 3.2, 0.7) → 0.7148
随堂练习Check Your Understanding
先自己选,再点“查看解答”。每题都给出考点、逐步推理与错误选项诊断——错也要错得明白。 Choose first, then reveal. Every question comes with the tested idea, step-by-step reasoning and a diagnosis of each wrong option.
下列哪一个随机变量是连续型?
Which of the following random variables is continuous?
- a某班 30 名学生中戴眼镜的人数the number of students wearing glasses in a class of 30
- b掷一枚骰子得到的点数the number showing when a die is rolled
- c随机抽到的一名成年人的身高(厘米,精确测量)the height (cm, measured precisely) of a randomly chosen adult
- d一家医院今天的新生儿数量the number of babies born in a hospital today
- 逐个检查是否可列Check each for listability 人数、点数、新生儿数都是整数,可以写成 0,1,2,… 清单。Counts, die faces and births are integers — they can be written as 0, 1, 2, … a、b、d 都是离散型。a, b, d are all discrete.
- 身高为什么是连续型Why height is continuous 理论上可以是 172.3、172.31、172.307… 任意精度,取值铺满一个区间,无法列出清单。In principle 172.3, 172.31, 172.307… — any precision, filling an interval, impossible to list. 只有 c 是连续型。Only c is continuous.
| 选项Option | 判断与理由Verdict & reason |
|---|---|
| a | 错。人数是计数型,只能取整数,离散。Wrong: a count, integer-valued, discrete. |
| b | 错。骰子点数只有 6 个可能值,离散。Wrong: only 6 possible values, discrete. |
| c | 对。身高可精确到任意小数位,铺满区间,连续。Correct: height is measurable to any precision and fills an interval. |
| d | 错。新生儿数量是计数,离散。Wrong: a count, discrete. |
“已知某工厂灯泡寿命服从均值 1200 小时、标准差 80 小时的正态分布,求随机一只灯泡寿命少于 1100 小时的概率。” 这个问题属于
"Bulb lifetime is known to be Normal with mean 1200 h and SD 80 h; find the probability that a randomly chosen bulb lasts less than 1100 h." This question belongs to
- a统计学,因为有真实数据statistics, because real data are involved
- b概率论,因为分布已知、要求的是概率probability, because the model is known and a probability is required
- c两者都不是,因为没有样本neither, because there is no sample
- d无法判断cannot be determined
- 看“已知”的是什么What is given? 题目明确给出 \(\mu=1200,\ \sigma=80\) 且指定正态——模型已经完全确定。The problem states \(\mu=1200\), \(\sigma=80\) and Normality — the model is fully specified. 已知模型、问概率 → 概率论。Model known, probability asked → probability.
- 对比:若把题目倒过来Contrast: flip the question “抽了 25 只灯泡,平均 1180 小时,能否说明 \(\mu<1200\)?”——只给数据、要猜参数,这才是统计学(而且正是第 20–22 讲的内容)。"25 bulbs averaged 1180 h — can we conclude \(\mu<1200\)?" — data given, parameter asked: that is statistics (and exactly Lectures 20–22). 同一批数字,问法不同,学科方向就不同。Same numbers, different direction of reasoning.
从全校 800 名学生中随机抽取 40 人,算得平均每周运动时间 5.2 小时。下列哪一项是参数?
From 800 students, 40 are randomly selected and their mean weekly exercise time is 5.2 hours. Which of the following is a parameter?
- a这 40 人的平均运动时间 5.2 小时the mean of these 40 students, 5.2 hours
- b全校 800 名学生的平均每周运动时间the mean weekly exercise time of all 800 students
- c抽取的样本量 40the sample size, 40
- d被抽中的这 40 个人the 40 students selected
一项研究发现:“常喝咖啡的人心脏病发作率更低。” 但有研究者指出,喝咖啡的人往往更年轻、更常运动。在这个例子里,最可能的混杂变量是
A study finds that "coffee drinkers have lower heart-attack rates." Critics note that coffee drinkers tend to be younger and more physically active. The most likely confounding variable here is
- a心脏病发作率heart-attack rate
- b是否喝咖啡whether the person drinks coffee
- c年龄与运动习惯age and exercise habits
- d研究中的样本量the sample size of the study
- 画出三方关系Sketch the three-way relation 年龄/运动 → 影响“是否喝咖啡”(年轻人更爱喝、更爱动);年龄/运动 → 又直接影响心脏病风险。Age/activity → affects coffee drinking; age/activity → directly affects heart-attack risk. 两条路径都成立 → c 是混杂变量,它可能单独解释掉整个“咖啡保护效应”。Both paths exist → (c) is the confounder and may explain the whole "protective" effect by itself.
- 这意味着什么What this implies 观察性研究无法自己排除混杂,所以第 10 讲会讲随机化实验:随机分配能把这些变量“平均掉”。Observational data cannot rule out confounding, which is why Lecture 10 covers randomised experiments: random assignment averages such variables out. “相关不等于因果”——本课程会反复回到这句话。"Correlation is not causation" — a refrain of this course.
本讲小结Summary
- 概率论研究随机变量取值的可能性大小;统计学用样本数据去推断未知的参数。方向相反。
- 随机变量在试验前无法确定,但大量重复下有稳定规律;分布是对这个规律的完整描述。
- 离散型可数(概率表 / 概率直方图),连续型可量(密度曲线下的面积);连续型取精确值的概率为 0。
- 本课程的分布家族:正态、二项、几何、泊松、(以及推断阶段的 t 与 χ²)。
- 统计推断三步:总体参数 → 随机样本统计量 → 带不确定性的推断;偏差无法靠增大样本量消除。
- 比较两个群体的率时,先问一句“还有没有第三个变量”——这正是后面实验设计与回归分析的起点。
- Probability studies how likely the values of a random variable are; statistics uses sample data to infer unknown parameters. The directions are opposite.
- A random variable is unknown before the experiment yet stable in the long run; its distribution describes that stability completely.
- Discrete is countable (probability table / histogram); continuous is measurable (area under a density); a continuous variable has probability 0 of any exact value.
- The distribution families: Normal, binomial, geometric, Poisson — plus t and χ² in inference.
- Inference: population parameter → random sample statistic → conclusion with uncertainty; bias cannot be fixed by a larger sample.
- Before comparing two rates, ask "is there a third variable?" — the seed of experiment design and regression.
用图表描述分类数据Analyzing Categorical Data
拿到一份问卷结果,第一件事不是求平均数——分类变量根本不能求平均。这一讲把“分类数据”这副牌理清四件事:频数表怎么读、什么数据类型配什么图形、双向表里边际与条件分布的分母到底是谁、以及一张“数据没错”的图可以怎样在合规的边缘撒谎。1.4 的 mosaic plot 是 2019 CED 新增考点,多数教材还没写,这里一并讲透。
Handed a stack of survey responses, your first move is not to average anything — a categorical variable cannot be averaged. This lecture sorts the categorical deck into four questions: how to read a frequency table, which graph belongs to which kind of data, which denominator marginal and conditional distributions use, and how a graph built from perfectly correct data can still mislead. Mosaic plots (CED 1.4, still missing from most textbooks) are covered in full.
本讲学习目标Learning Objectives
- 认出分类变量,并把原始数据整理成频数表把每个类别里的人数(计数)列出来的表。所有频数相加等于总人数 n。A table listing the count of individuals in each category; the counts add to the total n.与相对频率表(百分比),并用“合计是否接近 100%”自检。
- 为分类数据选对图形:条形图用于比较各类数量,饼图只用于显示“部分占整体”,并排条形图 / 分段条形图用于比较两组。
- IDENTIFY 四种让分类数据图形误导的手法:纵轴截断、条形不等宽、用图片面积代替高度、拿饼图去比较不同总体。
- 从双向表 CALCULATE 并 DISPLAY 边际分布(分母 = 总人数)。
- 从双向表 CALCULATE 并 DISPLAY 条件分布(分母 = 某个行合计或列合计),并认出题目问的是哪一种。
- 用一句完整的英文 DESCRIBE 两个分类变量之间的 association,说明何时仍不能下因果结论;会读 mosaic plot 的宽与高。
- IDENTIFY a categorical variable and organize raw responses into a frequency tableA table of the count of individuals in each category; the counts add to n.列出每个类别人数的表;所有计数相加等于 n。 and a relative frequency table, CHECKING that the percentages total about 100%.
- CHOOSE the right display: a bar graph compares counts across categories, a pie chart shows only parts of one whole, and side-by-side or segmented bar graphs compare two groups.
- IDENTIFY the four ways categorical graphs deceive: a truncated axis, unequal bar widths, pictures whose area encodes the count, and pie charts used to compare separate populations.
- CALCULATE and DISPLAY the marginal distribution from a two-way table (denominator = the grand total).
- CALCULATE and DISPLAY a conditional distribution (denominator = a row or column total), and RECOGNISE which one a question is asking for.
- DESCRIBE the association between two categorical variables in one complete sentence, STATE why causation is not supported, and INTERPRET the width and height of a mosaic plot.
核心概念Core Concepts
2.1 分类变量与频数表:先把“桶”数清楚2.1 Categorical Variables and Frequency Tables: Count the Buckets First
分类变量把个体放进几个互不重叠的类别。整理它的第一步永远是:数每个类别里有几个;第二步把计数换成百分比——因为只有百分比能跨规模比较。
A categorical variable places each individual into one of several non-overlapping groups. Step one is always count the individuals in each category; step two converts counts to percents, because only percents can be compared across groups of different sizes.
下面这份数据统计了美国 13 838 家广播电台的节目形式(format)。变量是“节目形式”,它的取值是 Adult Contemporary、Country、News/Talk 这些类别。个体是一家电台。左表是计数,右表是同样的数换成了百分比。
The data below classify 13 838 U.S. radio stations by format. The variable is format; its values are Adult Contemporary, Country, News/Talk and so on; an individual is one station. The counts and the percents describe exactly the same distribution.
| 节目形式 FormatFormat | 频数(电台数)Count of stations | 相对频率(%)Relative frequency (%) |
|---|---|---|
| News/Talk 新闻/谈话 | 2 179 | 15.7 |
| Country 乡村 | 2 066 | 14.9 |
| Religious 宗教 | 2 014 | 14.6 |
| Other 其他 | 1 579 | 11.4 |
| Adult Contemporary 成人当代 | 1 556 | 11.2 |
| Adult Standards 成人经典 | 1 196 | 8.6 |
| Oldies 老歌 | 1 060 | 7.7 |
| Rock 摇滚 | 869 | 6.3 |
| Spanish Language 西班牙语 | 750 | 5.4 |
| Contemporary Hit 流行金曲 | 569 | 4.1 |
| Total 合计 | 13 838 | 99.9 |
读表时注意两件事。第一,变量名与取值别搞混:“节目形式”是变量,“乡村”是它的一个取值。第二,类别要互斥且穷尽——一家电台不能同时被算进 Country 和 Rock,所有电台也必须都能落进某一类(所以最后一类永远叫 Other)。这正是 AP 选择题最爱设的第一道陷阱。
Two things to watch. First, do not confuse the variable with a value: format is the variable, "Country" is one of its values. Second, the categories must be mutually exclusive and exhaustive — no station may count in both Country and Rock, and every station must land somewhere (hence the inevitable "Other"). This is the first trap AP multiple choice sets.
2.2 条形图与饼图:各管一件事2.2 Bar Graphs and Pie Charts: Each Has One Job
条形图用高度编码数量,适合比较任何分类分布;饼图用面积编码比例,只在你要说“这一块占整体的百分之几”时才用——它不能比较两个总体。
A bar graph encodes counts in height and can compare any categorical distributions; a pie chart encodes proportions in area and belongs only where you must say "what fraction of one whole" — it cannot compare two populations.
条形图(Bar graph)Bar graph
能做的事:比较各类的数量或百分比;类别可以任意排序;能一眼看出最大、最小与“长尾”。纵轴可以换任何单位(计数、百分比、每千人)。
Can do: compare counts or percents across categories, in any order; shows the largest, the smallest and any long tail at a glance. The axis may use counts, percents or rates.
必守规则:柱宽必须全部相同;纵轴从 0 开始(因为人眼用高度比数量)。
Non-negotiable: all bars must be the same width, and the axis must start at 0 (the eye reads height as quantity).
饼图(Pie chart)Pie chart
能做的事:强制显示“各部分加起来是 100%”的整体;适合 3–6 个类别、且你只想说“谁占大头”。
Can do: force the reader to see the whole that adds to 100%; good for 3–6 categories when the message is simply "who owns the biggest slice".
不能做的事:比较两个总体(两个饼图并排,人眼无法比角度);显示计数 n;显示多过 6–7 类时的细微差别。
Cannot do: compare two populations (nobody can compare angles across two pies); show n; reveal small differences once there are more than 6–7 slices.
“这两年的数据画两个饼图比一比”——这是 AP 判错的典型答案。饼图只能描述一个整体内部的构成,不能用来比较。要比较两个年份,用并排条形图(side-by-side,每个类别两根柱)或分段条形图(segmented,每根柱都拉长到 100%,内部按比例分段)。判断标准很简单:要比较,就让“长度”出现在同一个坐标轴上。
"Draw two pie charts, one per year, and compare" is a classic wrong answer. A pie chart describes one whole; it cannot compare. To compare two years, use a side-by-side bar graph (two bars per category) or a segmented bar graph (every bar stretched to 100% and filled proportionally). The rule is simple: to compare, put the lengths on one common axis.
2.3 什么在让图形说谎:四种可诊断的失真2.3 What Makes a Graph Deceive: Four Diagnosable Distortions
数据可以全对,图仍然在撒谎。AP 要求你认出的只有四种:纵轴截断、条形不等宽、用面积(图片)代替高度、以及类型不匹配(拿饼图去比较)。诊断永远先问这三个问题——纵轴从几开始?宽度变了吗?图型配得上数据类型吗?
The numbers can all be correct and the graph can still lie. AP asks you to recognise exactly four species: a truncated axis, unequal bar widths, area (pictographs) used in place of height, and a type mismatch (a pie used to compare). Diagnose with three questions: where does the axis start? did the width change too? does the graph type match the data type?
| 症状Symptom | 为什么误导Why it misleads | 怎么修The fix |
|---|---|---|
| 纵轴从 78 开始,不从 0Axis starts at 78, not 0 | 柱高被“裁掉一截”,小差距变成大差距;人眼读的是柱子的可见长度。The bars lose their lower segment, so small gaps look large; the eye reads visible length. | 纵轴从 0 起;若真想强调小差距,用点图或直接写数字。Start at 0; if small gaps matter, use a dot plot or label the values. |
| 用图片代替条形(pictograph)Pictures instead of bars (pictograph) | 图片同时放大高和宽:数量翻倍,面积变四倍,人眼跟着面积走。Both height and width grow: double the count, quadruple the area — and the eye follows area. | 坚持等宽条形;若用图片,只许改变数量、保持尺寸。Keep bars equal width; if pictures are used, change only the number, never the size. |
| 3D 饼图 / 倾斜透视3-D pie or slanted perspective | 靠前的扇形被透视放大,12% 与 12% 看起来不一样大。Front slices are magnified by perspective, so two 12% slices look different. | 二维饼图;类别多时直接换条形图。Use a flat pie; switch to bars when there are many categories. |
| 用饼图比较两个总体Pies used to compare two populations | 角度差 3 个百分点,人眼根本分辨不出;且两块饼的 n 可能不同。A 3-point difference in angle is invisible, and the two pies may rest on different n. | 并排条形图(用百分比);两组样本量不同时尤其必须用百分比。Side-by-side bars in percents — mandatory when the two n differ. |
L2 = L1 / sum(L1) * 100 → {15.75, 14.93, 14.55, 11.41, 11.24, 8.64, 7.66, 6.28, 5.42, 4.11}
=b1/sum(b1)*1002.4 双向表与边际分布:分母是总人数2.4 Two-Way Tables and Marginal Distributions: Denominator = Grand Total
一个数据集里有两个分类变量时,用双向表。边际分布回答的是“在全体人当中,某个变量的取值怎么分布”——所以分母永远是表格右下角的总人数。
When one data set carries two categorical variables, use a two-way table. A marginal distribution answers "among everyone, how are the values of this variable spread?" — so its denominator is always the grand total in the bottom-right corner.
下面是一份 4 826 名美国年轻人(young adults)的调查,问他们对“自己将来会很有钱”的看法。行变量是看法(5 类),列变量是性别(2 类)。先别看百分比,先读表:一共几个人?两个变量各是什么?这是拿题第一步。
The table below surveys 4 826 U.S. young adults on whether they think they will be rich. The row variable is opinion (5 values), the column variable is gender (2 values). Before touching percents, read the table: how many individuals, and what are the two variables? That is step one on every exam question.
| 对“会很有钱”的看法Chance of getting rich | 男性 MaleMale | 女性 FemaleFemale | 合计 TotalTotal |
|---|---|---|---|
| Almost no chance 几乎不可能 | 98 | 96 | 194 |
| Some chance 有点可能 | 286 | 426 | 712 |
| A 50-50 chance 五五开 | 720 | 696 | 1 416 |
| A good chance 很可能 | 758 | 663 | 1 421 |
| Almost certain 几乎确定 | 597 | 486 | 1 083 |
| 合计 TotalTotal | 2 459 | 2 367 | 4 826 |
| 看法的边际分布Marginal distribution of opinion | 计算(分母 4 826)Computation (denominator 4 826) | 百分比Percent |
|---|---|---|
| Almost no chance | 194 / 4 826 | 4.0% |
| Some chance | 712 / 4 826 | 14.8% |
| A 50-50 chance | 1 416 / 4 826 | 29.3% |
| A good chance | 1 421 / 4 826 | 29.4% |
| Almost certain | 1 083 / 4 826 | 22.4% |
男性 2 459 人、女性 2 367 人,“几乎确定”的男性 597 人、女性 486 人。直接比 597 > 486 是不公平的——男性本来就多了 92 人。换成百分比:24.3% 对 20.5%,差距仍然存在,但现在两个数字是在同一个尺度上。只要两组样本量不同,就必须用百分比。
There are 2 459 males and 2 367 females; 597 males and 486 females answered "almost certain". Comparing 597 > 486 is unfair — the male group is 92 people larger to begin with. In percents: 24.3% versus 20.5%. The gap survives, but now both numbers live on the same scale. Whenever the two groups differ in size, use percents.
2.5 条件分布与 association:分母换成了行或列2.5 Conditional Distributions and Association: Denominators Become Rows or Columns
条件分布问的是“在某一个取值的人当中,另一个变量怎么分布”。所以分母换成那一行(或那一列)的合计。两个变量的条件分布不同,就叫它们有 association。
A conditional distribution asks: "among individuals with one particular value, how is the other variable distributed?" Its denominator is that row's (or column's) total. When the conditional distributions differ, the two variables are associated.
| 看法Opinion | 男性(分母 2 459)Male (denom. 2 459) | 女性(分母 2 367)Female (denom. 2 367) | 差距(百分点)Gap (percentage points) |
|---|---|---|---|
| Almost no chance | 98 / 2 459 = 4.0% | 96 / 2 367 = 4.1% | 0.1 |
| Some chance | 286 / 2 459 = 11.6% | 426 / 2 367 = 18.0% | 6.4 |
| A 50-50 chance | 720 / 2 459 = 29.3% | 696 / 2 367 = 29.4% | 0.1 |
| A good chance | 758 / 2 459 = 30.8% | 663 / 2 367 = 28.0% | 2.8 |
| Almost certain | 597 / 2 459 = 24.3% | 486 / 2 367 = 20.5% | 3.8 |
① 关联不等于因果。“性别与看法有关联”只是在说两份条件分布不同,绝不能说“性别导致看法不同”。② 这份数据只是一个样本。样本里 6.4 个百分点的差距,是否代表总体真的有差距?这需要正式的推断检验(第 22 讲的 χ² 检验),描述统计无权回答。
① Association is not causation. "Gender and opinion are associated" says only that the two conditional distributions differ; never "gender causes the opinion". ② These data are one sample. Whether a 6.4-point gap in the sample reflects a real gap in the population needs formal inference (the χ² test of Lecture 22); descriptive statistics cannot answer it.
2.6 Mosaic plot:一条图同时讲两件事(CED 1.4 新考点)2.6 Mosaic Plots: Width and Height in One Picture (CED 1.4)
Mosaic plot 用宽度表示每组有多少人,用高度表示组内的条件分布。宽度告诉你“组有多大”,高度告诉你“组内怎么分”——比较各列中同一色块的高度,就是在比较条件分布,也就是在判断 association。
A mosaic plot encodes group size in width and the conditional distribution in height. Width says how large a group is; height says how that group splits — comparing the height of the same block across columns is exactly comparing conditional distributions, which is how you judge association.
下面这份数据来自一所中学:三个年级各有多少人参加课后辅导。读图只有四步,按顺序做,不要跳:
The data below come from one secondary school: how many students in each grade attend after-school tutoring. Read a mosaic in exactly four steps, in order.
- 看总面积:整块矩形 = 全部 300 人。面积在 mosaic 里代表计数,不是百分比。 Read the total area: the whole rectangle is all 300 students. Area in a mosaic encodes count, not percent.
- 看列宽:宽度比 = 各组人数比。这里 120 : 100 : 80 变成 40% : 33.3% : 26.7%。列宽相同,说明两组人数一样多。 Read the widths: they are proportional to group size — here 120 : 100 : 80 becomes 40% : 33.3% : 26.7%. Equal widths mean equal group sizes.
- 看列内高度:每列都被拉满到 100%,所以高度直接读成条件百分比。参加辅导:九年级 30%、十年级 45%、十一年级 55%。 Read the within-column heights: every column fills to 100%, so height reads directly as a conditional percent — 30%, 45%, 55% for grades 9, 10, 11.
- 跨列比同一色块:蓝块高度 30 → 45 → 55,逐列升高 ⇒ 有关联;并且方向是“年级越高,参加辅导的比例越高”。 Compare one block across columns: the blue block rises 30 → 45 → 55, so there is an association, and its direction is "the higher the grade, the more likely tutoring".
① 不要用面积比大小——面积是“人数”,判断关联看的是高度。② 列宽不同不代表有关联,它只代表两组人数不同;③ 别把 mosaic 当成“彩色饼图”,它没有“整体”的概念,它是一张被拉长的双向表。
① Do not compare areas — area is a count; association lives in the heights. ② Unequal widths say nothing about association, only that the groups differ in size. ③ A mosaic is not a "coloured pie": there is no single whole — it is a two-way table stretched into a rectangle.
例题精讲Worked Examples
例 1 一张双向表的五种问法(同一堆数字,五个分母)Example 1 Five questions, one table, five denominators
- 先写清三件事:两个变量是什么、总人数 n = 4 826、每个问题的“当中”是谁。这一步写在纸上,不要只在脑子里想。 Write three facts first: the two variables, the grand total n = 4 826, and the "among ___" group for each part. Put it on paper, not in your head. \[\text{(a) } \frac{\text{row total}}{4826}\qquad \text{(b) } \frac{\text{male cell}}{2459}\qquad \text{(d) } \frac{597}{1083}\]
- (a) 边际分布:分母 = 4 826。194/4826 = 4.0%,712/4826 = 14.8%,1416/4826 = 29.3%,1421/4826 = 29.4%,1083/4826 = 22.4%。五个加起来 99.9%,因为舍入。 (a) Marginal: denominator 4 826. 4.0%, 14.8%, 29.3%, 29.4%, 22.4%; they total 99.9% because of rounding.
- (b)(c) 条件分布:分母换成行合计。男性用 2 459,女性用 2 367。两列各自加起来都应是 100%。 (b)(c) Conditional: denominators become the row totals, 2 459 and 2 367. Each column of percents must total 100%. \[ \text{Male: } 4.0,\ 11.6,\ 29.3,\ 30.8,\ 24.3\ (\%)\qquad \text{Female: } 4.1,\ 18.0,\ 29.4,\ 28.0,\ 20.5\ (\%) \]
- (d) 反向条件分布:分母换成列合计 1 083。597/1083 = 55.1% 是男性,44.9% 是女性。注意 55.1% 和 (b) 里的 24.3% 是同一个格子、两个分母——这正是考点。 (d) Reverse conditional: denominator is the column total 1 083. 597/1083 = 55.1% male, 44.9% female. Note that 55.1% and the 24.3% in (b) are the same cell with two different denominators — that is exactly the point being tested.
- (e) 写关联:必须引用两个数字。“There is an association between gender and opinion: females are more likely than males to answer ‘some chance’ (18.0% vs 11.6%), while males are more likely to answer ‘almost certain’ (24.3% vs 20.5%).” (e) Write the association with two numbers. Name both variables, say the conditional distributions differ, and quote the largest gap: 18.0% vs 11.6% at "some chance".
例 2 三张“数据都对”的图,错在哪里Example 2 Three graphs with correct data and wrong messages
- A 的问题在纵轴起点,不在柱高。三个数的真实差是 8 个百分点;截断后可视高度变成 4 : 8 : 12 格,观感差距约三倍。修法:纵轴回到 0;若确实要突出小差距,改用点图或直接标注数值。 A's fault is the origin, not the heights. The real range is 8 percentage points; truncation turns it into visible heights of 4 : 8 : 12 — a threefold impression. Fix: start at 0, or use a dot plot / labelled values when small gaps are the message.
- B 的问题在“面积”被当成“数量”。80 是 20 的 4 倍,图标被放大成 2×2 倍,面积变成 16 倍,人眼读到的夸张程度远超 4 倍。修法:所有图标同尺寸,只改变个数(4 个图标 vs 1 个图标),或改用等宽条形。 B's fault is area standing in for count. 80 is four times 20, but a 2×2 enlargement gives sixteen times the area. Fix: keep every icon the same size and vary the number of icons (4 icons vs 1), or use equal-width bars.
- C 的问题在透视。3D 饼图靠前的扇形被放大,两个同为 12% 的扇形看起来一大一小;而且类别有四个以上时,人眼本来就读不准角度。修法:二维饼图;类别多于 5–6 个或需要比较时,改用条形图。 C's fault is perspective. Front slices are magnified, so two identical 12% slices look unequal; beyond four or five slices the eye cannot read angles anyway. Fix: a flat pie, or bars when comparing or when there are many categories.
- 三步诊断口诀:① 纵轴从几开始?(0 以外就要警惕)② 宽度 / 面积是否跟着变?(变了就是面积错觉)③ 图形类型配得上数据类型吗?(比较两个总体不能用饼图) Three-question diagnosis: ① where does the axis start (anything but 0 is suspect)? ② did width or area change with the value? ③ does the graph type suit the data type (two populations cannot be compared with pies)?
随堂练习Check Your Understanding
先自己选,再点“查看解答”。四道题分别打四个不同的漏洞:图形类型、分母、结论措辞、以及图表的诚实性。 Choose first, then reveal. The four questions attack four different holes: graph type, denominator, wording of a conclusion, and the honesty of a display.
某校想比较 2015 年与 2025 年学生“最常用的社交平台”的分布。下列哪一种图形最适合用来比较这两年?
A school wants to compare the distribution of students' most-used social platform in 2015 with that in 2025. Which display best supports the comparison?
- a两个并排的饼图,各画一年的数据two pie charts placed side by side, one per year
- b一个并排条形图(每个平台两根柱,都用百分比)a side-by-side bar graph, two bars per platform, both in percents
- c一个 3D 饼图,两年叠加显示one 3-D pie with the two years overlaid
- d一张频数表,只列 2025 年的计数a frequency table listing only the 2025 counts
- 先判断变量类型与目的Classify the variable and the goal 变量是分类的(平台),目的不是“显示一年的构成”,而是“两年之间变了什么” —— 这是比较,不是构成。The variable is categorical, and the goal is not "show one year's make-up" but "what changed between years" — a comparison, not a composition. 有“构成”目标时饼图还勉强可用;一旦是“比较”,饼图立即出局(a、c 都出局)。A pie is barely defensible for composition; the moment the goal is comparison, pies are out (so are a and c).
- 再看分母:两年人数很可能不同Now the denominator: the two years differ in size 若 2015 年有 800 人、2025 年有 1 200 人,直接比计数毫无意义——必须两边都换成百分比。If 2015 had 800 students and 2025 has 1 200, comparing counts is meaningless; both must be in percents. 并排条形图 + 百分比 = 正确答案;d 只给一年、只给计数,两个条件都不满足。Side-by-side bars in percents is the answer; d reports one year in counts, failing on both counts.
- 顺手检查 c 的额外问题Note why c fails twice 3D 会让靠前的扇形被透视放大,两个本来相等的扇形看起来一大一小;叠加两年更是无法解读。3-D perspective magnifies front slices, so equal slices look unequal; overlaying two years is unreadable besides. c 同时踩了“透视失真”与“饼图比较”两个坑。c trips both the perspective distortion and the pie-comparison traps.
| 选项Option | 判断与理由Verdict & reason |
|---|---|
| a | 错。饼图不能比较两个总体;两个饼并排只会让读者凭感觉猜大小。Wrong: pies cannot compare populations; side-by-side pies invite guessing. |
| b | 对。同一坐标轴上每个平台两根柱,都用百分比,能直接读出“谁升谁降”。Correct: two bars per platform on one axis, in percents, so rises and falls are directly readable. |
| c | 错。3D 透视让扇形面积失真,且两年无法叠加在一张饼里。Wrong: perspective distorts areas, and two years cannot share one pie. |
| d | 错。只用一年、只有计数,既不能比较,也忽略了两年样本量不同。Wrong: one year, counts only — no comparison, and it ignores unequal group sizes. |
在 4 826 名年轻人中,有 1 083 人回答“几乎确定”,其中男性 597 人。在回答“几乎确定”的人当中,男性占多少?
Of 4 826 young adults, 1 083 answered "almost certain", including 597 males. Among those who answered "almost certain", what percent are male?
- a597 / 4 826 ≈ 12.4%597 / 4 826 ≈ 12.4%
- b597 / 2 459 ≈ 24.3%597 / 2 459 ≈ 24.3%
- c597 / 1 083 ≈ 55.1%597 / 1 083 ≈ 55.1%
- d1 083 / 4 826 ≈ 22.4%1 083 / 4 826 ≈ 22.4%
- 先给题目画括号Bracket the phrasing first “在[回答‘几乎确定’的人]当中,[男性]占多少?”——括号里的前一个是被限定的总体,后一个是我们要数的那部分。"Among [those answering almost certain], what percent are [male]?" The first bracket is the restricted population; the second is the part being counted. 分母 1 083,分子 597。Denominator 1 083, numerator 597.
- 算并检验Compute and sanity-check \[ \frac{597}{1083}=\frac{486}{1083}? \quad\Rightarrow\quad \frac{597}{1083}\approx 0.551 \] 反过来算女性的比例 486/1083 = 44.9%,两者相加 100%,检验通过。The female share is 486/1083 = 44.9%; the two add to 100%, so the check passes. 55.1% 的“几乎确定”者是男性——虽然男性只占全部样本的 50.9%。55.1% of the "almost certain" group is male, although males are only 50.9% of the whole sample.
- 看穿干扰项See through the distractors b 的分母 2 459 是“男性总数”,算出来是“男性中回答几乎确定的比例”,方向正好反了;a 用的是全体,得到的是“全体里既男性又几乎确定的比例”。b's denominator, 2 459, gives "the percent of males who said almost certain" — the reverse direction. a uses the grand total, giving "male and almost certain" as a share of everyone. 同一个格子 597,配三个分母就有三个完全不同的含义。One cell, 597, carries three completely different meanings under three denominators.
| 选项Option | 判断与理由Verdict & reason |
|---|---|
| a | 错。分母用了全体 4 826,得到“联合”比例,答错了问题。Wrong: the grand total gives a joint percent, not the asked conditional. |
| b | 错。分母用了男性合计,方向反了——那是“男性中几乎确定的比例”。Wrong: the male total reverses the direction — that is the percent of males who said it. |
| c | 对。分母是“几乎确定”这一列的合计 1 083。Correct: the denominator is the column total of 1 083. |
| d | 错。这只是“几乎确定”者在全体中的边际比例 22.4%,与性别无关。Wrong: that is the marginal 22.4% of the whole, with no gender information. |
根据上表(性别 × 看法),下列哪一句最好地描述了性别与看法之间的关联?
Using the gender × opinion table, which sentence best describes the association?
- a29.3% 的人选择“五五开”,说明性别与看法没有关联。29.3% chose "a 50-50 chance", so gender and opinion are not associated.
- b条件分布因性别而不同:女性回答“有点可能”的比例(18.0%)高于男性(11.6%),说明两者有关联。The conditional distributions differ by gender: 18.0% of females versus 11.6% of males chose "some chance", so the variables are associated.
- c因为样本有 4 826 人,所以性别导致了对未来的看法不同。Because the sample is 4 826 people, gender causes the difference in opinion.
- d女性的边际分布与男性不同。The marginal distribution of females differs from that of males.
- 先排除术语错用Eliminate the misused term 关联是关于“在给定一个变量取值时,另一个变量的分布是否改变”,所以永远是条件分布的比较。d 说“边际分布不同”——每个人只有一个性别,谈性别本身的分布没有意义。Association asks whether the distribution of one variable changes given the other, so the comparison is always conditional. d says "marginal distributions differ" — but each person has exactly one gender, so a distribution of gender by group is meaningless. d 术语错误,直接淘汰。d misuses the term and is out.
- 再排除“无证据”与“因果”Then kill "no evidence" and "causation" a 用边际百分比去谈关联,逻辑不成立;c 把“样本大”当成因果的理由,同时把观察性数据当成了实验。a uses a marginal percent to talk about association, which is a non-sequitur; c treats a large sample as a licence for causation, and observational data as if experimental. c 犯了“关联 = 因果”的大忌,即使样本再大也不能说。c commits association-equals-causation, which no sample size can rescue.
- 确认 b 三要素齐全Confirm b has all three parts 两个变量(性别、看法)、条件分布不同、证据(18.0% vs 11.6%)——三样都在,且没有越界说因果。Both variables, differing conditional distributions, and the 18.0% vs 11.6% evidence are all present, with no causal overreach. b 是唯一合格的描述句。b is the only complete description.
| 选项Option | 判断与理由Verdict & reason |
|---|---|
| a | 错。边际百分比无法说明两个变量之间有没有关联。Wrong: a marginal percent cannot speak to association. |
| b | 对。条件分布不同 + 具体百分比证据 + 无因果断言。Correct: differing conditional distributions, concrete evidence, no causal claim. |
| c | 错。样本量大不等于能推因果;观察性数据无法排除混杂变量。Wrong: a large n never licenses causation; observational data cannot rule out confounding. |
| d | 错。术语错误:应比较条件分布,且“性别的边际分布”本身没有意义。Wrong: the comparison must be of conditional distributions, and a "marginal distribution of gender" is meaningless here. |
一张海报用条形图展示三种饮料的销量:A 为 200 万、B 为 400 万、C 为 800 万。作者的柱宽依次为 1、2、4 厘米,柱高也依次为 1、2、4 厘米。下列哪一项是最准确的批评?
A poster shows soft-drink sales of 2, 4 and 8 million with bars whose widths are 1, 2 and 4 cm and whose heights are also 1, 2 and 4 cm. Which criticism is most accurate?
- a应该改用饼图,因为三个类别构成一个整体。Use a pie chart instead, since the three categories form a whole.
- b柱宽与柱高同时变化,使 C 的面积是 A 的 16 倍,而销量只有 4 倍,读者会严重高估 C。Width and height both grow, so C's area is 16 times A's while its sales are only 4 times — readers will badly overestimate C.
- c只要纵轴从 0 开始,柱宽怎么变都没关系。As long as the axis starts at 0, varying widths is harmless.
- d问题在于没有写单位。The only problem is the missing units.
- 算一算面积比Compute the area ratio A 的面积 1×1 = 1;C 的面积 4×4 = 16。而真实销量之比是 800/200 = 4。A's area is 1×1 = 1; C's is 4×4 = 16, while the true ratio of sales is 800/200 = 4. \[ \frac{\text{Area}_C}{\text{Area}_A}=\frac{4\times 4}{1\times 1}=16 \quad\text{but}\quad \frac{\text{sales}_C}{\text{sales}_A}=\frac{800}{200}=4 \] 视觉夸大 4 倍——这就是“面积错觉”。The visual exaggeration is fourfold — the area illusion.
- 为什么 a 不是更好的答案Why a is not the better answer 三个类别确实是“整体”的一部分,但本题错在编码方式,不在图形类型;换成饼图也没解决“用面积骗人”的问题(饼图本身就是面积编码,类别少时更难精确比较)。The three categories are parts of a whole, but the error lies in the encoding, not in the chart type; a pie would not fix area-based deception and is harder to compare precisely. 问“最准确”时,要挑直击错误机制的那一项。When asked for the "most accurate" critique, pick the one that names the mechanism.
- 正确做法The correct practice 柱宽统一(例如都 1 厘米),柱高按数量,纵轴从 0 开始。这时 1 : 2 : 4 的高度比才正确对应 1 : 2 : 4 的销量比。Keep all bars the same width, let height carry the count, and start the axis at 0. Only then does the 1 : 2 : 4 height ratio match the 1 : 2 : 4 sales ratio. 等宽 + 零起点 + 高度编码 = 条形图的三条底线。Equal width, zero origin, height as the code — the three hard rules of a bar graph.
| 选项Option | 判断与理由Verdict & reason |
|---|---|
| a | 错。换图形类型并没有解决“面积编码”的错误。Wrong: changing the chart type does not fix the area encoding. |
| b | 对。指出的正是机制:面积 16 倍 vs 数量 4 倍。Correct: names the mechanism — 16× the area for 4× the quantity. |
| c | 错。纵轴从 0 起只是其中一个条件,柱宽同样必须相等。Wrong: a zero origin is only one of the requirements; widths must still be equal. |
| d | 错。单位确实该写,但这不是主要问题。Wrong: units matter, but that is not the main fault. |
本讲小结Summary
- 分类变量先做频数表,再换相对频率表;百分比合计约 100%(舍入误差除外),差太多说明分母错了。
- 条形图比较各类数量(等宽、纵轴从 0 开始);饼图只显示一个整体的构成,不能比较两个总体;比较两组用并排或分段条形图,且必须用百分比。
- 四种失真:纵轴截断、条形不等宽、图片面积编码、3D 透视。诊断先问“纵轴从几开始、宽度变没变、图型配不配”。
- 边际分布的分母是总人数;条件分布的分母是某个行合计或列合计。“在……当中”决定分母。
- 两个变量的条件分布不同就叫有 association;描述时必须引用至少一组百分比作证据,并声明不能推出因果。
- Mosaic plot:宽度 = 组的大小,高度 = 组内条件分布;跨列比较同一色块的高度差,就是判断关联。
- For a categorical variable, build a frequency table, then a relative frequency table; percents total about 100% (rounding aside) — a big gap means a denominator error.
- A bar graph compares counts (equal widths, zero origin); a pie shows only one whole and cannot compare populations; comparisons use side-by-side or segmented bars in percents.
- Four distortions: truncated axis, unequal bar widths, area-based pictographs, 3-D perspective. Ask: where does the axis start, did the width change, does the type fit?
- A marginal distribution divides by the grand total; a conditional distribution divides by a row or column total. "Among ___" fixes the denominator.
- Two variables are associated when their conditional distributions differ; a complete description quotes actual percents and refuses to claim causation.
- Mosaic plot: width = group size, height = the within-group conditional distribution; comparing one block's height across columns is how association is judged.
用图形描述定量数据Displaying Quantitative Data with Graphs
分类数据只能数“桶里有几个”,定量数据却有一整条数轴可用——所以图形也从“比高矮”变成了“看形状”。这一讲学三张图(点图、茎叶图、直方图)和一套描述语言(SOCS:shape, outliers, center, spread)。AP 每年都考“描述这个分布”,而阅卷老师只认四要素齐全的答案;少写一样,就少一分。
Categorical data let you count buckets; quantitative data give you a whole number line — so the graph changes from "which bar is taller" to "what shape is this". This lecture covers three displays (dot plot, stemplot, histogram) and one descriptive language: SOCS (shape, outliers, center, spread). AP asks "describe this distribution" every year, and readers award points only to answers containing all four elements.
本讲学习目标Learning Objectives
- MAKE 并 INTERPRET 定量数据的点图,知道它适合小样本、能保留每一个原始数值。
- MAKE 并 INTERPRET 茎叶图把每个数值拆成“茎”(除最后一位以外的部分)和“叶”(最后一位),按茎分行、叶按大小排列。它既像直方图那样显示形状,又保留了全部原始数据。Splits each value into a stem (all but the last digit) and a leaf (the last digit), rows by stem, leaves ordered. It shows shape like a histogram while keeping every raw value.,会用分裂茎(split stems)解决数据“挤在一行”的问题。
- MAKE 并 INTERPRET 直方图,说明组距(bin width)如何改变图形的形状与细节。
- IDENTIFY 分布的形状:对称 / 右偏 / 左偏,以及单峰 / 双峰 / 多峰;会用 SOCS 描述一个分布。
- COMPARE 两个或两个以上分布,并保证 shape, center, spread, outliers 四要素齐全、始终带上下文。
- DISTINGUISH 直方图与条形图(后者用于分类数据),并说明为什么比较不同样本量时必须用相对频率。
- MAKE and INTERPRET a dot plot of quantitative data, and STATE why it suits small data sets that keep every raw value.
- MAKE and INTERPRET a stemplotEach value split into a stem (all but the last digit) and a leaf (the last digit); rows by stem, leaves ordered. Shows shape like a histogram while keeping every raw value.把数值拆成茎与叶,按茎分行、叶排序;既显示形状又保留原始数值。, using split stems when the data bunch up in one row.
- MAKE and INTERPRET a histogram, and EXPLAIN how the choice of bin width changes the shape and the detail shown.
- IDENTIFY shape — symmetric, skewed right, skewed left — and unimodal, bimodal, multimodal; DESCRIBE a distribution using SOCS.
- COMPARE two or more distributions with all four elements — shape, center, spread, outliers — always in context.
- DISTINGUISH a histogram from a bar graph (the latter is for categorical data), and EXPLAIN why relative frequencies are required when sample sizes differ.
核心概念Core Concepts
3.1 点图:一个点就是一个人3.1 Dot Plots: One Dot, One Individual
点图把每个观测值画成一个点,数值相同就往上叠。它最大的优点是不丢信息——原始数值一个不少,所以样本小(n ≤ 30 左右)时优先用它。
A dot plot puts one dot per observation and stacks equal values. Its great advantage is that nothing is lost — every raw value is still visible — so use it for small data sets (roughly n ≤ 30).
下面是 20 名女学生回答“你有多少双鞋”的数据。拿到这 20 个数,别急着算平均数,先排序(这一步几乎所有图形都要用到),再画点图。
Below are 20 female students' answers to "how many pairs of shoes do you own?" Do not average yet — sort the values first (almost every display needs this), then draw.
原始数据(未排序):50, 26, 26, 31, 57, 19, 24, 22, 23, 38, 13, 50, 13, 34, 23, 30, 49, 13, 15, 51
Raw data (unsorted): 50, 26, 26, 31, 57, 19, 24, 22, 23, 38, 13, 50, 13, 34, 23, 30, 49, 13, 15, 51
3.2 茎叶图:像直方图,但原始数据一个都没丢3.2 Stemplots: Histogram-Shaped, Nothing Discarded
茎叶图把每个数拆成茎(除最后一位)和叶(最后一位)。造它五步:拆、列茎、填叶、排序、写 key。忘了 key,这张图就等于没画——AP 是明确扣分的。
A stemplot splits every value into a stem (all but the last digit) and a leaf (the last digit). Five steps: split, list the stems, attach the leaves, order them, and write the key. Forget the key and the plot is meaningless — AP deducts for it.
| 茎 stemStem | 叶 leaf(按从小到大排列)Leaves (in increasing order) | 该行人数Count |
|---|---|---|
| 1 | 3 3 3 5 9 | 5 |
| 2 | 2 3 3 4 6 6 | 6 |
| 3 | 0 1 4 8 | 4 |
| 4 | 9 | 1 |
| 5 | 0 0 1 7 | 4 |
| Key: 3 | 8 = 38 pairs of shoes(3|8 表示一位学生有 38 双鞋) | ||
这张图一眼就能看出:数据堆在 10–29 岁这一段(其实是 13–26 双),30 以上逐渐稀疏,最右边有个 57。它的轮廓和直方图一模一样,但每个叶子上都写着真实的数值——这就是茎叶图相对直方图唯一的优势,也是唯一该选它的场合:样本小、且你之后还要查原始数据。
Read at once: the values pile up in the 10s–20s, thin out above 30, and a lone 57 sits far right. The outline matches a histogram, but every leaf is a real digit — the one advantage of a stemplot, and the one situation to choose it: a small data set whose raw values you will still need.
上面“1”这一行有 5 个叶、“2”这一行有 6 个叶,一挤就看不出形状了。把每个茎劈成两行:第一行收叶 0–4,第二行收叶 5–9。于是“1”变成 1 | 3 3 3 与 1 | 5 9 两行,茎的数量翻倍、纵向分辨率也翻倍。规则只有一条:每一根茎都必须劈成同样多行,不能有的一分二、有的不分。
Row "1" carries five leaves and row "2" carries six, so the shape is crushed. Split each stem into two rows: leaves 0–4 in the first, 5–9 in the second. Then "1" becomes 1 | 3 3 3 and 1 | 5 9 — twice the rows, twice the vertical resolution. One rule: every stem must be split the same number of ways.
| 分裂后的茎(每根劈两行)Split stems (two rows each) | 叶Leaves | 形状信息What it shows |
|---|---|---|
| 1(叶 0–4)1 (0–4) | 3 3 3 | 13–19 这一段的真实轮廓:13 最多,15、19 各一个The real profile of 13–19: three 13s, then 15 and 19 |
| 1(叶 5–9)1 (5–9) | 5 9 | |
| 2(叶 0–4)2 (0–4) | 2 3 3 4 | 主峰落在 22–26The main peak lands at 22–26 |
| 2(叶 5–9)2 (5–9) | 6 6 | |
| 3(叶 0–4)3 (0–4) | 0 1 4 | 30–38 迅速变薄Thins out quickly over 30–38 |
| 3(叶 5–9)3 (5–9) | 8 | |
| 4(叶 0–4)4 (0–4) | (空)(empty) | 40–48 是空档:右偏的“尾巴”在这里断开40–48 is a gap — where the right tail breaks |
| 4(叶 5–9)4 (5–9) | 9 | |
| 5(叶 0–4)5 (0–4) | 0 0 1 | 50 附近又聚了 4 个人——这提示可能存在隐藏分组(后面的双峰)Four more cluster near 50 — a hint of a hidden subgroup (bimodality later) |
| 5(叶 5–9)5 (5–9) | 7 |
① 不写 key(最常见的扣分)。② 叶不排序——AP 要求从小到大。③ 茎不是“等长切分”:同一张图里不能一部分数据切十位、另一部分切百位。④ 漏掉空茎:如果 4 这一行没人,也要写“4 |”并且保持它与上下行的位置关系,否则形状被压缩,读者会以为数据是连续的。
① No key (the most common deduction). ② Leaves not ordered — AP wants increasing order. ③ Inconsistent splitting: one plot cannot split some values at the tens digit and others at the hundreds. ④ Omitting an empty stem: if no value falls in the 40s, still write "4 |", or the shape is compressed and the data look continuous.
3.3 直方图:把数轴切成一格一格3.3 Histograms: Slicing the Number Line into Bins
直方图把数据按等宽的组距(bin width)分组,每一格的高度是落在这一格里的人数。柱与柱之间没有空隙——这是它和条形图最根本的区别,因为在数轴上相邻的组是连续的,不是“分开的类别”。
A histogram groups data into equal-width bins; each bar's height is the count falling in that bin. There are no gaps between bars — the deepest difference from a bar graph, because neighbouring bins on a number line are contiguous, not separate categories.
组距太大 / 太小Too wide / too narrow
太大:把不同的峰合并成一个,形状被抹平,右偏可能看起来像对称。太小:每一格人数都是 0 或 1,形状由哪一格恰好接住一个点决定,锯齿状、不稳定。
Too wide: separate peaks merge, the outline flattens, right skew can look symmetric. Too narrow: most bins hold 0 or 1, so the shape is decided by where a single point happens to land — jagged and unstable.
经验样本 20–100 时,先用 5–8 格试画,再微调。
Rule of thumbFor n between 20 and 100, start with 5–8 bins and adjust.
频数还是相对频率?Counts or relative frequencies?
只描述一组数据:用频数就行。要比较两组样本量不同的数据:必须用相对频率(百分比),否则样本大的一组每根柱都更高,读者会误以为它的每个区间都更“多”。
Describing one group: counts are fine. Comparing groups of different sizes: you must use relative frequencies, or the larger group's bars will all look taller and readers will think every interval is more common.
例100 人的班与 30 人的班比较,“20–30 分有 9 人 vs 5 人”毫无意义;换成 9% vs 16.7% 才可比。
e.g.A class of 100 versus one of 30: "9 students vs 5 students" says nothing; 9% vs 16.7% does.
3.4 形状:对称、偏斜、单峰与双峰3.4 Shape: Symmetric, Skewed, Unimodal, Bimodal
描述形状只问三件事:左右对称吗?尾巴朝哪边?有几个峰?“右偏”指右边(大数值一侧)的尾巴更长,不是说数据都在右边——恰恰相反,多数数据挤在左边,尾巴拖到右边。
Shape needs only three questions: is it symmetric? which way does the tail run? how many peaks? "Skewed right" means the tail on the right (large values) is longer — it does not mean the data sit on the right; the bulk sits on the left and the tail drags right.
Shape(形状):对称 / 右偏 / 左偏;单峰 / 双峰 / 多峰。Outliers(异常值):有没有明显远离主体的点;有就说清位置与个数。Center(中心):用中位数或平均数,必须带单位与上下文。Spread(离散程度):range、IQR 或标准差,同样带单位。
Shape: symmetric / right-skewed / left-skewed; unimodal / bimodal / multimodal. Outliers: any point clearly detached — say where and how many. Center: median or mean, with units and context. Spread: range, IQR or standard deviation, again with units.
顺序写 S → O → C → S 最省力,也最不容易漏。AP 的评分点通常就按这四个格子给分:四格齐 = 满分,缺一格就少一分,没写上下文(“中位数是 26”——什么的 26?)也扣。
Writing S → O → C → S is the least error-prone order, and AP's points are essentially one per slot. All four slots filled earns full credit; one missing costs a point, and missing context ("the median is 26" — 26 of what?) also costs.
3.5 比较两个分布:四要素必须成对出现3.5 Comparing Distributions: All Four Elements, Every Time
比较两个分布时,AP 要的不是“各有各的特点”,而是同一把尺子量两边:形状怎么不同、中心谁大谁小、离散程度谁大谁小、各自有没有异常值。四要素一个都不能省,而且每一句都要提到两组。
When comparing two distributions, AP does not want two separate descriptions — it wants one ruler applied to both: how the shapes differ, which centre is larger, which spread is wider, and what outliers each has. No element may be skipped, and every sentence must name both groups.
① 只描述一组:写成“女生中位数 26,分布较散”就结束了,没有和男生对照——AP 判为“没有比较”。② 用频数比较不同样本量:这里两组都是 20 人还凑合,一旦一组 200 人、一组 20 人,必须换成相对频率,否则“更密”只是“更大样本”的假象。
① Describing only one group ("females median 26, fairly spread") with no reference to males — AP scores this as no comparison. ② Comparing counts across unequal n: here both groups are 20, but with 200 versus 20 you must switch to relative frequencies, or "denser" is just "bigger sample".
3.6 别把直方图当条形图3.6 Do Not Confuse a Histogram with a Bar Graph
一句话分辨:横轴是类别 → 条形图(柱间有缝);横轴是数轴 → 直方图(柱间无缝)。因为类别之间没有“中间”,而数轴上的 10–20 与 20–30 是紧挨着的。
One sentence: categorical axis → bar graph (gaps between bars); numeric axis → histogram (no gaps). Categories have nothing "in between", while 10–20 and 20–30 on a number line touch.
| 对比项Feature | 条形图 Bar graphBar graph | 直方图 HistogramHistogram |
|---|---|---|
| 数据类型Data type | 分类Categorical | 定量(已分组)Quantitative (binned) |
| 柱间空隙Gaps | 有(类别是分开的)Yes — categories are distinct | 无(组是相邻的)No — bins are adjacent |
| 能否重排Reordering | 能,任意顺序都合法Yes, any order is valid | 不能,顺序由数轴决定No — the number line fixes the order |
| 柱宽含义Bar width | 无意义(必须都相同)Meaningless (must be equal) | 就是组距,是你选的The bin width — your choice |
| 纵轴Vertical axis | 计数或百分比Counts or percents | 频数或相对频率(也可用密度)Frequency or relative frequency (or density) |
例题精讲Worked Examples
例 1 描述一个分布:把 SOCS 填满Example 1 Describe one distribution: fill all of SOCS
- 先排序并写下五个数(这是描述的地基,不排序一定会算错中位数):13, 13, 13, 15, 19, 22, 23, 23, 24, 26, 26, 30, 31, 34, 38, 49, 50, 50, 51, 57。n = 20,中位数取第 10、11 个的平均 = 26。 Sort first and record five numbers (the foundation — unsorted data guarantees a wrong median): 13, 13, 13, 15, 19, 22, 23, 23, 24, 26, 26, 30, 31, 34, 38, 49, 50, 50, 51, 57. With n = 20, the median averages positions 10 and 11 = 26. \[ Q_1=\frac{19+22}{2}=20.5,\qquad Q_3=\frac{38+49}{2}=43.5,\qquad \mathrm{IQR}=43.5-20.5=23 \]
- 形状:单峰,右侧尾巴明显更长(从 34 一路拖到 57,左边只到 13),所以是右偏。写的时候把“尾巴”指出来,而不是只写一个“右偏”标签。 Shape: unimodal and clearly right-skewed — the tail drags from 34 out to 57, while the left side stops at 13. Point at the tail instead of just dropping the label "right-skewed".
- 异常值:用 1.5×IQR 规则检查。上界 = 43.5 + 34.5 = 78,下界 = 20.5 − 34.5 < 0。最大值 57 < 78,所以没有异常值——这是本题最容易错的一步:57 看起来很大,但分布本身就很散。 Outliers: use the 1.5×IQR rule. Upper fence = 43.5 + 34.5 = 78; lower fence < 0. The maximum, 57, is below 78, so there are no outliers. This is the step students most often miss: 57 looks huge, but the distribution is genuinely spread out. \[ Q_3+1.5\,\mathrm{IQR}=43.5+34.5=78,\qquad 57<78\Rightarrow\text{not an outlier} \]
- 中心:中位数 26 双(要说“双”,也要说“女学生”)。离散:全距 57 − 13 = 44 双,IQR = 23 双。两句都必须带单位。 Centre: median 26 pairs (say "pairs", say "for female students"). Spread: range 57 − 13 = 44 pairs; IQR = 23 pairs. Both sentences need units.
- 最后把四句连成一段,而不是四个孤立短句——AP 的 4 分题就按“四要素各一句”给分。 Finally, join the four sentences into one paragraph rather than four isolated fragments; a 4-point AP item awards one point per element.
例 2 比较两个分布:每一句都要提到两边Example 2 Compare two distributions: every sentence names both groups
- 形状:先各说一句,再合一句。两组都右偏,但男生的偏斜更极端(20 个数里有 17 个 ≤ 14,然后突然跳到 22、35、38);女生虽然也右偏,但主体更宽。 Shape: one clause each, then one joined clause. Both are right-skewed, but the males far more extremely — 17 of 20 values are ≤ 14 before jumping to 22, 35, 38 — whereas the females' bulk is wider.
- 异常值:分开说。男生有三个点(22、35、38)与主体脱离;女生没有。注意:如果两组各有各的异常值,必须分别说明。 Outliers: keep them separate. The males have three detached points (22, 35, 38); the females none. When each group has its own outliers, report them separately.
- 中心:给两个数并比大小。男生中位数 = (8+10)/2 = 9 双,女生中位数 = 26 双,女生明显更大。 Centre: two numbers and a comparison. Male median = (8+10)/2 = 9 pairs; female median = 26 pairs — clearly larger. \[ \text{male: } \frac{8+10}{2}=9,\qquad \text{female: } \frac{26+26}{2}=26 \]
- 离散:别只看全距。男生全距 38 − 4 = 34,女生 57 − 13 = 44,女生更散;但男生的中间一半(4–14)其实比女生(20.5–43.5)更集中——这正是“看全距会被异常值带偏”的例子。 Spread: do not stop at the range. Male range 34, female range 44, so females are more spread; yet the males' middle half (4–14) is tighter than the females' (20.5–43.5) — the standard case of a range being hijacked by extremes.
- 组装成一段,四要素齐全,每句都点名两组: Assemble one paragraph, four elements, both groups in every sentence: “两组都右偏,但男生偏得更极端;男生有三个异常值(22、35、38),女生没有。女生鞋更多(中位数 26 对 9 双),也更分散(全距 44 对 34 双),不过男生中间 50% 的区间反而更窄(4–14 对 20.5–43.5 双)。” "Both distributions are right-skewed, the males far more so; the males show three outliers (22, 35, 38) while the females show none. Females own more shoes (median 26 vs 9 pairs) and are more spread out (range 44 vs 34 pairs), although the males' middle 50% is actually narrower (4–14 vs 20.5–43.5 pairs)."
随堂练习Check Your Understanding
四道题分别考:图型辨别、形状命名、组距的后果、以及比较题的完整性。 Four questions: telling displays apart, naming shape, the consequence of bin width, and the completeness of a comparison.
某同学为一组“每周运动时间(小时)”画了图:横轴分成 0–2、2–4、4–6… 若干段,每段上方画一根柱,柱与柱之间留了明显的空隙。关于这张图,下列哪一句正确?
A student graphs weekly exercise time (hours) with bars over the intervals 0–2, 2–4, 4–6, … and leaves visible gaps between adjacent bars. Which statement is correct?
- a正确,柱间留缝更清楚,便于区分各段。Correct — gaps make the intervals easier to tell apart.
- b不正确:这是直方图,相邻区间的柱应当紧挨着,因为区间在数轴上是连续的。Incorrect — this is a histogram, and adjacent bins should touch, because the intervals are contiguous on the number line.
- c不正确:应该改用饼图,因为时间可以分成若干段。Incorrect — a pie chart should be used since time splits into segments.
- d无所谓,有没有缝不影响读者理解。It does not matter; gaps do not affect interpretation.
- 先看变量类型Classify the variable “每周运动时间”是定量变量,可以取 2.5、2.51… 任意值,所以横轴是一条数轴。"Weekly exercise time" is quantitative — 2.5, 2.51, any value — so the horizontal axis is a number line. 定量 + 分组 = 直方图,不是条形图。Quantitative + binned = histogram, not a bar graph.
- 再问“缝”在传达什么Then ask what the gap communicates 缝表示“两个类别之间没有中间地带”。可是 2–4 与 4–6 之间只隔着 4 这一点,几乎没人恰好运动 4.000 小时,两段实际上连在一起。A gap says "nothing lies between these categories". But 2–4 and 4–6 are separated only by the single point 4; virtually nobody exercises exactly 4.000 hours, so the bins touch in practice. 留缝会把连续的量错误地表现成“分开的组”,故选 b。Gaps misrepresent a continuum as separate groups — so b.
- 顺手排除 cRule out c 饼图要求“各部分加起来是一个整体”,而“每周运动时间”的各个区间虽有占比,但用饼图既难读也无法看形状、多峰等特征。A pie requires parts of one whole; exercise-time bins do have percentages, but a pie hides shape, peaks and skew. 描述定量分布的默认图形是直方图(小样本用点图或茎叶图)。The default for a quantitative distribution is a histogram (dot plot or stemplot when n is small).
| 选项Option | 判断与理由Verdict & reason |
|---|---|
| a | 错。留缝是条形图的语法,用在直方图上会造成“类别”的误读。Wrong: gaps are bar-graph syntax and imply categories. |
| b | 对。直方图的柱必须相邻,因为组是数轴上的连续区间。Correct: histogram bars must touch because the bins are contiguous intervals. |
| c | 错。饼图不显示形状,也不适合定量数据的分组。Wrong: a pie hides shape and does not suit binned quantitative data. |
| d | 错。空隙会改变读者对数据本质(分类 vs 连续)的判断。Wrong: the gap changes how the reader construes the data (categorical vs continuous). |
某班“每周运动时间”的分布:绝大多数学生在 5–8 小时,少数几人只有 1–2 小时,几乎没有超过 9 小时的。这个分布的形状是
In a class's weekly exercise hours, most students report 5–8 hours, a few report only 1–2 hours, and almost nobody exceeds 9 hours. The shape is
- a约对称roughly symmetric
- b右偏(尾巴拖向大数值)skewed right (tail toward large values)
- c左偏(尾巴拖向小数值)skewed left (tail toward small values)
- d双峰bimodal
- 画一条心算的数轴Sketch the number line mentally 1–2 小时有零星几个人(稀),5–8 小时人最多(密),9 以上几乎空。稀疏的一端在左边,密集的一端在右边。A few people at 1–2 hours (sparse), the crowd at 5–8 (dense), nothing above 9. The sparse end is on the left, the dense end on the right. 尾巴拖向小数值一侧 → 左偏。The tail drags toward small values → skewed left.
- 用“对称”做试金石Test with symmetry 把图形沿中间对折:左半边薄而长、右半边厚而短,两边不重合,所以不是对称。Fold the picture down the middle: the left half is thin and long, the right half thick and short — they do not match, so it is not symmetric. 不是 a;也不是双峰(只有一个主峰),排除 d。Not a, and not bimodal (one main peak), so not d.
- 记一个反直觉的结论Remember the counter-intuitive part “左偏”的数据里,大多数人在大数值一侧(5–8 小时)。学生常把“多数在大的一边”误判成右偏,这是本考点最主要的失分原因。In a left-skewed distribution most values sit on the large side (5–8 hours). Students routinely call that "right-skewed", which is the main source of lost points here. 记忆钩子:偏斜看尾巴,不看人多的地方。Memory hook: skew follows the tail, not the crowd.
| 选项Option | 判断与理由Verdict & reason |
|---|---|
| a | 错。左右两半不镜像:左边稀疏拖长,右边密集截断。Wrong: not mirror images — sparse and long left, dense and cut off right. |
| b | 错。右偏要求长尾在大数值一侧,这里 9 以上几乎为空。Wrong: right skew needs a long tail at large values; nothing sits above 9 here. |
| c | 对。少数极小值形成向左的长尾。Correct: a handful of tiny values forms the long left tail. |
| d | 错。只有一个主峰(5–8 小时),没有第二个峰。Wrong: one main peak at 5–8 hours, no second peak. |
把一张直方图的组距从 5 改成 20(数据不变),最可能发生的是
A histogram's bin width is changed from 5 to 20 with the same data. What is most likely to happen?
- a形状更清楚,因为柱变少了更整齐。The shape becomes clearer, since fewer bars look tidier.
- b细节被抹平:分开的峰可能被合并,右偏也可能看起来像对称。Detail is erased: separate peaks may merge and right skew may look symmetric.
- c中位数会变大。The median increases.
- d图形从直方图变成了条形图。The display becomes a bar graph.
- 回想上图的三个变体Recall the three variants above 组距 5 时 40–45 是空档、50 附近还有一个小峰;组距 20 时只剩 3 根柱,这两个特征全部消失。At width 5 the empty 40–45 gap and the bump near 50 are visible; at width 20 only 3 bars remain and both features vanish. 粗组距会“制造”出并不存在的平滑单峰。A coarse width manufactures a smooth unimodal shape that is not really there.
- 为什么 c、d 一定错Why c and d cannot be right 中位数只取决于数值排序,与怎么分组无关;分组方式也不会把定量变量变成分类变量。The median depends only on the ordering of values, not on binning; and binning never turns a quantitative variable categorical. 组距是“镜头”,不是“数据”。Bin width is the lens, not the data.
| 选项Option | 判断与理由Verdict & reason |
|---|---|
| a | 错。“整齐”不是目标,保留真实结构才是。Wrong: tidiness is not the goal; preserving real structure is. |
| b | 对。宽组距把多个区间合并,峰与空档都可能被抹掉。Correct: wide bins merge intervals, erasing peaks and gaps. |
| c | 错。中位数是数据的性质,与分组方式无关。Wrong: the median is a property of the data, independent of binning. |
| d | 错。变量仍是定量的,只是分组变粗。Wrong: the variable stays quantitative; only the grouping coarsens. |
一位学生写道:“女生的鞋数中位数是 26 双,男生是 9 双,所以女生拥有的鞋更多。” 作为对两个分布的比较,这段话缺少哪两个要素?
A student writes: "Females have a median of 26 pairs, males 9, so females own more shoes." As a comparison of two distributions, which two elements are missing?
- a形状(shape)与离散程度(spread)shape and spread
- b中心(center)与上下文(context)center and context
- c只有异常值缺失only outliers
- d什么都不缺,已经比较完整nothing is missing; the comparison is complete
- 给这段话打勾Tick what is present 两个中位数 26 与 9,并说了“女生更多”——中心有、比较方向有、上下文(“双”)也有。Two medians, 26 and 9, with a stated direction and the unit "pairs" — centre and context are both there. b 说缺 center 与 context,与事实相反。b claims centre and context are missing, which is the opposite of the truth.
- 找出没写的格子Name the empty slots 形状完全没提(两组都右偏、男生更极端);离散程度完全没提(44 vs 34 双);异常值也没提。三格空着。Shape is untouched (both right-skewed, males more so); spread is untouched (44 vs 34 pairs); outliers are untouched. Three slots are empty. a 抓住了其中最主要的两个缺口,是最佳选项。a names the two largest gaps and is therefore the best option.
- 补成满分版本Upgrade to full credit 加上一句形状、一句离散即可:“两组都右偏、男生更极端;女生更分散(全距 44 vs 34 双),但男生的中间一半更窄。”Add one shape clause and one spread clause: "both right-skewed with males more extreme; females are more spread (range 44 vs 34 pairs), though the males' middle half is narrower." 这就是例 2 的写法——四要素、每句点到两组。That is exactly the Example 2 paragraph: four elements, both groups in every sentence.
| 选项Option | 判断与理由Verdict & reason |
|---|---|
| a | 对。形状与离散程度都没有出现,是最大的两处缺口。Correct: neither shape nor spread appears — the two biggest gaps. |
| b | 错。中心已经给了(26 vs 9),单位也写了。Wrong: centre is given (26 vs 9) with units. |
| c | 错。异常值确实缺,但形状与离散同样缺,不是“只有”。Wrong: outliers are missing, but so are shape and spread — not "only". |
| d | 错。只写了四要素中的一项,不能算完整比较。Wrong: one of four elements is not a complete comparison. |
本讲小结Summary
- 点图适合小样本、一个点一个观测值、不丢信息;茎叶图同时显示形状与原始数值,但必须写 key,叶要排序。
- 数据挤在一行时用分裂茎(每根茎劈成同样多行,0–4 / 5–9);茎叶图还能做成背靠背来比较两组。
- 直方图的柱必须相邻;组距是你选的——太粗会合并峰、抹平偏斜,太细会被噪声主导。
- 形状三问:对称吗、尾巴朝哪边、几个峰。偏斜看尾巴的方向,不看人多的地方。
- SOCS:shape、outliers、center、spread,四格都要填,每个数字都要带单位与上下文。
- 比较两个分布时每一句都要提到两组;样本量不同时改用相对频率,否则“更密”可能只是“样本更大”。
- Dot plots suit small sets and lose nothing; stemplots show shape and keep every value — but they require a key and ordered leaves.
- When values bunch up, split the stems (every stem split the same way, 0–4 / 5–9); a stemplot can also be made back-to-back to compare two groups.
- Histogram bars touch; the bin width is your choice — too coarse merges peaks and hides skew, too fine amplifies noise.
- Shape: symmetric? which way the tail? how many peaks? Skew follows the tail, never the crowd.
- SOCS: shape, outliers, center, spread — all four slots, every number with units and context.
- In a comparison every sentence names both groups; with unequal n, use relative frequencies, or "denser" may just mean "bigger sample".
用数字描述定量数据Describing Quantitative Data with Numbers
上一讲用图形看出了形状,这一讲把它压缩成几个数字:中心(平均数、中位数)与离散程度(全距、IQR、标准差)。难点不在算,而在选——为什么右偏的数据该报中位数、为什么标准差要除以 \(n-1\)、以及那条 1.5×IQR 的线怎么把“看起来很大”正式判成异常值。
The last lecture read shape off a graph; this one compresses it into a few numbers — centre (mean, median) and spread (range, IQR, standard deviation). The difficulty is not computing but choosing: why skewed data call for a median, why the standard deviation divides by \(n-1\), and how the 1.5×IQR fence turns "looks big" into a formal outlier verdict.
本讲学习目标Learning Objectives
- CALCULATE 平均数与中位数,并说明平均数为什么不抗(not resistant)、中位数为什么抗(resistant)。
- 知道在右偏分布中平均数被拉向右边(尾巴一侧),左偏时被拉向左边;对称时两者相等。
- CALCULATE 全距与 四分位距 IQRIQR = Q3 − Q1,即中间 50% 数据的宽度。它忽略了两端各 25% 的数据,所以不受异常值影响。IQR = Q3 − Q1, the width of the middle 50%. It ignores the outer quarters, so outliers cannot move it.,并会用1.5×IQR 规则IDENTIFY 异常值。
- CONSTRUCT 五数概括与(修正)箱线图,并说明箱线图不能显示什么(双峰、样本量)。
- CALCULATE 标准差与方差,说明为什么除以 \(n-1\),并解释方差的单位为什么是“平方单位”。
- 根据分布的形状与是否存在异常值,DECIDE 该报 mean + SD 还是 median + IQR。
- CALCULATE the mean and median, and EXPLAIN why the mean is not resistant while the median is.
- STATE that in a right-skewed distribution the mean is pulled toward the tail, and that the two coincide only when the distribution is symmetric.
- CALCULATE the range and the interquartile rangeIQR = Q3 − Q1, the width of the middle 50%; it ignores the outer quarters, so outliers cannot move it.IQR = Q3 − Q1,中间 50% 的宽度;忽略两端各 25%,因此不受异常值影响。, and IDENTIFY outliers with the 1.5×IQR rule.
- CONSTRUCT a five-number summary and a (modified) boxplot, and STATE what a boxplot cannot show (bimodality, sample size).
- CALCULATE the standard deviation and variance, EXPLAIN why the divisor is \(n-1\), and why variance carries squared units.
- DECIDE whether to report mean + SD or median + IQR, given shape and outliers.
核心概念Core Concepts
4.1 平均数:把总量摊平,但它不抗打4.1 The Mean: Total Spread Evenly, and Fatally Fragile
平均数 \( \bar x \) 是“把总量平均分给每个人”,所以它用到了每一个数据;正因为用到了每一个,一个极端值就能把它拖走。这叫不抗(not resistant)。
The mean \( \bar x \) is "share the total equally among all individuals", so it uses every value — and precisely because it uses every value, one extreme observation can drag it away. That is what "not resistant" means.
看一个具体的例子。10 名学生的通勤时间(分钟):2, 3, 4, 5, 5, 6, 6, 7, 8, 9。总和 55,平均数 5.5,中位数也是 5.5(第 5、6 个的平均)。现在把其中一个 9 换成 100——比如某人那天遇上了事故。
A concrete case. Ten students' commute times (minutes): 2, 3, 4, 5, 5, 6, 6, 7, 8, 9. The total is 55, so the mean is 5.5 and the median is also 5.5. Now replace the 9 with 100 — someone hit a traffic accident that day.
| 这一组数据The data | 平均数Mean | 中位数Median | 发生了什么What happened |
|---|---|---|---|
| 2, 3, 4, 5, 5, 6, 6, 7, 8, 9 | 55 / 10 = 5.5 | 5.5 | 两者相等(分布大致对称)They agree (roughly symmetric) |
| 2, 3, 4, 5, 5, 6, 6, 7, 8, 100 | 146 / 11 = 13.3 | 6 | 平均数涨了 7.8 分钟,中位数只动了 0.5 分钟The mean jumps 7.8 min; the median moves 0.5 |
一个统计量是抗的(resistant),意思是:把数据里的少数几个值改成极端值(或直接删掉),它几乎不变。中位数只由位置决定,把 9 改成 100 后,第 6 个位置上的数还是 6,所以它不动;平均数由总和决定,100 直接进了分子,所以它必然被拖走。
A statistic is resistant if changing a few values to extremes (or deleting them) barely moves it. The median depends only on position: after 9 becomes 100, the 6th ordered value is still 6, so it does not budge. The mean depends on the total: 100 lands in the numerator, so it must move.
4.2 中位数与形状:平均数总被拉到尾巴那一侧4.2 Median and Shape: the Mean Is Drawn to the Tail
对称时 mean = median;右偏时 mean > median(平均数被长尾巴拉向右边);左偏时 mean < median。所以只要知道形状,就能判断这两个数谁大——AP 选择题几乎每年都考这一句。
When symmetric, mean = median. Skewed right: mean > median (the long right tail pulls the mean up). Skewed left: mean < median. So shape alone tells you which is larger — AP tests this sentence almost every year.
4.3 离散程度:全距、四分位数与 1.5×IQR 规则4.3 Spread: Range, Quartiles and the 1.5×IQR Rule
全距 = 最大值 − 最小值,只要一个异常值就会被毁掉;IQR = Q3 − Q1 只看中间 50%,两端各 25% 的数据完全不管,所以它抗。判异常值的标准线就用 IQR 画出来:低于 Q1 − 1.5 IQR 或高于 Q3 + 1.5 IQR。
Range = max − min, ruined by a single outlier. IQR = Q3 − Q1 looks only at the middle 50% and ignores the outer quarters, so it is resistant. The outlier fences are built from it: below Q1 − 1.5 IQR or above Q3 + 1.5 IQR.
四分位数怎么找(关键细节)Finding the quartiles (the detail that costs points)
第 1 步 排序。第 2 步 找中位数,把数据分成下半与上半。第 3 步 Q1 = 下半的中位数,Q3 = 上半的中位数。
Step 1 sort. Step 2 find the median, splitting the data into a lower and an upper half. Step 3 Q1 = median of the lower half, Q3 = median of the upper half.
最常错的一点:n 是奇数时,整体中位数本身不参与两半的计算——它被“拿出去”了。
The classic slip: when n is odd, the overall median is excluded from both halves — it is taken out.
n = 15下半 = 前 7 个,上半 = 后 7 个,中间那个不用。
n = 15Lower half = first 7, upper half = last 7; the middle value is discarded.
1.5×IQR 规则(只判“是否可疑”)The 1.5×IQR rule (a flag, not a proof)
算两个“栅栏”:\( Q_1-1.5\,\mathrm{IQR} \) 与 \( Q_3+1.5\,\mathrm{IQR} \)。落在外面的点标为异常值。
Compute two fences, \( Q_1-1.5\,\mathrm{IQR} \) and \( Q_3+1.5\,\mathrm{IQR} \); points beyond either fence are flagged as outliers.
注意:这是一个约定,不是定理。被标出来的点可能完全真实(只是少见),没被标出来的点也可能是录入错误。AP 要的是你会用这条规则,不是要你相信它是真理。
Note: this is a convention, not a theorem. A flagged point may be perfectly real (just rare), and an unflagged one may still be a typo. AP wants you to apply the rule, not to believe it.
4.4 五数概括与箱线图(含修正箱线图)4.4 The Five-Number Summary and Boxplots (Including Modified)
五数概括 = min, Q1, median, Q3, max,五个数字说清位置与离散。箱线图就是它的图形:箱体从 Q1 到 Q3(长度 = IQR),箱内一条线是中位数,两条须延伸到非异常值的最远点——把异常值单独画成点,就叫修正箱线图。
The five-number summary is min, Q1, median, Q3, max — position and spread in five numbers. A boxplot draws it: the box runs Q1 to Q3 (length = IQR), a line inside marks the median, whiskers reach the most extreme values that are not outliers — and drawing the outliers as separate dots gives the modified boxplot.
① 看不出双峰:两组数据可能一个双峰、一个单峰,箱线图完全一样——判断形状必须回到直方图/点图。② 看不出样本量:n = 10 和 n = 1000 的箱线图长得一样。③ 须的端点不是 max:有异常值时,须只到最大的非异常值。④ 中位数线不一定在箱体中间,它的位置正是偏斜的信号。
① Bimodality is invisible: a bimodal and a unimodal set can share one boxplot — always go back to a histogram or dot plot for shape. ② n is invisible: n = 10 and n = 1000 look identical. ③ The whisker end is not max: with outliers present, it stops at the largest non-outlier. ④ The median line need not sit in the middle of the box — its offset is the skew signal.
4.5 标准差与方差:距离平方的平均(除以 n−1)4.5 Standard Deviation and Variance: Average Squared Distance, Divided by n−1
标准差是“每个点到平均数的距离”的综合度量。因为正负偏差会互相抵消(加起来恒为 0),所以先把偏差平方再平均,最后开根号回到原单位。方差是它的平方,单位也变成了平方。
The standard deviation summarises how far each point sits from the mean. Because signed deviations cancel (they always total 0), we square them, average, then take a square root to return to the original units. The variance is that average before the root — and it carries squared units.
因为我们用的是样本自己的平均数 \( \bar x \),而不是未知的总体平均数 \( \mu \)。\( \bar x \) 恰好是“让偏差平方和最小”的那个点,所以用它来量偏差,会系统性地偏小。除以 \(n-1\) 正好把这个偏小补回来。另一个直观说法:偏差加起来恒为 0,只要知道其中 \(n-1\) 个,最后一个就被确定了——真正“自由”的信息只有 \(n-1\) 份(自由度)。
Because we measure deviations from the sample's own mean \( \bar x \), not from the unknown \( \mu \). Since \( \bar x \) is exactly the point that minimises the sum of squared deviations, measuring from it makes the result systematically too small; dividing by \( n-1 \) corrects that. Equivalently: the deviations always total 0, so once \( n-1 \) of them are known the last is forced — only \( n-1 \) pieces of information are free (degrees of freedom).
| 情境Situation | 除以Divide by | 符号与计算器Symbol and calculator | 什么时候出现When it appears |
|---|---|---|---|
| 这组数据就是总体The data are the population | \(N\) | \( \sigma \),计算器里的, labelled σx | 很少见(AP 里只有题目明说“这是全部”时)Rare — only when the problem says these are all the individuals |
| 这是从总体抽出的样本The data are a sample | \(n-1\) | \( s \),计算器里的, labelled Sx | 绝大多数情况;AP 默认用 SxAlmost always; AP expects Sx |
形状对称、没有异常值 → 报 mean + SD;偏斜或有异常值 → 报 median + IQR。因为前者不抗,后者抗。
Symmetric with no outliers → report mean + SD; skewed or with outliers → report median + IQR. The first pair is not resistant; the second is.
x̄ = 5.5 Σx = 55 Σx² = 345 Sx ≈ 2.17 σx ≈ 2.06 n = 10 minX = 2 Q1 = 4 Med = 5.5 Q3 = 7 maxX = 9
例题精讲Worked Examples
例 1 五数概括 + IQR 判异常值 + 修正箱线图Example 1 Five-number summary, outlier test, modified boxplot
- 先数清 n 与位置。n = 12 是偶数,中位数取第 6、7 个的平均:(13 + 15)/2 = 14。这一步先把中位数钉死,后面找 Q1、Q3 才不会乱。 Count first. n = 12 is even, so the median averages positions 6 and 7: (13 + 15)/2 = 14. Nail the median down before hunting for Q1 and Q3. \[ \text{median}=\frac{13+15}{2}=14 \]
- 切成两半(偶数时正好各 6 个)。下半 5, 7, 8, 10, 12, 13 → Q1 = (8+10)/2 = 9;上半 15, 18, 20, 22, 25, 40 → Q3 = (20+22)/2 = 21。 Split into halves (six each). Lower: 5, 7, 8, 10, 12, 13 → Q1 = 9. Upper: 15, 18, 20, 22, 25, 40 → Q3 = 21. \[ Q_1=\frac{8+10}{2}=9,\qquad Q_3=\frac{20+22}{2}=21,\qquad \mathrm{IQR}=21-9=12 \]
- 五数概括写成一行(带单位):min 5, Q1 9, median 14, Q3 21, max 40(分钟)。 Write the five-number summary in one line with units: min 5, Q1 9, median 14, Q3 21, max 40 minutes.
- 算栅栏再判。上栅栏 = 21 + 1.5×12 = 39;下栅栏 = 9 − 18 = −9。最大值 40 大于 39,所以 40 是异常值(虽然只刚过线 1 个单位)。 Compute fences, then judge. Upper fence = 21 + 18 = 39; lower = 9 − 18 = −9. The maximum, 40, exceeds 39, so 40 is an outlier — by just one minute. \[ Q_3+1.5\,\mathrm{IQR}=21+18=39,\qquad 40>39\Rightarrow\text{outlier} \]
- 修正箱线图的画法:箱体 9–21,中位线 14;右须画到最大的非异常值 25,然后在 40 处单独画一个点;左须画到 5。 Draw the modified boxplot: box 9–21 with the median line at 14; the right whisker stops at the largest non-outlier, 25, with a single dot at 40; the left whisker reaches 5.
- 顺带对比 mean 与 median:总和 195,mean = 16.25 > median 14——正是右偏(被 40 拖高)的典型信号。 Compare mean and median: the total is 195, so mean = 16.25 > median 14 — the classic signature of right skew driven by the 40. \[ \bar x=\frac{195}{12}=16.25>14 \]
例 2 手算标准差:一张表走完Example 2 Standard deviation by hand: one table, all the way
- 第一步永远是先算平均数,因为没有 \( \bar x \) 就谈不上偏差。总和 30,n = 5,mean = 6。 Always the mean first — no \( \bar x \), no deviations. The total is 30 with n = 5, so the mean is 6.
- 列一张三列表:数值、偏差、偏差平方。把表画出来,比在脑子里算靠谱得多,也方便检查。 Build a three-column table: value, deviation, squared deviation. Writing it out beats mental arithmetic and makes checking easy.
| \(x_i\) | \(x_i-\bar x\) | \((x_i-\bar x)^2\) |
|---|---|---|
| 2 | −4 | 16 |
| 4 | −2 | 4 |
| 6 | 0 | 0 |
| 8 | +2 | 4 |
| 10 | +4 | 16 |
| 合计Total | 0(永远为 0) (always 0) | 40 |
- 检验“偏差和为 0”:−4 − 2 + 0 + 2 + 4 = 0。如果不为 0,说明平均数算错了——这是一个免费的自检。 Check that deviations sum to 0: −4 − 2 + 0 + 2 + 4 = 0. If not, your mean is wrong — a free self-check.
- 除以 n − 1 得方差,再开根号得标准差。注意顺序:先除以 4 再开根,不是先开根再除。 Divide by n − 1 for the variance, then take the root. Order matters: divide by 4 first, then root — not the other way round. \[ s^2=\frac{40}{5-1}=10,\qquad s=\sqrt{10}\approx 3.16 \]
- 说清单位:等待时间以分钟计,所以 \( s\approx 3.16 \) 分钟,而 \( s^2 = 10 \) 分钟²——平方单位没有直观含义,这就是我们报 \(s\) 而不报 \(s^2\) 的原因。若误除以 n,会得到 \( \sqrt{8}\approx 2.83 \),偏小。 State the units: with minutes, \( s\approx 3.16 \) minutes while \( s^2 = 10 \) minutes² — squared units mean nothing physically, which is why we report \(s\). Dividing by n instead would give \( \sqrt{8}\approx 2.83 \), too small.
随堂练习Check Your Understanding
四道题分别考:抗性、异常值栅栏、四分位数的数位、以及 \(n-1\) 的理由。 Four questions: resistance, the outlier fences, counting positions for quartiles, and the reason for \(n-1\).
某组数据的平均数为 50、中位数为 50、标准差为 10。现在往这组数据里加入一个值 200。下列哪个统计量最可能几乎不变?
A data set has mean 50, median 50 and standard deviation 10. One additional value, 200, is included. Which statistic is most likely to stay almost unchanged?
- a平均数the mean
- b中位数the median
- c全距the range
- d标准差the standard deviation
- 看谁把 200 放进了算式Who puts 200 into the arithmetic 平均数要把所有数加起来,200 直接进分子;标准差用的是各点到平均数的距离,200 让平均数和偏差同时变化;全距 = max − min,200 立刻成为新的 max。The mean adds everything and 200 lands in the numerator; the SD uses distances to the mean, so 200 shifts both the mean and the deviations; the range is max − min, and 200 is the new max. a、c、d 都被拉走,而且往同一方向(变大)。a, c, d are all dragged — and all upward.
- 中位数只需挪一位The median shifts at most one position 原来中位数在正中间;加入一个很大的值后,排序位置整体后移,中位数最多移到相邻的那个数附近。若原来 n 很大,移动量微乎其微。The median sat in the middle; adding one large value pushes it at most to a neighbouring position. With a large n the move is negligible. 中位数抗 → 选 b。The median resists → b.
- 顺带记住配对关系Remember the pairing “mean + SD”这一对都不抗,“median + IQR”这一对都抗。所以选统计量时它们是成对出现的,不能 mean 配 IQR。"mean + SD" are both non-resistant; "median + IQR" are both resistant. So they come in pairs — never mean with IQR. 报数字时成对报,是 AP 的隐含要求。Report them in pairs; AP expects that.
| 选项Option | 判断与理由Verdict & reason |
|---|---|
| a | 错。平均数被 200 直接拉高,不抗。Wrong: the mean is pulled up directly by 200. |
| b | 对。中位数只看位置,200 只挪动一位。Correct: the median depends on rank, so 200 moves it one slot. |
| c | 错。全距立刻变成 200 − min,变化最大。Wrong: the range becomes 200 − min, the biggest change of all. |
| d | 错。标准差被一个极端值大幅放大。Wrong: one extreme value inflates the SD substantially. |
某组数据 \(Q_1=20\),\(Q_3=40\)。用 1.5×IQR 规则判断,下列哪个值会被标为异常值?
A data set has \(Q_1=20\) and \(Q_3=40\). Using the 1.5×IQR rule, which value is flagged as an outlier?
- a6565
- b7272
- c88
- d3939
- 把栅栏写出来,再逐个比对Write both fences, then test each value \[ \mathrm{IQR}=40-20=20,\qquad 1.5\times 20=30 \] 上栅栏 70、下栅栏 −10。注意“1.5 倍”乘的是 IQR,不是 Q3,也不是数据个数。Fences at 70 and −10. Note that the 1.5 multiplies the IQR, not Q3 and not n. 65 < 70,8 在 [−10, 70] 内,39 也在内 → 都不是异常值。65 < 70; 8 and 39 both lie inside [−10, 70] → none of them is an outlier.
- 确认唯一超界的那个Confirm the single value beyond a fence 72 > 70,超出上栅栏 2 个单位,因此被标为异常值。它离栅栏很近,但在规则下就是异常值——AP 只认规则,不认“看起来像”。72 > 70, two units past the upper fence, so it is flagged. Being close to the fence is irrelevant: AP applies the rule, not appearances. 只有 72 越界 → b。Only 72 crosses a fence → b.
| 选项Option | 判断与理由Verdict & reason |
|---|---|
| a | 错。65 虽然比 Q3 大,但仍在 70 以内。Wrong: 65 exceeds Q3 but stays under 70. |
| b | 对。72 > 70,超出上栅栏。Correct: 72 > 70, beyond the upper fence. |
| c | 错。8 > −10,没有越下界。Wrong: 8 > −10, so no lower violation. |
| d | 错。39 几乎就在 Q3 上,当然不是异常值。Wrong: 39 sits at Q3 itself. |
15 个已排序的数据:3, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 18, 20。求 \(Q_1\) 与 IQR。
Fifteen sorted values: 3, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 18, 20. Find \(Q_1\) and the IQR.
- a\(Q_1=7,\ \mathrm{IQR}=8\)\(Q_1=7,\ \mathrm{IQR}=8\)
- b\(Q_1=7.5,\ \mathrm{IQR}=7.5\)\(Q_1=7.5,\ \mathrm{IQR}=7.5\)
- c\(Q_1=6,\ \mathrm{IQR}=9\)\(Q_1=6,\ \mathrm{IQR}=9\)
- d\(Q_1=8,\ \mathrm{IQR}=7\)\(Q_1=8,\ \mathrm{IQR}=7\)
- 先把中位数圈出来并“拿走”Circle the median, then remove it (15+1)/2 = 8,第 8 个是 11。把它单独放着,剩下 14 个数正好各 7 个分成两半。(15+1)/2 = 8, so the 8th value, 11, is the median. Set it aside; the remaining 14 values split into two halves of 7. 如果误把 11 放进下半,下半就变成 8 个,Q1 会算成 (7+8)/2 = 7.5 —— 这正是干扰项 b。Putting 11 into the lower half would make it 8 values and give Q1 = (7+8)/2 = 7.5 — exactly distractor b.
- 各取两半的中位数Take the median of each half 下半 3, 5, 6, 7, 8, 9, 10 的中位数是第 4 个 = 7;上半 12, 13, 14, 15, 16, 18, 20 的中位数是第 4 个 = 15。The lower half 3, 5, 6, 7, 8, 9, 10 has median 7 (4th); the upper half 12, 13, 14, 15, 16, 18, 20 has median 15 (4th). \[ Q_1=7,\quad Q_3=15,\quad \mathrm{IQR}=15-7=8 \] Q1 = 7、IQR = 8 → a。Q1 = 7 and IQR = 8 → a.
- 顺手算一句上下文Add a context sentence “中间 50% 的数据跨度是 8 个单位。”报 IQR 时不写单位等于没说完。"The middle 50% of the values span 8 units." An IQR without units is incomplete. 五数概括:3, 7, 11, 15, 20。Five-number summary: 3, 7, 11, 15, 20.
| 选项Option | 判断与理由Verdict & reason |
|---|---|
| a | 对。中位数排除后,下半 7 个的中位数是 7,Q3 = 15。Correct: with the median excluded, the 7-value lower half has median 7 and Q3 = 15. |
| b | 错。这是把整体中位数 11 也算进下半的典型错解。Wrong: the classic error of counting 11 in the lower half. |
| c | 错。下半只有 7 个数,中位数必在其中,不会是 6。Wrong: the 7-value half has its median among the data; 6 is not it. |
| d | 错。8 是下半的一半位置,不是 Q1。Wrong: 8 is not the median of the lower half. |
计算样本标准差时,偏差平方和要除以 \(n-1\) 而不是 \(n\)。最准确的解释是
The sample standard deviation divides the sum of squared deviations by \(n-1\) rather than \(n\). The best explanation is
- a因为样本比总体少了一个人,所以要减 1。The sample has one fewer person than the population, so subtract one.
- b因为偏差是用样本自己的平均数 \( \bar x \) 算的,会系统性偏小;除以 \(n-1\) 正好修正这个低估。Deviations are measured from the sample's own mean \( \bar x \), which makes the result systematically too small; dividing by \(n-1\) corrects that.
- c为了让标准差看起来更大,方便比较。To make the SD look larger and easier to compare.
- d因为这样可以保证标准差一定是整数。Because it guarantees a whole-number SD.
- 用极端例子体会“低估”See the understatement in an extreme case 如果样本只有 2 个数,偏差为 +d 与 −d,用样本平均数算的平方和是 2d²;换成真实总体平均数,平方和几乎总是更大。除以 \(n-1=1\) 而不是 2,正是把这个差距补上。With only 2 values the deviations are +d and −d, so the squared sum from the sample mean is 2d²; measured from the true mean it would almost always be larger. Dividing by \(n-1=1\) rather than 2 makes up that gap. \(n-1\) 是“自由度”:偏差和为 0,知道 \(n-1\) 个就确定了最后一个。\(n-1\) is the degrees of freedom: the deviations total 0, so knowing \(n-1\) of them fixes the last one.
- 为什么 a 不算解释Why a is not an explanation “少了一个人”只是把 \(n-1\) 念了一遍,没有说明为什么要少。AP 的概念题要的是机制,不是复述公式。"One fewer person" merely restates \(n-1\) without saying why. AP conceptual items want the mechanism, not the formula read aloud. c、d 更是无稽:标准差可以是小数,除以 \(n-1\) 没有任何“取整”作用。c and d are simply false: an SD may be a decimal, and \(n-1\) does nothing about integers.
| 选项Option | 判断与理由Verdict & reason |
|---|---|
| a | 错。只是复述,没有解释偏差从哪里来。Wrong: restates the formula without the reason. |
| b | 对。用样本平均数会让平方和偏小,除以 \(n-1\) 修正。Correct: the sample mean understates the sum of squares; \(n-1\) corrects it. |
| c | 错。目的不是“看起来更大”,而是无偏估计。Wrong: the goal is an unbiased estimate, not a bigger-looking number. |
| d | 错。标准差通常是无理数,与整除无关。Wrong: SDs are usually irrational; divisibility is irrelevant. |
本讲小结Summary
- 平均数用到了每一个数值,所以不抗;中位数只看位置,所以抗。
- 对称时 mean = median;右偏 mean > median;左偏 mean < median。平均数总被拉向尾巴一侧。
- 全距最易被异常值毁掉;IQR = Q3 − Q1 只看中间 50%,抗干扰。求 Q1、Q3 时,奇数个数据的整体中位数要拿出去。
- 1.5×IQR 规则:落在 \(Q_1-1.5\,\mathrm{IQR}\) 之下或 \(Q_3+1.5\,\mathrm{IQR}\) 之上的点标为异常值;箱线图的须止于非异常值的最远点。
- 标准差是偏差平方的平均再开根(除以 \(n-1\)),单位与原数据相同;方差是平方单位。用样本平均数会低估,故除以 \(n-1\)。
- 报数字要成对:对称无异常值 → mean + SD;偏斜或有异常值 → median + IQR。箱线图看不出双峰与样本量。
- The mean uses every value and is therefore not resistant; the median uses only rank and is resistant.
- Symmetric: mean = median; right-skewed: mean > median; left-skewed: mean < median. The mean always leans toward the tail.
- The range is destroyed by one outlier; IQR = Q3 − Q1 uses only the middle 50%. With odd n, the overall median is excluded when finding Q1 and Q3.
- 1.5×IQR rule: flag values below \(Q_1-1.5\,\mathrm{IQR}\) or above \(Q_3+1.5\,\mathrm{IQR}\); whiskers stop at the most extreme non-outlier.
- Standard deviation averages squared deviations and roots back to the data's units (dividing by \(n-1\)); variance carries squared units. The sample mean understates spread, hence \(n-1\).
- Report in pairs: symmetric and outlier-free → mean + SD; skewed or with outliers → median + IQR. Boxplots hide bimodality and n.
描述数据在分布中的位置Describing Location in a Distribution
前四讲都在描述整个分布;从这一讲开始,我们只盯住一个个体并问:它在这组数据里算高还是低?百分位回答“它超过了百分之几的人”,z 分数回答“它离平均数几个标准差”。最后我们看一个更强的问题:把整组数据做加减乘除,形状、中心、离散会怎么变——这条规律是后面所有推断(标准化、置信区间、检验统计量)的技术底座。
The first four lectures described a whole distribution; from here we focus on one individual and ask how high it stands. A percentile answers "what percent of the group does it exceed?", a z-score answers "how many standard deviations from the mean is it?". The lecture closes with a stronger question: what happens to shape, centre and spread when every value is shifted or scaled — the technical foundation of all later inference.
本讲学习目标Learning Objectives
- FIND 并 INTERPRET 一个观测值在分布中的百分位第 p 百分位是这样一个值:有 p% 的观测值小于或等于它。注意是“小于或等于”,所以最高分是第 100 百分位。The pth percentile is the value with p% of the observations at or below it. "At or below" matters: the maximum is the 100th percentile.。
- 用累积相对频率图(ogive)ESTIMATE 中位数、四分位数与任意百分位,也能反过来由百分位估计数值。
- CALCULATE 并 INTERPRET z 分数 \( z=\dfrac{x-\mu}{\sigma} \),用它在不同单位、不同分布之间比较位置。
- 说明 z 分数的符号与大小的含义,并解释为什么标准化后均值必为 0、标准差必为 1。
- 区分 Chebyshev 不等式(对任何分布都成立,给的是下界)与正态经验法则(只对近似正态成立,给的是近似值)。
- DESCRIBE 线性变换 \( y=a+bx \) 对形状、中心、离散程度的影响,并用它解释标准化的本质。
- FIND and INTERPRET the percentileThe pth percentile is the value with p% of the observations at or below it. "At or below" matters: the maximum is the 100th percentile.第 p 百分位:有 p% 的观测值小于或等于它;“小于或等于”很关键,最高分就是第 100 百分位。 of an individual within a distribution.
- ESTIMATE the median, quartiles and any percentile from a cumulative relative frequency graph (ogive), and reverse the reading to find a value.
- CALCULATE and INTERPRET a z-score \( z=\dfrac{x-\mu}{\sigma} \), and USE it to compare positions across different units and different distributions.
- EXPLAIN the sign and size of a z-score, and why standardising forces the mean to 0 and the standard deviation to 1.
- DISTINGUISH Chebyshev's inequality (true for every distribution, a lower bound) from the Normal empirical rule (only for approximately Normal data, an approximation).
- DESCRIBE the effect of the linear transformation \( y=a+bx \) on shape, centre and spread, and USE it to explain what standardising really does.
核心概念Core Concepts
5.1 百分位:你超过了百分之几的人5.1 Percentiles: What Fraction Do You Exceed?
第 p 百分位是这样一个值:有 p% 的观测值小于或等于它。所以百分位不是“得分率”,也不是“排名第几”——它是“你踩在百分之几的人头上”。
The pth percentile is the value with p% of the observations at or below it. It is not a percent-correct score and not a rank — it is "the fraction of the group you stand on top of".
25 名学生的统计学测验分数,用茎叶图给出(key: 8|5 表示 85 分):
Twenty-five statistics quiz scores, shown as a stemplot (key: 8|5 means 85):
| 茎Stem | 叶(分数)Leaves (scores) | 该行人数Count | 累计人数(≤ 该行最大值)Cumulative count |
|---|---|---|---|
| 6 | 7 | 1 | ≤ 69:1 |
| 7 | 2 3 3 4 | 4 | ≤ 74:5 |
| 7 | 5 7 7 7 8 9 9 | 7 | ≤ 79:12 |
| 8 | 0 0 1 2 3 3 3 4 | 8 | ≤ 84:20 |
| 8 | 5 6 9 | 3 | ≤ 89:23 |
| 9 | 0 3 | 2 | ≤ 93:25 |
第一步:数“小于或等于这个值”的人有几个(注意是“或等于”,同分的人也要算进去)。第二步:除以总人数 n,换成百分数。Jenny 考了 86 分:≤86 的有 1+4+7+8+2 = 22 人,22/25 = 0.88,所以她在第 88 百分位。
Step one: count how many observations are at or below the value (ties count). Step two: divide by n and convert to a percent. Jenny scored 86: 1+4+7+8+2 = 22 scores are at or below it, and 22/25 = 0.88, so she is at the 88th percentile.
同分会让百分位“跳起来”:两个人都考 80,而 ≤80 的有 14 人,于是这两个人都算第 56 百分位(14/25 = 56%)。百分位不是唯一的——这一点与 z 分数不同。
Ties make percentiles jump: two students scored 80, and 14 scores are at or below 80, so both sit at the 56th percentile (14/25 = 56%). Percentiles are not unique — unlike z-scores.
① “第 88 百分位”不是“答对了 88%”,也和题目难度无关。② 不是“88% 的人比他高”,恰好相反:他的分数高于或等于 88% 的人。③ 不是精确排名:第 88 百分位只说明有 88% 的人在他之下,不说明他是第 4 名(只是 n = 25 时恰好如此)。
① The 88th percentile is not "88% correct" and says nothing about item difficulty. ② It is not "88% scored higher" — the reverse: his score is at or above 88% of the group. ③ It is not an exact rank: 88th percentile fixes the fraction below, not "4th place" (that only happens to hold when n = 25).
5.2 累积相对频率图(ogive):一条曲线读完所有百分位5.2 The Ogive: Every Percentile on One Curve
累积相对频率图把“到这一组为止累计了百分之几”画成一条只会上升的折线:横轴是数值,纵轴是累计百分比。要读第 p 百分位,就从纵轴 p% 出发水平走到曲线上,再垂直落回横轴。
An ogive plots the running total of the percent against the value: the horizontal axis is the variable, the vertical axis is cumulative percent, and the line never falls. To read the pth percentile, start at p% on the vertical axis, move horizontally to the curve, then drop vertically to the axis.
下面是美国前 44 位总统就职时的年龄分布。先把频数表补齐成“累计”的形式——这一步必须手算,不能跳。
Here are the inauguration ages of the first 44 U.S. presidents. First complete the table in cumulative form — do this by hand, do not skip it.
| 年龄组Age class | 频数Frequency | 相对频率Relative freq. | 累计频数Cumulative freq. | 累计相对频率Cumulative rel. freq. |
|---|---|---|---|---|
| 40–44 | 2 | 4.5% | 2 | 4.5% |
| 45–49 | 7 | 15.9% | 9 | 20.5% |
| 50–54 | 13 | 29.5% | 22 | 50.0% |
| 55–59 | 12 | 27.3% | 34 | 77.3% |
| 60–64 | 7 | 15.9% | 41 | 93.2% |
| 65–69 | 3 | 6.8% | 44 | 100% |
5.3 z 分数:把不同的尺子折成同一把5.3 z-Scores: Folding Different Rulers into One
z 分数数的是“离平均数几个标准差”:正号表示在平均数之上,负号表示之下,绝对值越大越不寻常。它把任何分布换算成无单位的标准尺,所以能跨考试、跨单位比较。
A z-score counts how many standard deviations from the mean a value lies: positive means above, negative means below, and the larger the absolute value the more unusual the observation. It converts any distribution onto a unit-free ruler, which is what makes comparisons across tests and units possible.
来看讲座里的经典比较:Jenny 的统计学考了 86(班平均 80,标准差 6.07),化学考了 82(平均 76,标准差 4)。哪一科她相对考得更好?两科分数不能直接比(难度、满分都不同),但 z 分数可以。
The classic comparison: Jenny scored 86 in statistics (class mean 80, SD 6.07) and 82 in chemistry (mean 76, SD 4). On which did she do relatively better? The raw scores are not comparable — the z-scores are.
| 科目Subject | 她的分数 xHer score x | 平均 μMean μ | 标准差 σSD σ | z 分数z-score | 解读Reading |
|---|---|---|---|---|---|
| 统计学Statistics | 86 | 80 | 6.07 | 6 / 6.07 ≈ 0.99 | 比平均高约 1 个标准差about one SD above the mean |
| 化学Chemistry | 82 | 76 | 4 | 6 / 4 = 1.50 | 比平均高 1.5 个标准差one and a half SDs above the mean |
结论:化学的 z 更大(1.50 > 0.99),所以她在化学班上相对位置更高——尽管她的化学原始分(82)比统计(86)低。这就是标准化的全部意义:原始分不可比,位置可比。
Conclusion: the chemistry z-score is larger (1.50 > 0.99), so her relative standing is higher in chemistry even though the raw score (82) is lower. That is the entire point of standardising: raw scores are not comparable; positions are.
① 无单位:分数、米、元换成的 z 都只是“几个标准差”。② 把所有观测值都标准化后,新分布的均值恒为 0、标准差恒为 1——因为你先减去均值(中心归零),再除以标准差(离散归一)。③ z 不说明形状:z = 2 只表示“离均值 2 个标准差”,不表示“在正态曲线的第 97.7 百分位”,除非题目说明该分布近似正态。
① No units: a z-score is "how many SDs", whether the data were points, metres or dollars. ② After standardising every observation, the new distribution has mean exactly 0 and SD exactly 1 — you subtracted the centre and divided out the spread. ③ z says nothing about shape: z = 2 means "two SDs from the mean", not "the 97.7th percentile of a Normal curve", unless Normality is given.
5.4 Chebyshev 不等式与正态经验法则:下界 vs 近似5.4 Chebyshev's Inequality and the Empirical Rule: Bound vs Approximation
Chebyshev 说:任何分布里,落在 \( \mu\pm k\sigma \) 内的比例至少是 \( 1-\dfrac{1}{k^2} \)。它是下界——真实比例只会更大。正态经验法则(68–95–99.7)只在分布近似正态时才能当近似值使用。
Chebyshev says that in any distribution the share within \( \mu\pm k\sigma \) is at least \( 1-\dfrac{1}{k^2} \). It is a lower bound, so the truth is at least that. The Normal empirical rule (68–95–99.7) may be used as an approximation only when the distribution is approximately Normal.
| kk | Chebyshev 保证(≥)Chebyshev (at least) | 正态经验法则(约)Empirical rule (about) | 差别The gap |
|---|---|---|---|
| 1 | \(1-1/1=0\%\)(什么都没保证) (no guarantee) | 68% | k 必须 > 1,否则不等式无信息k must exceed 1 or the bound says nothing |
| 2 | \(1-1/4=75\%\) | 95% | 最常用的一档;AP 问“至少”就用这行The workhorse row; use it when AP says "at least" |
| 3 | \(1-1/9\approx88.9\%\) | 99.7% | 差距更大——说明正态假设有多“贵”A wider gap: this is what the Normality assumption buys you |
| 4 | \(1-1/16=93.75\%\) | ≈99.99% | k 越大,下界越接近 1 但永远不到 1Larger k tightens the bound, never reaching 1 |
看到 “至少”/“不管分布形状”/“任意分布” → Chebyshev。看到 “近似正态”/“约”/给出钟形直方图 → 68–95–99.7 或 normalcdf。最危险的错误是:分布明显偏斜却拿 68–95–99.7 去算,或者题目已说明正态却仍只答“至少 75%”(信息不足,会被判为不完整)。
See "at least" / "regardless of shape" / "any distribution" → Chebyshev. See "approximately Normal" / "about" / a bell-shaped histogram → 68–95–99.7 or normalcdf. The dangerous errors are using 68–95–99.7 on clearly skewed data, or answering only "at least 75%" when Normality was given (insufficient, hence incomplete).
5.5 线性变换 \( y=a+bx \):中心跟着动,离散只受 |b| 影响5.5 Linear Transformation \( y=a+bx \): Centre Shifts, Spread Scales by |b|
给每个数据加上 a:中心全部平移 a,离散程度一点不变,形状不变。给每个数据乘以 b:中心乘 b,离散程度乘 |b|,形状仍不变。两句话合起来:中心与位置参数跟 b 和 a 走,离散程度只跟 |b| 走。
Adding a to every value shifts all measures of centre by a, leaves every measure of spread untouched, and leaves shape unchanged. Multiplying by b scales centre by b and spread by |b|, again with shape unchanged. In one line: centre and position follow b and a; spread follows only |b|.
| 统计量Statistic | 猜测值(米)Guess (m) | 误差 = 猜测 − 13(米)Error = guess − 13 (m) | 误差(英尺)= ×3.28Error (ft) = ×3.28 |
|---|---|---|---|
| n | 44 | 44 | 44 |
| 平均数Mean | 16.02 | 3.02 | 9.91 |
| 标准差SD | 7.14 | 7.14 | 23.43 |
| Min | 8 | −5 | −16.4 |
| Q1 | 11 | −2 | −6.56 |
| 中位数Median | 15 | 2 | 6.56 |
| Q3 | 17 | 4 | 13.12 |
| Max | 40 | 27 | 88.56 |
| IQRIQR | 6 | 6 | 19.68 |
| 全距Range | 32 | 32 | 104.96 |
加减是“挪位置”,乘除是“换刻度”;两者都不改变形状。z 分数就是“先减去均值、再除以标准差”的那一次特殊变换。
Adding slides, multiplying rescales; neither changes shape. Standardising is exactly the special case "subtract the mean, then divide by the SD".
1.057L2 = L1*3.28 → Sx(L2) = 3.28 × Sx(L1)
例题精讲Worked Examples
例 1 从累积表算百分位,再从 ogive 反读数值Example 1 Percentiles from a table, values from an ogive
- (a) 中位数 = 第 50 百分位。表里“50–54”这一组的累计恰好是 50.0%,说明 50% 的累计正好走到 54 岁末(即 55 岁前)。所以中位数 ≈ 55 岁。看图更快:从 50% 水平过去,交点正好在 55。 (a) The median is the 50th percentile. The 50–54 class ends at exactly 50.0%, so half the presidents were 54 or younger — the median is about 55. On the graph: go across from 50% and the intersection lands on 55. \[ \text{median}=55,\qquad Q_1\approx 50.8,\qquad Q_3\approx 59.6 \]
- 四分位数要内插。第 25 百分位落在 45–49(20.5%)与 50–54(50.0%)之间:\( 50+5\times\frac{25-20.5}{50-20.5}\approx50.8 \)。第 75 百分位落在 55–59 与 60–64 之间:\( 55+5\times\frac{75-50}{77.3-50}\approx59.6 \)。 Quartiles need interpolation. The 25th percentile lies between 45–49 (20.5%) and 50–54 (50.0%): \( 50+5\times\frac{4.5}{29.5}\approx50.8 \). The 75th lies between 55–59 and 60–64: \( 55+5\times\frac{25}{27.3}\approx59.6 \).
- (b) 47 岁在 45–49 这一组内。该组从 4.5%(45 岁)升到 20.5%(50 岁),47 岁在其中走过了 \( (47-45)/5=0.4 \) 的距离,所以累计约 \( 4.5+0.4\times16=10.9 \),即约第 11 百分位。 (b) Age 47 sits inside the 45–49 class, which runs from 4.5% at 45 to 20.5% at 50. Moving 0.4 of the way gives \( 4.5+0.4\times16=10.9 \) — about the 11th percentile. \[ 4.5+\frac{47-45}{5}\times(20.5-4.5)\approx 10.9 \]
- (c) 第 65 百分位:从 65% 水平找交点。65% 落在 55(50.0%)与 60(77.3%)之间:\( 55+5\times\frac{15}{27.3}\approx57.8 \),约 58 岁。解释要写成一句完整的话:“约 65% 的总统在 58 岁或更年轻时就职。” (c) The 65th percentile: run across at 65%. It falls between 55 (50.0%) and 60 (77.3%): \( 55+5\times\frac{15}{27.3}\approx57.8 \), about 58. The interpretation must be a sentence: "about 65% of these presidents were 58 or younger when inaugurated."
- (d) 62 岁在 60–64 组内。该组从 77.3% 升到 93.2%,62 岁走了 \( (62-60)/5=0.4 \),累计约 \( 77.3+0.4\times15.9\approx83.7 \),所以超过约 84% 的总统。 (d) Age 62 lies in the 60–64 class, rising from 77.3% to 93.2%. At 0.4 of the way: \( 77.3+0.4\times15.9\approx83.7 \), so he exceeded about 84%.
例 2 用 z 分数比较两场不同的考试Example 2 Comparing two exams with z-scores
- 第一步固定公式并写清代入的数:\( z=\frac{x-\mu}{\sigma} \)。两个分布分别代,不要混用 σ。写的时候把 μ 和 σ 并排写出来,避免抄错。 Write the formula and the substituted numbers: \( z=\frac{x-\mu}{\sigma} \), once per distribution, never mixing the two σs. Line up μ and σ beside each computation. \[ z_{\mathrm{SAT}}=\frac{1080-896}{174}\approx 1.06,\qquad z_{\mathrm{ACT}}=\frac{28-20.6}{5.2}\approx 1.42 \]
- (b) 比 z,不比原始分。1.42 > 1.06,所以 ACT 的相对位置更高。注意原始分 1080 看起来“大得多”,但它只是在另一个刻度上;标准化之后才可比。 (b) Compare z, not raw scores. 1.42 > 1.06, so the ACT standing is higher. The raw 1080 only looks "bigger" because it lives on another ruler; standardising makes the comparison legitimate.
- (c) 用正态面积解释百分位。\( z=1.06 \) 左侧面积约 0.855,即他的 SAT 分数高于约 85.5% 的考生。这里能这么做,是因为题目明说“近似正态”——没说就不能用面积。 (c) Turn the z into an area. The area below \( z=1.06 \) is about 0.855, so he exceeded roughly 85.5% of SAT takers. This is legitimate only because the problem states "approximately Normal" — without that, no area claim. \[ P(Z<1.06)\approx 0.855 \]
例 3 摄氏转华氏:一次典型的线性变换Example 3 Celsius to Fahrenheit: a textbook linear transformation
- 先认出 a 与 b。\( F=\frac{9}{5}C+32 \),所以 \( b=\frac{9}{5}=1.8 \),\( a=32 \)。这一步写在纸上,后面的每个数字都要用这两个值。 Identify a and b. \( F=\frac{9}{5}C+32 \), so \( b=1.8 \) and \( a=32 \). Write them down; every later number uses them.
- 中心类(mean, median)用完整的 a + b·(旧值)。这包括百分位:中位数 21 → 69.8。 Centre measures (mean, median) use the full a + b·(old). Percentiles too: median 21 → 69.8. \[ \bar F=32+1.8(20)=68,\qquad \text{median}_F=32+1.8(21)=69.8 \]
- 离散类(SD, IQR)只乘 |b|,不加 a。这是一个高频失分点:很多人会把 32 也加进标准差。因为整体平移不改变“宽度”。 Spread measures (SD, IQR) scale by |b| only — never add a. This is the commonest error: adding the 32 into the SD. A shift cannot change a width. \[ s_F=1.8(5)=9,\qquad \mathrm{IQR}_F=1.8(6)=10.8 \]
- 形状:不变。线性变换只是把数轴拉长、平移,两个峰的相对位置与尾巴的长短比例都没变,所以仍是右偏。 Shape: unchanged. A linear transformation stretches and slides the number line; relative peak positions and the proportions of the tails are preserved, so it is still right-skewed.
随堂练习Check Your Understanding
四道题分别考:百分位的措辞、ogive 的读数、Chebyshev 的用法、变换对中心与离散的影响。 Four questions: the wording of a percentile, reading an ogive, applying Chebyshev, and the effect of a transformation.
某学生在班上测验中处于第 88 百分位。下列哪一句是正确解读?
A student is at the 88th percentile on a class quiz. Which interpretation is correct?
- a他答对了 88% 的题目。He answered 88% of the items correctly.
- b他的分数高于或等于班上约 88% 的同学。His score is at or above about 88% of the class.
- c班上有 88% 的同学分数比他高。88% of the class scored higher than he did.
- d他在班上的名次是第 88 名。His rank in the class is 88th.
- 把定义代进去念一遍Substitute into the definition “有 88% 的分数小于或等于他的分数”——换句话说,他站在 88% 的人头上(含同分)。"88% of the scores are at or below his score" — he stands above (or level with) 88% of the class. b 与定义一字不差。b matches the definition exactly.
- 逐个排查误读Eliminate the misreadings a 把“百分位”当成了“正确率”;c 方向反了(那他说的是第 12 百分位);d 把百分比当成了名次(班上可能只有 30 人,根本不可能是第 88 名)。a confuses percentile with percent-correct; c reverses the direction (that would be the 12th percentile); d treats a percent as a rank, impossible in a class of 30. 只有 b 同时满足方向与含义。Only b gets direction and meaning right.
- 补一句完整的 AP 句式Add the full AP sentence “His score was at or above the scores of about 88% of the students in the class.” 写百分位时一定带“of what”——哪一个群体。Say it with the group named: "at or above the scores of about 88% of the students in the class." 带上下文的解读才是满分答案。Context completes the credit.
| 选项Option | 判断与理由Verdict & reason |
|---|---|
| a | 错。百分位与答对多少题无关。Wrong: percentiles say nothing about items correct. |
| b | 对。正是“at or below”的定义。Correct: exactly the "at or below" definition. |
| c | 错。方向反了,若真是这样他只在第 12 百分位。Wrong: reversed direction — that would be the 12th percentile. |
| d | 错。百分比不是名次。Wrong: a percent is not a rank. |
用本讲的总统年龄累积相对频率图,第 75 百分位大约是
Using this lecture's ogive of presidents' ages, the 75th percentile is about
- a55 岁55
- b58 岁58
- c60 岁60
- d65 岁65
- 先定位 75% 落在哪一段Locate the class containing 75% 表里 55 岁对应 50.0%,60 岁对应 77.3%。75% 落在这一段内,所以答案一定在 55 与 60 之间。The table gives 50.0% at 55 and 77.3% at 60, so 75% lies inside that class — the answer must sit between 55 and 60. a(55)偏低,d(65)偏高,只剩 b 与 c。55 is too low and 65 too high; only b and c remain.
- 按比例内插Interpolate 在这一段里,年龄每增加 1 岁,累计百分比增加 \( (77.3-50)/5 = 5.46 \) 个百分点。从 50% 到 75% 要走 25 个百分点,即 25/5.46 ≈ 4.6 岁。Within this class each extra year adds \( (77.3-50)/5 = 5.46 \) points. Climbing from 50% to 75% needs 25 points, about 4.6 years. \[ 55+5\times\frac{75-50}{77.3-50}=55+4.58\approx 59.6 \] 约 59.6 岁 → 最接近 60 岁,选 c。About 59.6, closest to 60 → c.
- 顺便核对另外两个数Check the other values for calibration 55 岁是中位数(50%),58 岁是第 65 百分位——它们正好是题目里的干扰项,说明命题人知道你会内插错位置。55 is the median (50%) and 58 is the 65th percentile — precisely the distractors, because the item writer knows where interpolation goes wrong. 读图题先把每个选项“翻译”成百分位,就能反查。Translate each option back into a percentile; the trap becomes obvious.
| 选项Option | 判断与理由Verdict & reason |
|---|---|
| a | 错。55 岁对应 50%,那是中位数。Wrong: 55 is the 50th percentile — the median. |
| b | 错。58 岁对应第 65 百分位。Wrong: 58 is the 65th percentile. |
| c | 对。75% 在 55 与 60 之间靠近 60,内插得约 59.6。Correct: 75% sits between 55 and 60, near 60; interpolation gives about 59.6. |
| d | 错。65 岁对应 93.2%,接近第 93 百分位。Wrong: 65 corresponds to 93.2%. |
某班考试成绩的平均数为 77、标准差为 6,分布形状未知。根据 Chebyshev 不等式,至少 75% 的成绩落在
A class's exam scores have mean 77 and SD 6 with an unknown shape. By Chebyshev's inequality, at least 75% of the scores lie between
- a65 与 8965 and 89
- b71 与 8371 and 83
- c59 与 9559 and 95
- d77 与 8377 and 83
- 由比例反解 kSolve for k 常见错误是直接猜 k = 2 而不验证;本题恰好是 2,但考试会改成“至少 88.9%”,那时 k = 3。Do not guess k = 2 without solving; here it happens to be 2, but an exam variant asking for "at least 88.9%" needs k = 3. \[ 1-\frac{1}{k^2}=0.75\ \Longrightarrow\ k=2 \] k = 2,区间为 \( 77\pm2\times6 \)。With k = 2 the interval is \( 77\pm2\times6 \).
- 算出区间Compute the interval 77 − 12 = 65,77 + 12 = 89。注意乘的是标准差,不是方差。77 − 12 = 65 and 77 + 12 = 89. Multiply the SD, never the variance. \[ \mu\pm2\sigma = 77\pm12=[65,\ 89] \] 答案 65 与 89。The interval is 65 to 89.
- 说清“至少”的含义State what "at least" means “至少 75%”只保证下界:真实比例可能是 87%、96%,甚至 100%,但不会低于 75%。所以答案不能写成“约 75%”。"At least 75%" is a floor: the true share could be 87%, 96% or even 100%, but never below 75%. So never write "about 75%". 这也是 b、d 出局的原因:它们比 \( \mu\pm\sigma \) 还窄,却宣称 75%。This also eliminates b and d: both are narrower than one SD yet claim 75%.
| 选项Option | 判断与理由Verdict & reason |
|---|---|
| a | 对。\( \mu\pm2\sigma=65 \) 到 89,对应至少 75%。Correct: \( \mu\pm2\sigma \) is 65 to 89, at least 75%. |
| b | 错。这是 \( \mu\pm\sigma \),Chebyshev 对它不提供任何保证(k = 1 时下界为 0)。Wrong: that is \( \mu\pm\sigma \), for which Chebyshev guarantees nothing (k = 1 gives 0). |
| c | 错。这是 \( \mu\pm3\sigma \),对应至少 88.9%。Wrong: that is \( \mu\pm3\sigma \), at least 88.9%. |
| d | 错。只有一侧,且宽度不足,无法承载 75% 的保证。Wrong: one-sided and too narrow to carry a 75% guarantee. |
某组数据的平均数为 10、标准差为 3、中位数为 9、IQR 为 4。令 \( y=2x-5 \),则 \(y\) 的平均数、标准差、中位数、IQR 依次是
A data set has mean 10, SD 3, median 9 and IQR 4. Let \( y=2x-5 \). The mean, SD, median and IQR of \(y\) are, in order,
- a15,6,13,815, 6, 13, 8
- b15,6,13,415, 6, 13, 4
- c15,3,9,815, 3, 9, 8
- d20,6,18,820, 6, 18, 8
- 中心类:完整的 a + b·旧值Centre: the full a + b·old 平均数 \( 2(10)-5=15 \);中位数 \( 2(9)-5=13 \)。两个都要减 5,因为整个图形被平移了。Mean \( 2(10)-5=15 \); median \( 2(9)-5=13 \). Both lose the 5, because the whole picture slid. \[ \bar y=2(10)-5=15,\qquad \text{median}_y=2(9)-5=13 \] d 的平均数 20 忘了减 5,直接出局。Option d's mean of 20 forgets the −5 and is out.
- 离散类:只乘 |b|Spread: multiply by |b| only \( s_y=2(3)=6 \),\( \mathrm{IQR}_y=2(4)=8 \)。平移不改变任何“宽度”,所以减 5 完全不进这两个数。\( s_y=2(3)=6 \) and \( \mathrm{IQR}_y=2(4)=8 \). A shift changes no width, so the −5 never enters. \[ s_y=|2|(3)=6,\qquad \mathrm{IQR}_y=|2|(4)=8 \] b 忘了乘 IQR,c 忘了乘 SD,两个都是“半对”的干扰项。b forgets to scale the IQR; c forgets the SD — both are half-right distractors.
- 顺手确认形状Confirm the shape 原来的右偏不会因为乘 2 减 5 而变成对称——线性变换保形状。这条结论在第 6 讲正态近似时会反复用到。Right skew does not become symmetry after ×2 −5: linear transformations preserve shape. That fact recurs when Lecture 6 approximates with a Normal curve. 四问的正确顺序:先中心、再离散、最后形状。Order of attack: centre, then spread, then shape.
| 选项Option | 判断与理由Verdict & reason |
|---|---|
| a | 对。中心 15 与 13,离散 6 与 8。Correct: centres 15 and 13, spreads 6 and 8. |
| b | 错。IQR 也要乘 2。Wrong: the IQR must also double. |
| c | 错。标准差要乘 2,中位数要减 5。Wrong: the SD doubles and the median shifts by −5. |
| d | 错。中心类忘了减 5。Wrong: the centre measures skip the −5. |
本讲小结Summary
- 第 p 百分位:有 p% 的观测值小于或等于它。它描述位置,不是正确率、也不是名次;同分时多人共享同一百分位。
- 累积相对频率图(ogive):横轴是数值、纵轴是累计百分比,只升不降。读第 p 百分位 = 从 p% 水平到曲线再垂直落下;曲线越陡说明那段数据越密。
- z 分数 \( z=\frac{x-\mu}{\sigma} \) 数的是“离平均数几个标准差”,无单位,可跨分布比较;正负表示方向,绝对值大小表示罕见程度。
- 标准化后均值恒为 0、标准差恒为 1;但 z 不说明形状——要把 z 换成百分位,必须有正态假设。
- Chebyshev:任何分布中 \( \mu\pm k\sigma \) 内至少 \( 1-1/k^2 \)(k = 2 → 75%,k = 3 → 88.9%),是下界;68–95–99.7 只在近似正态时作近似值。
- 线性变换 \( y=a+bx \):中心类变为 \( a+b\cdot \)旧值,离散类变为 \( |b|\cdot \)旧值,形状不变。z 分数就是 a = −μ/σ、b = 1/σ 的特例。
- The pth percentile has p% of the observations at or below it. It describes position — not percent-correct, not rank — and ties share a percentile.
- An ogive plots cumulative percent against the variable and never falls. Read the pth percentile by going across from p% and dropping down; a steeper stretch means denser data.
- A z-score \( z=\frac{x-\mu}{\sigma} \) counts standard deviations from the mean; it is unit-free and comparable across distributions. Sign gives direction, size gives unusualness.
- After standardising, the mean is exactly 0 and the SD exactly 1; but z says nothing about shape — converting z to a percentile needs Normality.
- Chebyshev: any distribution has at least \( 1-1/k^2 \) of its values within \( \mu\pm k\sigma \) (k = 2 → 75%, k = 3 → 88.9%) — a lower bound. 68–95–99.7 is only an approximation for approximately Normal data.
- Under \( y=a+bx \): centre measures become \( a+b\cdot \)old, spread measures \( |b|\cdot \)old, and shape is unchanged. Standardising is the case a = −μ/σ, b = 1/σ.
密度曲线与正态分布Density Curves and Normal Distributions
第 1 讲我们用直方图、点图、均值与标准差描述数据,可真实数据总是“锯齿”的:换个组距、换一批样本,形状就变。这一讲先做一件事——把锯齿磨成一条光滑曲线(密度曲线),再重点研究这类曲线里最重要的一个家族:正态分布。一句话概括:曲线下的面积就是比例。这一句话是后面二十讲推断的地基。
Lecture 1 described data with dotplots, histograms, means and standard deviations — but real data are jagged: change the bin width or the sample and the shape moves. This lecture smooths the histogram into a density curve and then studies the most important family of curves, the Normal distributions. One sentence carries the whole lecture: area under the curve is proportion. Everything in the inference half of this course stands on it.
本讲学习目标Learning Objectives
- ESTIMATE 估计:只看一条密度曲线的形状,就能判断中位数与平均数谁在左、谁在右。
- STATE 陈述密度曲线的两条硬性要求(全程在横轴上方、面积恰好为 1),并说出为什么面积等于比例。
- FIND 求比例:均匀分布用矩形面积,正态分布用 68-95-99.7 法则、z 表或计算器,从面积读出比例。
- STANDARDISE 标准化:把任意正态 \(N(\mu,\sigma)\) 换成标准正态 \(N(0,1)\),双向解题——给区间求比例、给百分位求数值。
- DETERMINE 判断一组数据是否近似正态:直方图形状、平均数与中位数的比较、68-95-99.7 的实测比例,以及正态概率图。
- EXPLAIN 解释为什么连续型变量取到某一个精确值的概率是 0,而它落在一个小区间里的概率可以很大。
- ESTIMATE the relative locations of the mean and median on a density curve from its shape alone.
- STATE the two requirements for a density curve (never below the horizontal axis, total area exactly 1) and explain why area equals proportion.
- FIND a proportion from area: rectangles for a Uniform distribution, the 68–95–99.7 rule, Table A, or a calculator for a Normal distribution.
- STANDARDISE any \(N(\mu,\sigma)\) into \(N(0,1)\) and solve in both directions — interval to proportion, percentile to value.
- DETERMINE whether a set of data is approximately Normal from a histogram, a comparison of mean and median, the observed 68–95–99.7 percents, and a Normal probability plot.
- EXPLAIN why a continuous variable has probability 0 of taking any single exact value, while an interval around it can carry a large probability.
核心概念Core Concepts
6.1 从锯齿直方图到光滑曲线:密度曲线是什么6.1 From Jagged Histogram to Smooth Curve: What a Density Curve Is
当数据足够多、组距足够细时,直方图的上沿会连成一条光滑曲线。这条曲线只做一件事:用面积告诉你比例——它不告诉你人数,只告诉你“占多少”。
With enough observations and narrow enough bins, the tops of the bars join into a smooth curve. That curve does exactly one job: it turns area into proportion — never a count, always “what fraction”.
为什么非要把好看的直方图磨平?因为直方图有三个讨厌的毛病:柱高取决于组距(同一批数据,组距 1 和组距 2 画出来高低完全不同);样本一变形状就跳;而且后面要算概率、要积分、要推断,锯齿没法算。于是我们把直方图的“阶梯”换成一个密度曲线一条光滑曲线:全程在横轴上方,曲线下总面积恰好为 1。曲线上任意区间对应的面积,就是观测值落在这个区间的比例。A smooth curve that never dips below the horizontal axis and encloses total area exactly 1. The area over any interval equals the proportion of observations in that interval.——它是数据的理想化模型,就像第 8 讲会用一条直线去当散点图的模型一样。
Why smooth away a perfectly readable histogram? Three reasons. Bar heights depend on the bin width (same data, widths 1 and 2 look completely different); the shape jumps around when the sample changes; and jagged steps cannot be integrated or turned into probability statements. So we replace the staircase with a density curveA smooth curve above the horizontal axis with total area exactly 1; area over an interval equals the proportion of observations there.全程在横轴上方、总面积恰好为 1 的光滑曲线;区间面积 = 观测值落在该区间的比例。 — an idealised model for the data, exactly as Lecture 8 will use a straight line as a model for a scatterplot.
密度曲线必须满足两条Two requirements, no exceptions
① 全程在横轴上方或与横轴重合(密度不可能为负);② 曲线下总面积恰好等于 1(每个观测值总要落在某个地方,所以所有可能性加起来是 100%)。
(1) It is always on or above the horizontal axis (a density cannot be negative); (2) the total area underneath is exactly 1 (every observation lands somewhere, so the possibilities add to 100%).
面积的读法How to read the area
横轴上任取一段区间 \(a\) 到 \(b\),曲线上方、该区间正上方的那块面积,就是观测值落在 \(a\) 与 \(b\) 之间的比例:\(P(a\le X\le b)\)。
Pick any interval from \(a\) to \(b\) on the horizontal axis. The area under the curve over that interval is the proportion of observations between \(a\) and \(b\): \(P(a\le X\le b)\).
| 对比项Feature | 直方图(真实数据)Histogram (real data) | 密度曲线(模型)Density curve (model) |
|---|---|---|
| 纵轴Vertical axis | 频数或百分比,取决于组距frequency or percent, depends on bin width | 密度(高度本身没有意义,面积才有)density — the height means nothing, the area means everything |
| 中心与离散Center & spread | \(\bar x,\ s\)(统计量,随样本变) | \(\mu,\ \sigma\)(参数,固定parameters, fixed) |
| 作用Role | 看这一批数据长什么样shows what this batch looks like | 描述总体的整体规律,可算概率describes the population pattern and yields probabilities |
密度曲线的高度不是概率,密度甚至可以大于 1:若 \(X\) 在 \([0,\,0.5]\) 上均匀分布,曲线高度是 \(1/0.5=2\),比 1 大,却完全合法。概率永远是面积,所以对连续型变量谈“某个点”毫无意义——任何单点的概率都是 0。
The height of a density curve is not a probability, and a density may exceed 1: if \(X\) is Uniform on \([0,\,0.5]\) the curve sits at height \(1/0.5=2\). Probability is always area, so a single point carries no probability at all — \(P(X=x)=0\) for every \(x\).
6.2 密度曲线上的中心:等面积点与平衡点6.2 Center of a Density Curve: the Equal-Areas Point and the Balance Point
中位数是“等面积点”(把面积对半分的那条竖线),平均数是“平衡点”(把曲线当木板,能架在支点上不倒下)。偏斜时平均数被长尾拉走,中位数不跑。
The median is the equal-areas point — the vertical line that splits the area in half. The mean is the balance point — where the curve would balance if cut from solid material. Under skew the mean is dragged toward the long tail; the median stays put.
这两个比喻不是文学修辞,而是精确的操作定义。想象把曲线下的面积剪下来做成一块硬纸板:把它架在一根刀刃上,能保持水平的那一点就是平均数 \(\mu\)。再换一个动作:找一条竖线,使左右两侧的面积各为 0.5,这条竖线就是中位数。对称时两者重合在正中央;一旦有长尾,多出来的“重量”在尾巴那一侧,平衡点只好往尾巴方向挪,于是平均数被拉向长尾。
These are not decorative metaphors but exact operational definitions. Cut the area out of cardboard: the point where it balances on a knife edge is the mean \(\mu\). Then find the vertical line that splits the area into two halves of 0.5 each — that is the median. For a symmetric curve the two coincide at the centre; a long tail adds “weight” on one side, so the balance point slides toward it and the mean is pulled toward the long tail.
6.3 均匀分布:最简单的密度曲线6.3 The Uniform Distribution: the Simplest Density Curve
均匀分布的密度曲线是一个矩形:所有取值“一样可能”,所以高度恒定。矩形面积好算,于是概率 = 底 × 高 = 区间长度 ÷ 总长度。
A Uniform density is a rectangle: every value is equally likely, so the height is constant. Rectangle area is easy, so probability is just base × height = interval length ÷ total length.
把 \(X\sim U(a,b)\) 画出来:横轴从 \(a\) 到 \(b\),矩形高度必须是 \(1/(b-a)\),否则面积凑不成 1。于是求 \(P(c<X<d)\) 就是量一段长度再乘高度:\((d-c)\cdot\frac{1}{b-a}\)。它的中心与离散也有闭式公式,考卷上(AP 公式表里)会给,但你要知道它们为什么长这样:平均数就是矩形的中点 \(\mu=\frac{a+b}{2}\);标准差 \(\sigma=\frac{b-a}{\sqrt{12}}\)——不均匀的“波动”比总长度小得多,除以 \(\sqrt{12}\) 正是把矩形的分散程度折算成一个等效的 σ。
Draw \(X\sim U(a,b)\): the horizontal axis runs from \(a\) to \(b\), and the height must be \(1/(b-a)\), otherwise the area cannot be 1. Then \(P(c<X<d)\) is a length times a height: \((d-c)\cdot\frac{1}{b-a}\). Center and spread have closed forms (given on the AP formula sheet, but you should know why): the mean is the midpoint of the rectangle, \(\mu=\frac{a+b}{2}\), and the standard deviation is \(\sigma=\frac{b-a}{\sqrt{12}}\) — a rectangle is far less variable than its full width suggests, and dividing by \(\sqrt{12}\) converts its spread into an equivalent σ.
6.4 正态分布:由 μ 与 σ 完全决定的一个家族6.4 Normal Distributions: a Family Fixed by μ and σ
正态曲线是对称、单峰、钟形的密度曲线,只要给出 μ 与 σ 就唯一确定:μ 决定它站在哪,σ 决定它有多胖。而 68-95-99.7 法则让你不查表就能说出三个最常见的比例。
A Normal curve is a symmetric, unimodal, bell-shaped density curve, completely determined once μ and σ are given: μ sets where it stands, σ sets how fat it is. And 68–95–99.7 lets you quote the three most common proportions without a table.
记作 \(N(\mu,\sigma)\)。几个必须记住的几何事实:曲线的最高点在 \(\mu\);左右完全镜像;拐点(凹凸性改变的地方)恰好在 \(\mu\pm\sigma\)——这就是“σ 是曲线宽度的度量”这句话的精确含义;σ 变大曲线变矮变胖,但面积始终是 1。标准差与平均数的单位跟原始数据一样,这正是它们比方差好用的原因。
Write it \(N(\mu,\sigma)\). Geometric facts worth memorising: the peak is at \(\mu\); the two sides are exact mirror images; the inflection points sit exactly at \(\mu\pm\sigma\) — that is the precise meaning of “σ measures the width”; larger σ gives a lower, fatter curve with area still 1. Mean and standard deviation carry the same units as the data, which is why they beat the variance in practice.
对任意 \(N(\mu,\sigma)\):约 68% 的观测落在 \(\mu\pm\sigma\);约 95% 落在 \(\mu\pm2\sigma\);约 99.7% 落在 \(\mu\pm3\sigma\)。反过来读更值钱:落在 \(\mu\pm\sigma\) 之外的只有约 32%,而 \(\pm2\sigma\) 之外的只有约 5%——所以一个 \(z=2.5\) 的观测是“少见的”,一个 \(z=0.3\) 的观测是“平常的”。
For any \(N(\mu,\sigma)\): about 68% of observations lie within \(\mu\pm\sigma\), about 95% within \(\mu\pm2\sigma\), about 99.7% within \(\mu\pm3\sigma\). The reverse reading is more valuable: only about 32% fall outside \(\mu\pm\sigma\) and only about 5% outside \(\mu\pm2\sigma\) — so \(z=2.5\) is unusual and \(z=0.3\) is ordinary.
下面这个三维模型把“密度曲线”从平面里抬出来:平面上的曲线其实是一张曲面的剖面,而“面积 = 概率”在空间里变成“这一片曲面的面积”。拖动旋转,注意中间高、两侧低;把橙色的那块想成“\(Z\) 落在这一段的概率”。
The 3D model below lifts the density curve out of the plane: the curve on paper is the cross-section of a surface, and “area = probability” becomes “the area of this slab of surface”. Drag to rotate — tall centre, low tails — and read the amber slab as “the probability that \(Z\) lands in this range”.
6.5 标准化:把一个正态问题变成标准正态问题6.5 Standardising: Turning Any Normal Problem into the Standard Normal
所有正态曲线只是同一张标准曲线被平移、拉伸。所以只要会算 \(N(0,1)\) 的面积,任何 \(N(\mu,\sigma)\) 都能算:先算 \(z=(x-\mu)/\sigma\),再找面积。
All Normal curves are the same standard curve shifted and stretched. So once you can find areas for \(N(0,1)\), you can handle any \(N(\mu,\sigma)\): compute \(z=(x-\mu)/\sigma\), then find the area.
\(z\) 的含义是“距离平均数几个标准差”,它把单位彻底消掉了:身高 178 cm 与体重 70 kg 没法比,但“高于平均 1.2 个标准差”可以比。这就是第 1 讲“标准化”思想在连续分布上的正式落地。计算时要养成一个不会出错的动作顺序:① 画图 → ② 标出要求的那块面积 → ③ 标准化 → ④ 查表或计算器 → ⑤ 用题目的话写结论。第 ⑤ 步是 FRQ 的得分点,很多人算对了数字却丢分,就是因为没写“约 44% 的球飞得比 305 码远”。
\(z\) means “how many standard deviations from the mean”, and it strips the units away: 178 cm and 70 kg cannot be compared, but “1.2 SD above the mean” can. This is the formal landing of Lecture 1's standardising idea. Use a fixed five-step routine: (1) draw the curve → (2) shade the target area → (3) standardise → (4) table or calculator → (5) state the conclusion in context. Step 5 is where FRQ points live; many students compute correctly and still lose the point by writing only a number.
| 要求的面积Wanted area | 用 z 表怎么算How to get it from Table A | 计算器Calculator |
|---|---|---|
| \(P(Z<z)\) | 直接查read directly | normalcdf(−1E99, z) |
| \(P(Z>z)\) | \(1-\)左侧面积(area to the left) | normalcdf(z, 1E99) |
| \(P(a<Z<b)\) | 大减小big minus small | normalcdf(a, b) |
| 给百分位求 xpercentile → value | 反查表体search the table body backwards | invNorm(area, μ, σ) |
normalcdf(-1.25, 0.81, 0, 1) → 0.6854
invNorm(0.90, 6.84, 1.55) → 8.826
1E99)。The order is always lower, upper, μ, σ. For “greater than”, put \(1\times10^{99}\) (written 1E99) as the upper bound.“求高于 4 的比例”算成 \(P(Z<1.143)=0.8735\) 是把方向搞反了(正确是 0.1265);“求第 90 百分位”用 \(\text{invNorm}(0.10)\) 也是反的。画图能救你:把 4 标在均值右边,问自己“我要的是右边那块还是左边那块”,然后再按计算器。
Asking for “the proportion above 4” and returning \(P(Z<1.143)=0.8735\) reverses the direction (the answer is 0.1265); asking for the 90th percentile and typing \(\text{invNorm}(0.10)\) does the same. A sketch saves you: mark 4 to the right of the mean, ask “do I want the right block or the left one?”, then press the keys.
6.6 正态概率图:这组数据到底能不能用正态模型?6.6 Normal Probability Plots: Is a Normal Model Appropriate Here?
判断“能不能用正态”有四件证据:直方图是否对称钟形、平均数是否接近中位数、实测的 68/95/99.7 是否对得上,以及最灵敏的一件——正态概率图是否近似一条直线。
Four pieces of evidence decide whether a Normal model is appropriate: a symmetric bell-shaped histogram, mean close to median, observed 68/95/99.7 matching the targets, and the sharpest one — whether the Normal probability plot is close to a straight line.
正态概率图的横轴不是原始数据,而是“如果数据真的正态,这个位置应该对应的 z 值”;纵轴才是观测值。于是“数据正态”就等价于“点落在一条直线上”。它比直方图灵敏得多,因为直方图会把异常值藏在一个柱子里,而概率图会把两端的问题放大给你看。读图口诀只有一句:哪一端翘离直线,长尾就在哪一端——右端上翘说明右尾比正态更重(右偏),左端下垂说明左偏;只有个别点远远离开直线,那不是形状问题,是异常值。
On a Normal probability plot the horizontal axis is not the raw data but “the z-score this position would have if the data were Normal”; the vertical axis is the observed value. “Data are Normal” then becomes “the points lie on a straight line”. It is far more sensitive than a histogram, which hides an outlier inside one bar while the probability plot magnifies the tails. The reading rule is one sentence: whichever end lifts away from the line is the end with the long tail — a right tail lifting means right skew, a drooping left end means left skew; a single point far off the line is not a shape problem, it is an outlier.
例题精讲Worked Examples
例 1 均匀分布:只量长度,不查表Example 1 Uniform: measure lengths, no table needed
- 先把区间长度算清楚:\(b-a=5.04-4.92=0.12\)。高度由“面积必须为 1”倒推:高 \(=1/0.12\approx 8.333\)。注意这个数比 1 大,它证明“高度不是概率”。 Get the width first: \(b-a=5.04-4.92=0.12\). The height is forced by “area = 1”: height \(=1/0.12\approx 8.333\). Note it exceeds 1 — proof that height is not probability. \[ \text{height}=\frac{1}{0.12}=8.33 \]
- (b) 只量 4.97 到 5.04 这一段:长 \(0.07\),乘高度得面积。 (b) Measure only the segment from 4.97 to 5.04: length \(0.07\), times the height gives the area. \[ P(X>4.97)=(5.04-4.97)\times\frac{1}{0.12}=\frac{0.07}{0.12}\approx 0.5833 \]
- (c) 同样量长度:\(5.03-4.93=0.10\)。这里容易犯的错是“减去均值再标准化”——均匀分布不需要 z,直接量。 (c) Again a length: \(5.03-4.93=0.10\). The common slip is to standardise; a Uniform distribution needs no z at all. \[ P(4.93<X<5.03)=\frac{0.10}{0.12}\approx 0.8333 \]
- (d) 代公式:中心是中点,离散用 \(b-a\) 除以 \(\sqrt{12}\)。 (d) Substitute: the centre is the midpoint, the spread is the width over \(\sqrt{12}\). \[ \mu=\frac{4.92+5.04}{2}=4.98,\qquad \sigma=\frac{0.12}{\sqrt{12}}\approx 0.0346 \]
例 2 正态计算:两个方向各来一遍Example 2 Normal calculations in both directions
- (a) 先看图:3.74 在均值左边。算 \(z\),注意 \(3.74=6.84-2\times1.55\),所以 \(z=-2\) 恰好在整数上——这就是出题人故意挑的数。 (a) Sketch first: 3.74 is left of the mean. Compute \(z\) — note \(3.74=6.84-2(1.55)\), so \(z=-2\) exactly, which is why the number was chosen. \[ z=\frac{3.74-6.84}{1.55}=-2.00,\qquad P(Z<-2.00)=0.0228 \]
- (b) 两条边界各算一个 \(z\):\(5.29\) 与 \(9.94\) 分别是 \(\mu-\sigma\) 与 \(\mu+2\sigma\)。于是“两 z 之间”用大减小。 (b) Standardise both boundaries: 5.29 and 9.94 are \(\mu-\sigma\) and \(\mu+2\sigma\). Then “between two z” means big minus small. \[ z_1=-1.00,\ z_2=2.00;\qquad P(-1<Z<2)=0.9772-0.1587=0.8185 \]
- (c) 方向翻过来:已知左侧面积 0.90,反求 \(x\)。先查表体找到 \(z\approx1.28\),再脱标准化 \(x=\mu+z\sigma\)。 (c) Reverse it: the left area is 0.90 and we want \(x\). Find \(z\approx1.28\) in the table body, then un-standardise with \(x=\mu+z\sigma\). \[ x=6.84+1.2816\times1.55\approx 8.83 \]
normalcdf(-1E99, 3.74, 6.84, 1.55) → 0.02275
normalcdf(5.29, 9.94, 6.84, 1.55) → 0.81855
invNorm(0.90, 6.84, 1.55) → 8.8262
例 3 用 68-95-99.7 做“不用计算器的估算”Example 3 Estimating with 68–95–99.7, no calculator
- (a) 296 与 312 恰好是 \(\mu\pm\sigma\),直接调用 68% 那条。 (a) 296 and 312 are exactly \(\mu\pm\sigma\), so quote the 68% line. \[ P(296<X<312)\approx 0.68 \]
- (b) 320 是 \(\mu+2\sigma\)。\(\pm2\sigma\) 内有 95%,所以两侧尾部合计 5%,单侧右尾约 2.5%。这里最容易错的是把 5% 整个当成尾巴。 (b) 320 is \(\mu+2\sigma\). With 95% inside, the two tails share 5%, so the right tail alone is about 2.5%. The classic slip is to give the whole 5% to one tail. \[ P(X>320)=P(Z>2)\approx \frac{1-0.95}{2}=0.025 \]
- (c) 340 是 \(\mu+4.5\sigma\),远超 \(3\sigma\),而 \(\pm3\sigma\) 已经包住 99.7%。这种距离在正态模型下几乎不会出现——所以要么是异常值,要么“正态模型”本身不合适。 (c) 340 is \(\mu+4.5\sigma\), far beyond \(3\sigma\), which already covers 99.7%. Under the model such a drive is essentially impossible — so either it is an outlier or the Normal model is wrong for these data.
随堂练习Check Your Understanding
先自己选,再点“查看解答”。每题都给出考点、逐步推理与错误选项诊断——错也要错得明白。 Choose first, then reveal. Every question comes with the tested idea, step-by-step reasoning and a diagnosis of each wrong option.
下列关于密度曲线的说法,正确的是
Which of the following statements about a density curve is correct?
- a曲线下总面积会随标准差增大而增大the total area under the curve grows as the standard deviation grows
- b曲线在某个 \(x\) 处的高度就是 \(X=x\) 的概率the height at a given \(x\) is the probability that \(X=x\)
- c曲线下总面积恒为 1,任意区间的面积是观测值落在该区间的比例the total area is always 1, and the area over an interval is the proportion of observations in it
- d密度曲线必须左右对称a density curve must be symmetric
- 先排“面积变”的选项Eliminate any “area changes” option σ 变大只是曲线变矮变胖,面积仍是 1;否则它就不是密度曲线了。A larger σ only flattens and widens the curve; the area stays 1, otherwise it is not a density curve. a 错。(a) is wrong.
- 再排“高度是概率”的选项Eliminate “height is probability” 均匀分布 \(U(0,0.5)\) 的高度是 2,比 1 还大,显然不能是概率。连续变量单点概率恒为 0。A Uniform density on \([0,0.5]\) has height 2 — larger than 1, so it cannot be a probability. A continuous variable has probability 0 at any single point. b 错。(b) is wrong.
- 剩下 c 与 dNow c versus d d 用“必须对称”把偏斜的密度曲线全判死刑,而 6.2 节那条右偏曲线完全合法。(d) outlaws every skewed density, yet the right-skewed curve in 6.2 is perfectly legal. 只有 c 正确。Only (c) survives.
| 选项Option | 判断与理由Verdict & reason |
|---|---|
| a | 错。面积恒为 1,与 σ、形状都无关。Wrong: area is 1 regardless of σ or shape. |
| b | 错。高度是密度,可大于 1;单点概率为 0。Wrong: height is density and may exceed 1; a single point has probability 0. |
| c | 对。这是密度曲线的定义性事实,也是全课的地基。Correct: the defining fact, and the foundation of the whole course. |
| d | 错。偏斜、双峰的密度曲线都合法,只是“正态”才要求对称钟形。Wrong: skewed and bimodal densities are legal; only Normal requires a symmetric bell. |
某品牌电池寿命近似服从均值 1200 小时、标准差 80 小时的正态分布。随机一只电池寿命超过 1360 小时的比例最接近
Battery lifetimes are approximately Normal with mean 1200 h and SD 80 h. The proportion of batteries lasting more than 1360 hours is closest to
- a0.160.16
- b0.050.05
- c0.0250.025
- d0.320.32
- e无法判断,因为没给样本量impossible to tell without a sample size
- 标准化Standardise \(1360-1200=160=2\times80\),所以恰好 \(z=2\)。\(1360-1200=160=2\times80\), so \(z=2\) exactly. \[ z=\frac{1360-1200}{80}=2.00 \] 要求的是 \(P(Z>2)\)。We need \(P(Z>2)\).
- 调用经验法则,注意“一半”Use the rule, remembering “half” \(\pm2\sigma\) 之外共 5%,正态对称,所以“超过 \(+2\sigma\)”只占其中一半。Beyond \(\pm2\sigma\) lies 5%; by symmetry the “above \(+2\sigma\)” side takes only half of it. \[ P(Z>2)\approx \frac{0.05}{2}=0.025 \] 约 2.5%。About 2.5%.
| 选项Option | 判断与理由Verdict & reason |
|---|---|
| a | 错。0.16 是 \(z=1\) 的单侧尾部,把 2σ 当成了 1σ。Wrong: 0.16 is the one-sided tail at \(z=1\); the σ-count was misread. |
| b | 错。0.05 是两侧尾部合起来,忘了除以 2。Wrong: 0.05 is both tails combined — the division by 2 is missing. |
| c | 对。\(P(Z>2)\approx0.0228\),四舍五入到 0.025。Correct: \(P(Z>2)\approx0.0228\), which rounds to 0.025. |
| d | 错。0.32 是落在 \(\pm1\sigma\) 之外的总比例。Wrong: 0.32 is the total outside \(\pm1\sigma\). |
| e | 错。题目已给分布模型,比例与样本量无关——样本量只影响估计的精度,不影响理论概率。Wrong: the model is given, so the proportion does not depend on n; sample size affects precision of estimates, not theoretical probability. |
某校学生的每日屏幕使用时间近似服从 \(N(4.2,\,1.1)\) 小时。若学校想找出“使用时间最长的 15%”学生,这个门槛约是多少小时?
Daily screen time of students is approximately \(N(4.2,\,1.1)\) hours. To identify the heaviest-using 15%, roughly what cut-off should the school use?
- a3.06 小时3.06 hours
- b5.34 小时5.34 hours
- c5.30 小时5.30 hours
- d1.04 小时(就是 \(z\) 值)1.04 hours (just the z-score)
- 把“前 15%”翻译成左侧面积Translate “top 15%” into a left area 画图:门槛在均值右边,它右边 15%,所以它左边 85%。Sketch it: the cut-off is right of the mean, with 15% to its right, hence 85% to its left. \[ \text{area to the left}=0.85 \] 用 0.85,不是 0.15。Use 0.85, not 0.15.
- 反查 \(z\)Find z 表体里找最接近 0.8500 的,得 \(z\approx1.04\)(精确值 1.0364)。Search the table body for 0.8500: \(z\approx1.04\) (1.0364 exactly). \[ z\approx1.04 \] 门槛高于均值约 1.04 个标准差。The cut-off sits 1.04 SD above the mean.
- 脱标准化Un-standardise \(x=\mu+z\sigma\)。这一步常被忘掉,于是答案停在“1.04”,单位变成小时就荒唐了。\(x=\mu+z\sigma\). Forgetting this step leaves “1.04 hours”, which is absurd. \[ x=4.2+1.0364\times1.1\approx 5.34\ \text{h} \] 门槛约 5.34 小时。The cut-off is about 5.34 hours.
| 选项Option | 判断与理由Verdict & reason |
|---|---|
| a | 错。3.06 是用左侧面积 0.15 算的,方向反了(那是最短的 15%)。Wrong: 3.06 comes from left area 0.15 — the reverse direction (the shortest 15%). |
| b | 对。\(4.2+1.0364(1.1)\approx5.34\)。Correct: \(4.2+1.0364(1.1)\approx5.34\). |
| c | 错。5.30 用的 \(z=1.00\) 是左侧 0.84 处的近似,且误把它当成 0.85 的精确值——查表应为 1.04。Wrong: 5.30 uses \(z=1.00\), which corresponds to left area 0.84, not 0.85 (Table A gives 1.04). |
| d | 错。1.04 是 \(z\) 值,无量纲,不是小时。Wrong: 1.04 is a unitless z-score, not hours. |
用标准正态表求 \(P(-1.25<Z<0.81)\)。已知 \(\Phi(-1.25)=0.1056\),\(\Phi(0.81)=0.7910\)。结果最接近
Use Table A to find \(P(-1.25<Z<0.81)\), given \(\Phi(-1.25)=0.1056\) and \(\Phi(0.81)=0.7910\). The result is closest to
- a0.68540.6854
- b0.89660.8966
- c0.31460.3146
- d0.20700.2070
- 画图确认要的是“中间那一块”Sketch the middle block \(-1.25\) 在左、\(0.81\) 在右,求夹在中间的面积,它不含两头尾部。\(-1.25\) is left, \(0.81\) is right; the target is the middle block, excluding both tails. 用大减小即可。So subtract: big minus small.
- 相减Subtract \(0.7910\) 包含了 \(-1.25\) 左边的 0.1056,减掉它剩下的就是中间。0.7910 already contains the 0.1056 on the far left; removing it leaves the middle. \[ 0.7910-0.1056=0.6854 \] 约 68.5%,与 68-95-99.7 的“68%”一致,说明答案合理。About 68.5%, consistent with the 68 of 68–95–99.7 — a good sanity check.
| 选项Option | 判断与理由Verdict & reason |
|---|---|
| a | 对。\(0.7910-0.1056=0.6854\)。Correct: \(0.7910-0.1056=0.6854\). |
| b | 错。0.8966 是两者相加,把两块左侧面积当成了互不重叠的部分。Wrong: 0.8966 is their sum, treating the two left areas as disjoint. |
| c | 错。0.3146 是两头尾部之和(\(0.1056+0.2090\)),求的是“之外”的面积。Wrong: 0.3146 is the two tails combined (\(0.1056+0.2090\)) — the complement. |
| d | 错。0.2070 与 0.81 的右尾 0.2090 接近,是“看错成右尾”的产物。Wrong: 0.2070 is close to the right tail 0.2090 — the result of reading the wrong tail. |
一位同学想说明“这组数据可用正态模型描述”。下列哪一条证据最有力且正确?
A student wants to justify using a Normal model. Which piece of evidence is both strongest and correct?
- a平均数与中位数相差较大the mean and median differ substantially
- b直方图右偏,长尾里有几个大值the histogram is right-skewed with a few large values
- c正态概率图上的点大致落在一条直线上,且约 68% 的观测位于 \(\bar x\pm s\) 之内the Normal probability plot is roughly a straight line and about 68% of observations lie within \(\bar x\pm s\)
- d样本量足够大(\(n>30\))the sample is large (\(n>30\))
- 排除“反证据”Eliminate the counter-evidence a 与 b 描述的正是非正态的典型特征:平均数被长尾拉开、直方图明显偏斜。(a) and (b) are symptoms of non-Normality: the mean pulled by a tail and a visibly skewed histogram. a、b 不能支持正态。(a) and (b) cannot support Normality.
- 拆穿“大样本”这个借口Dismiss “large sample” 样本再大也不会把偏斜的分布变正态;\(n>30\) 是抽样分布(第 19–20 讲)的条件,不是“数据本身正态”的条件。AP 最爱在这里设陷阱。No sample size turns a skewed distribution Normal; \(n>30\) belongs to the sampling distribution discussion (Lectures 19–20), not to “the data are Normal”. A favourite AP trap. d 错在概念偷换。(d) swaps two different conditions.
- 确认 c 的两个证据都成立Confirm both halves of c 概率图成直线是最灵敏的形状证据;而 68% 落在 \(\bar x\pm s\) 内是与 68-95-99.7 的实测对照,两者互补。A straight probability plot is the most sensitive shape check, and 68% within \(\bar x\pm s\) is the empirical 68–95–99.7 check; the two are complementary. c 是唯一正确的选项。(c) is the only correct choice.
| 选项Option | 判断与理由Verdict & reason |
|---|---|
| a | 错。均值与中位数差距大是偏斜的信号,恰恰反对正态。Wrong: a large mean–median gap signals skew and argues against Normality. |
| b | 错。右偏的直方图本身就是“不适合正态模型”的理由。Wrong: a right-skewed histogram is itself a reason not to use a Normal model. |
| c | 对。概率图成直线 + 实测 68% 与法则吻合,是最强的合法证据组合。Correct: a straight probability plot plus an empirical 68% matching the rule is the strongest legitimate combination. |
| d | 错。样本量与“分布形状是否正态”无关。Wrong: sample size says nothing about the shape of the distribution. |
本讲小结Summary
- 密度曲线是直方图的理想化模型:全程在横轴上方,曲线下总面积恰好为 1,区间面积 = 观测比例。
- 中位数是等面积点,平均数是平衡点;对称时重合,偏斜时平均数被拉向长尾。
- 均匀分布是矩形:高 \(1/(b-a)\),\(\mu=(a+b)/2\),\(\sigma=(b-a)/\sqrt{12}\),概率只需量长度。
- 正态分布 \(N(\mu,\sigma)\) 由 μ 与 σ 完全决定;拐点在 \(\mu\pm\sigma\);68-95-99.7 是它的经验法则。
- 标准化 \(z=(x-\mu)/\sigma\) 把任何正态问题变成标准正态问题;反向题用 \(x=\mu+z\sigma\) 或 invNorm。
- 连续变量单点概率为 0,面积永远用区间问;判断正态要看形状、均值与中位数、实测比例与正态概率图。
- A density curve is the idealised model of a histogram: above the axis, total area exactly 1, interval area = proportion.
- The median is the equal-areas point, the mean the balance point; they coincide when symmetric, and skew pulls the mean toward the long tail.
- A Uniform density is a rectangle: height \(1/(b-a)\), \(\mu=(a+b)/2\), \(\sigma=(b-a)/\sqrt{12}\); probability is just length.
- A Normal distribution \(N(\mu,\sigma)\) is fixed by μ and σ, with inflection points at \(\mu\pm\sigma\) and the 68–95–99.7 rule.
- Standardising with \(z=(x-\mu)/\sigma\) converts any Normal question into a standard-Normal one; go back with \(x=\mu+z\sigma\) or invNorm.
- A continuous variable has probability 0 at any single point — always ask about intervals; assess Normality from shape, mean vs median, empirical percents and a Normal probability plot.
散点图与相关系数Scatterplots and Correlation
前六讲都只盯一个变量:它的形状、中心、离散。可现实里的问题几乎都是两个变量一起出现——分数与学习时间、体重与背包重量、州 SAT 参与率与平均分。这一讲学会三件事:把两个变量画成一张散点图、用四个词描述它、用一个数 \(r\) 概括它的线性强度。最后一件事最关键:\(r\) 能说“多紧”,不能说“谁造成谁”。
Everything so far studied one variable at a time — shape, center, spread. Real questions come in pairs: score and study time, body weight and pack weight, a state's SAT participation rate and its mean score. This lecture does three things: draw the scatterplot, describe it with four words, and summarise its linear strength with one number \(r\). The last point matters most: \(r\) measures how tight, never who causes whom.
本讲学习目标Learning Objectives
- IDENTIFY 辨认解释变量(explanatory)与响应变量(response),并说明为什么这两个角色不能随便换。
- MAKE 绘制散点图:把每个个体画成一个点,解释变量放横轴,轴要标名称与刻度。
- DESCRIBE 描述一张散点图:方向、形状、强度,外加异常值、聚类、子群这些“不寻常之处”。
- INTERPRET 解释相关系数 \(r\):用“方向 + 强度 + 线性 + 语境”四件套写出一句完整的话。
- STATE 说出\(r\) 的性质:无量纲、对换 x/y 不变、加减常数不变、乘正常数不变、只测线性、对异常值敏感。
- USE 使用计算器求 \(r\),并先检查三个前提:两个变量都定量、够“直”、没有异常值主导。
- EXPLAIN 解释为什么“相关不等于因果”,以及什么情况下群体的相关系数会骗人(生态相关)。
- IDENTIFY the explanatory and response variables, and explain why the two roles cannot be swapped freely.
- MAKE a scatterplot: one point per individual, the explanatory variable on the horizontal axis, both axes labelled and scaled.
- DESCRIBE a scatterplot by direction, form and strength, plus unusual features — outliers, clusters and subgroups.
- INTERPRET the correlation \(r\) in context with a four-part sentence: direction, strength, linear, context.
- STATE the properties of \(r\): unitless, unchanged when x and y are swapped, unchanged by adding a constant, unchanged by multiplying by a positive constant, measures only linear association, and is not resistant to outliers.
- USE technology to compute \(r\) after checking the three conditions: two quantitative variables, straight enough, no outlier driving the result.
- EXPLAIN why association is not causation, and when a correlation computed from group averages can mislead (ecological correlation).
核心概念Core Concepts
7.1 两个变量:谁解释,谁被解释7.1 Two Variables: Who Explains, Who Is Explained
解释变量 \(x\) 负责“引起 / 帮忙解释”,响应变量 \(y\) 是被测量、被预测的结果。角色一旦定下来,横轴、斜率、预测方向就全定了。
The explanatory variable \(x\) helps explain or influence; the response variable \(y\) is the measured outcome. Once the roles are fixed, the axis, the slope and the direction of prediction are all fixed with them.
为什么非要分角色?因为“解释”这个词背后藏着一个方向:我们要问的是“当 \(x\) 改变时,\(y\) 会怎样”。如果两个变量只是被动地一起被观测,没有人为设定 \(x\),那么角色是否存在,取决于你打算怎么用这批数据。同一个数据集,换个提问方式,角色就换了——这正是 AP 常考的点:角色由研究目的决定,不由数据决定。
Why insist on roles? Because “explain” hides a direction: we ask “as \(x\) changes, what happens to \(y\)?”. When neither variable is set by the researcher and both are merely observed, whether roles exist depends on how the data will be used. The same data set can carry different roles under different questions — and that is exactly what AP tests: roles come from the research question, not from the data.
判定三问Three questions to assign roles
① 谁被设定 / 谁先发生?(剂量、年龄、体重 → 通常是 \(x\))② 谁是被测量的结果?(死亡数、成绩、销售额 → \(y\))③ 我想预测谁?被预测的那个是 \(y\)。
(1) Which is set or comes first? (dose, age, weight → usually \(x\)). (2) Which is the measured outcome? (deaths, score, sales → \(y\)). (3) Which do I want to predict? That one is \(y\).
一个真实的三连问One situation, three readings
SAT 阅读均分与数学均分:Julie 想“用阅读分预测数学分”→ 阅读是 \(x\);Jim 只想“看看两者有多相关”→ 不指定角色。数据一模一样,结论的措辞完全不同。
Mean SAT reading and math scores: Julie wants to predict math from reading → reading is \(x\). Jim merely asks how strongly they are related → no roles. Same data, different sentences.
相关系数把 \(x\) 与 \(y\) 完全对称地对待:交换两者,\(r\) 不变。所以“角色”在画图与解释时重要,在算 \(r\) 时不重要。第 8 讲的回归线就不同了——交换 \(x\) 与 \(y\) 会得到另一条线。这是两讲之间最关键的一处对照。
Correlation treats \(x\) and \(y\) symmetrically: swap them and \(r\) is unchanged. So roles matter for drawing and interpreting, not for computing \(r\). Regression in Lecture 8 is different — swapping \(x\) and \(y\) gives a different line. This is the key contrast between the two lectures.
7.2 画散点图:一个个体一个点7.2 Making a Scatterplot: One Individual, One Point
散点图把同一个体的两个变量配成一对 \((x,y)\) 画成一个点。口诀:eXplanatory 放在 X 轴(两个词都以 X 开头);每个点只代表一个个体,绝不连线。
A scatterplot plots the two variables of the same individual as one point \((x,y)\). Mnemonic: the eXplanatory variable goes on the X-axis; each point is one individual, and points are never joined.
三步走:① 定轴(谁解释谁上横轴);② 标轴并定刻度(不标单位的图不给分);③ 逐点画。三个常见错误:把两个不同变量的点混在一张图里;把点连成折线(那变成时间序列图了);两轴刻度不一致导致形状被扭曲(例如 x 每格 1、y 每格 10,直线看着像陡坡)。
Three steps: (1) choose the axes (explanatory on the horizontal one); (2) label and scale both axes (an unlabelled graph earns nothing); (3) plot each pair. Three common errors: mixing two different variables into one cloud; joining the points into a line graph (that is a time-series plot); mismatched axis scales that distort the apparent steepness.
7.3 描述散点图:方向、形状、强度、不寻常之处7.3 Describing a Scatterplot: Direction, Form, Strength, Unusual Features
描述散点图就是回答四个问题:往哪走(方向)、像什么(形状)、多紧(强度)、有没有例外(异常值 / 聚类)。四句话说完,才准谈数字。
Describing a scatterplot means answering four questions: which way (direction), what shape (form), how tight (strength), any exceptions (outliers, clusters). Say all four before quoting any number.
措辞要固定:“There is a strong, positive, linear association between 场均得分 and 胜场数 for SEC teams.” 注意句子里必须有变量名与总体范围,否则只是一句空话。方向看整体趋势是上扬还是下降;形状看是一条直线、一条弯线,还是一团散云;强度看点偏离“想象中的那条线”有多远;最后一定要扫一眼有没有孤零零的点(outlier)、有没有明显分成两团(cluster / subgroup)——AP 题目里的“惊喜”常常就藏在这里。
Use a fixed sentence: “There is a strong, positive, linear association between points per game and wins for SEC teams.” The variable names and the population are part of the answer. Direction is the overall trend up or down; form is straight, curved, or shapeless cloud; strength is how far points stray from the imagined line; and always scan for isolated points (outliers) and visible clusters or subgroups — that is where AP hides the surprise.
7.4 相关系数 \(r\):把“紧不紧”变成一个数7.4 The Correlation \(r\): Turning Tightness into a Number
\(r\) 的做法是:把 \(x\) 与 \(y\) 各自标准化成 z 值,再把每一对的 z 乘积求平均。乘积为正的点贡献正相关,为负的贡献负相关,于是 \(r\) 被夹在 \(-1\) 与 \(1\) 之间。
\(r\) works by standardising both variables into z-scores and averaging the products of the paired z-scores. Pairs in the same quadrant contribute positive products, opposite quadrants negative ones, which confines \(r\) to between \(-1\) and \(1\).
为什么一定要先标准化?因为如果不标准化,直接乘偏差,结果的单位会是“分 × 场”,而且把数据从“米”换成“厘米”就会让这个数变大一千倍——但关系根本没变。除以各自的标准差就消掉了单位,并且顺带把“点的分散程度”也归一化了。所以 \(r\) 没有单位,这也是它比协方差好用的唯一原因。
Why standardise first? Without it, multiplying raw deviations gives units like “points × wins”, and changing metres to centimetres would multiply the number by a thousand while the relationship is untouched. Dividing by each standard deviation removes the units and normalises the spread at the same time. So \(r\) is unitless — the single reason it beats the covariance.
\(r\) 只认直线。下面这张图里 \(x\) 与 \(y\) 的关系强到可以精确预测(\(y\approx x^2\)),但 \(r\) 几乎为 0。所以正确说法是“没有线性关系”,而不是“没有关系”。这也是 AP 最爱设的选项陷阱。
\(r\) only sees straight lines. In the next figure the relationship is strong enough to predict \(y\) almost perfectly (\(y\approx x^2\)) yet \(r\) is nearly zero. The correct sentence is “no linear association”, never “no relationship”. A favourite AP distractor.
7.5 \(r\) 的性质清单与三个使用前提7.5 Properties of \(r\) and Its Three Conditions
\(r\) 有五条必须背下来的性质(无量纲、对换不变、加减不变、乘不变、对异常值不稳健),外加三个使用前提(定量、够直、无异常值主导)。少一条,答案就不合法。
Five properties to memorise (unitless, symmetric in x and y, unchanged by adding a constant, unchanged by multiplying by a positive constant, not resistant) plus three conditions for use (quantitative, straight enough, no outlier in charge). Miss one and the answer is invalid.
| 对数据做了什么What you do to the data | \(r\) 怎么变What happens to \(r\) | 为什么Why |
|---|---|---|
| 把 \(x\) 或 \(y\) 的单位改掉(cm → m)change units (cm → m) | 不变unchanged | 标准化已经消掉了单位standardising removed the units |
| 交换 \(x\) 与 \(y\)swap \(x\) and \(y\) | 不变unchanged | 乘积与顺序无关a product ignores order |
| 给所有 \(x\) 加 10(平移)add 10 to every \(x\) | 不变unchanged | \(z\) 值里减的是平均数,平移被抵消\(z\) subtracts the mean, so a shift cancels |
| 把所有 \(x\) 乘 2multiply every \(x\) by 2 | 不变unchanged | 分子分母同时放大numerator and denominator scale together |
| 把一个正常数乘到 \(x\) 上并乘以 −1multiply \(x\) by a negative constant | 变号sign flips | 方向整体反过来了the direction reverses |
| 删掉一个远离模式的点delete one point far off the pattern | 可能大幅变化may change a lot | \(r\) 不稳健(not resistant)\(r\) is not resistant |
三个前提(漏一个就白算)Three conditions
① 定量变量:两个变量都必须是数值,州名、性别、专业这类分类变量不能算 \(r\)。② 够直:先看散点图,弯曲的关系用 \(r\) 会低估。③ 无异常值主导:有远离模式的点,先说明它对 \(r\) 的影响,再决定要不要报告 \(r\)。
(1) Quantitative variables: both must be numeric; categorical variables like state, sex or major cannot enter \(r\). (2) Straight enough: look at the plot first; a curve makes \(r\) understate the relationship. (3) No outlier in charge: when a point sits off the pattern, describe its effect before reporting \(r\).
强弱词怎么说How to phrase strength
习惯上:\(|r|\ge0.9\) 很强,\(0.7\sim0.9\) 较强,\(0.5\sim0.7\) 中等,\(0.3\sim0.5\) 较弱,\(<0.3\) 很弱。AP 并不要求记住硬阈值,但要求你的措辞与图形一致——如果图上就一条紧密的斜线,说“弱”显然不对。
Convention: \(|r|\ge0.9\) very strong, \(0.7\text{–}0.9\) fairly strong, \(0.5\text{–}0.7\) moderate, \(0.3\text{–}0.5\) fairly weak, below 0.3 very weak. AP does not demand memorised cut-offs, but your words must match the graph.
LinReg → y = a + bx, r = 0.9531, r² = 0.9084
7.6 \(r\) 的三个“不等于”:因果、斜率、个体7.6 Three Things \(r\) Is Not: Cause, Slope, Individual
\(r\) 大 \(\ne\) 有因果;\(r\) 大 \(\ne\) 斜率大;群体算出的 \(r\) \(\ne\) 个体层面的事实。三条都属于“把数字读过头”的病。
A big \(r\) is not cause, not a big slope, and a group-level \(r\) is not a claim about individuals. All three are diseases of over-reading a number.
第一条:两个变量高度相关,可能有四种解释——\(x\) 引起 \(y\)、\(y\) 引起 \(x\)、第三个变量(潜伏变量同时影响 x 与 y、却未被测量或未被控制的第三个变量。它能让两个毫无因果关系的变量显示出很强的相关。A third variable that influences both x and y but is neither measured nor controlled; it can make two causally unrelated variables look strongly correlated.)同时影响两者、或者纯属巧合。观察数据自己分不清这四种,只有随机化实验才能锁定因果(第 10 讲)。 第二条:\(r\) 只看“点有多贴着线”,斜率看“线有多陡”。把 \(x\) 的单位放大十倍,斜率会变小十倍,\(r\) 一动不动——所以“\(r\) 大”绝不是“\(y\) 对 \(x\) 敏感”的意思。 第三条:生态相关(ecological correlation)——用群体平均值算出的相关。例如“各州人均巧克力消费量与诺贝尔奖人数高度正相关”,那是国家层面的数字;它既不说明“吃巧克力的人更容易得奖”,也常常比个体层面的相关更强。看到数据单位是“州 / 国家 / 学校平均”,就要立刻警惕。
First: a strong association has four possible explanations — \(x\) causes \(y\), \(y\) causes \(x\), a third lurking variableA third variable influencing both x and y that is neither measured nor controlled; it can create a strong association out of nothing.同时影响 x 与 y、却未被测量或控制的第三个变量,能让两个毫无因果关系的变量显示出强相关。 drives both, or coincidence. Observational data cannot separate these; only a randomised experiment can (Lecture 10). Second: \(r\) measures how tightly points hug a line, slope measures how steep the line is. Multiply \(x\) by ten and the slope shrinks tenfold while \(r\) does not move — so a large \(r\) never means “\(y\) is sensitive to \(x\)”. Third: an ecological correlation is computed from group averages. State-level chocolate consumption correlates with Nobel laureates, but that says nothing about individuals, and group correlations are usually stronger than individual ones. Whenever the unit of observation is a state, a country or a school average, be suspicious.
例题精讲Worked Examples
例 1 先分角色,再谈相关Example 1 Assign roles before talking correlation
- (a) 研究者主动设定剂量,再测量体温变化。设定的那个是 \(x\),被测量的结果是 \(y\)。这是最干净的因果型设计(虽然是动物实验)。 (a) The researcher sets the dose and then measures the temperature change. The set variable is \(x\); the measured outcome is \(y\). This is the cleanest causal design.
- (b) “用期中成绩预测期末成绩”——被预测的是期末,所以期末是 \(y\),期中是 \(x\)。注意:如果老师改口说“我想看两次考试谁更能反映学力”,那就没有角色了。 (b) “Predict the final from the midterm” makes the final the predicted \(y\) and the midterm \(x\). Note: if the teacher instead asks “which exam better reflects ability?”, there are no roles.
- (c) 两个都是被动观测,且都可能被“气温 / 季节”同时推高。严格说,如果只是想描述关系,可以不指定角色;若要谈“销量是否影响溺水”,就已经在偷偷假设因果了。 (c) Both are merely observed, and both are driven up by temperature and season. Strictly, if you only want to describe the association, no roles are needed; the moment you ask whether sales affect drownings, you have smuggled in causation.
例 2 描述一张有“惊喜”的散点图Example 2 Describing a scatterplot with surprises
- 方向:参与率越高,平均分越低 → 负关联。说清楚是哪两个变量之间的负关联,不要只说“负相关”。 Direction: higher participation goes with lower mean scores — negative association. Name both variables rather than saying “negatively correlated”.
- 形状与强度:它不是一条直线,而是向下弯的(参与率很低的州分数极高,参与率中等时下降很快,再往后趋于平缓);强度中等偏强,但不是线性意义上的“强”。 Form and strength: not straight but curving downward — very high scores where participation is tiny, a steep drop in the middle, then flattening. Moderately strong, but not “strong” in the linear sense.
- 不寻常之处:图中有两团明显的聚类(低参与率的一群与高参与率的一群),还有个别州落在整体模式之外。它们往往对应“这个州是否强制考试”之类的制度差异,比趋势本身更有信息量。 Unusual features: two visible clusters (low-participation states and high-participation states) plus a few states off the pattern. These usually reflect policy differences such as whether the test is required — often more informative than the trend.
- 所以:弯曲 + 聚类 + 异常值,三条前提里倒了两条。此时的 \(r\) 会低估这种强关系,还会把两团数据糊成一个数。正确做法是分别描述各团,或对 \(x\) 做变换后再看(第 8 讲之后会再遇到变换)。 So: curvature plus clusters knock out two of the three conditions. An \(r\) here would understate a strong relationship and blur two clusters into one number. Describe the clusters separately, or transform \(x\) before fitting (transformations return later).
例 3 把 \(r\) 读成一句人话Example 3 Reading \(r\) as a sentence
- (a) 四件套:强 + 正 + 线性 + 语境。写“场均得分与胜场数之间存在强的正线性关系”,不要写“\(r=0.953\) 说明 95.3% 的胜利来自得分”——\(r\) 不是百分比。 (a) Four parts: strong + positive + linear + context. Write “there is a strong, positive, linear association between points per game and wins”. Never “95.3% of wins come from scoring” — \(r\) is not a percentage.
- (b) 胜率 = 胜场 ÷ 常数(每队场次相同),属于“乘一个正常数”。\(z\) 值里分子分母同时缩放,抵消,所以 \(r\) 不变。 (b) Win percentage = wins ÷ a constant, i.e. multiplying by a positive constant. Both parts of the z-scale cancel, so \(r\) is unchanged. \[ r_{\text{new}}=r=0.953 \]
- (c) 全部乘 2 同理,不变。记住这条:\(r\) 对“单位的缩放与平移”完全免疫,它只认形状。 (c) Doubling every value is the same story: unchanged. \(r\) is immune to shifting and rescaling; it only sees shape. \[ r_{\text{new}}=r=0.953 \]
- (d) 不能。这 14 组数据是观测来的,没有随机分配“得分”。强相关可以有四种解释:得分多→赢球、赢球多→心态好所以得分多、球队实力同时推高两者、巧合。要谈因果必须做实验。 (d) No. These 14 pairs are observed; no one randomly assigned points. A strong association has four explanations: scoring causes winning, winning boosts scoring, team quality drives both, or coincidence. Causation needs an experiment.
随堂练习Check Your Understanding
先自己选,再点“查看解答”。每题都给出考点、逐步推理与错误选项诊断。 Choose first, then reveal. Each question comes with the tested idea, step-by-step reasoning and an option-by-option diagnosis.
某研究者收集了 50 个城市的人均收入与平均寿命,想用人均收入预测平均寿命。下列哪一句正确?
A researcher collects per-capita income and life expectancy for 50 cities and wants to predict life expectancy from income. Which statement is correct?
- a解释变量必须是被随机分配的那个,所以这里没有解释变量the explanatory variable must be randomly assigned, so there is none here
- b因为想用收入预测寿命,所以收入是解释变量、寿命是响应变量since income is used to predict life expectancy, income is explanatory and life expectancy is the response
- c若把两个变量交换,\(r\) 会变成原来的倒数swapping the two variables turns \(r\) into its reciprocal
- d由于这是观察性研究,\(r\) 无法计算because the study is observational, \(r\) cannot be computed
- 抓住“预测”这个词Catch the word “predict” 被预测的那个永远是响应变量 \(y\),用来预测的那个是解释变量 \(x\)。题目已经说清方向了。The predicted quantity is always the response \(y\); the predictor is \(x\). The question already fixes the direction. 收入 = \(x\),寿命 = \(y\)。Income = \(x\), life expectancy = \(y\).
- 排掉“必须随机分配”Rule out “random assignment” 随机分配是因果推断的要求(第 10 讲),不是画散点图或算 \(r\) 的要求。观察性数据照样可以算 \(r\),只是不能谈因果。Random assignment is required for causal inference (Lecture 10), not for scatterplots or \(r\). Observational data can still produce an \(r\) — just no causal claim. a、d 都错。(a) and (d) are wrong.
- 排掉“倒数”Rule out “reciprocal” 交换 \(x\)、\(y\) 后 \(r\) 完全不变(既不是倒数也不是相反数)。Swapping \(x\) and \(y\) leaves \(r\) exactly the same — not a reciprocal, not a sign change. c 错,b 对。(c) is wrong; (b) is correct.
| 选项Option | 判断与理由Verdict & reason |
|---|---|
| a | 错。角色是描述 / 预测用的分工,与是否随机分配无关。Wrong: roles describe how variables are used, independent of random assignment. |
| b | 对。被预测者是 \(y\),预测者是 \(x\)。Correct: the predicted variable is \(y\), the predictor is \(x\). |
| c | 错。\(r\) 对称,交换后不变。Wrong: \(r\) is symmetric, so swapping changes nothing. |
| d | 错。\(r\) 是描述性统计量,观察数据完全可以算,只是不能作因果结论。Wrong: \(r\) is descriptive and computable from observational data; only causal claims are off the table. |
回到本讲第一张图:14 支 SEC 球队的场均得分与胜场数。下列哪一句最完整地描述了这张图?
Back to the first figure in this lecture: points per game and wins for 14 SEC teams. Which sentence describes it best?
- a强的正线性关联,没有明显的异常值a strong, positive, linear association with no obvious outliers
- b强的负线性关联,有两个异常值a strong, negative, linear association with two outliers
- c弱正关联,因为得分并不能决定胜负a weak positive association, because scoring does not decide wins
- d无法描述,除非先算出 \(r\)it cannot be described until \(r\) is computed
- 方向:点往右上走Direction: points climb to the right 场均得分高的球队胜场也多,两条均值线以上 / 以下的点各自成团。High-scoring teams also win more; the points above and below the mean lines form the expected quadrants. 正关联,b 的方向就错了。Positive, so (b)'s direction is wrong.
- 形状与强度:一条紧密的斜带Form and strength: a tight slanted band 点几乎排成一条直线,离想象中的线都很近,所以“强 + 线性”。The points nearly form a line and hug it, so “strong and linear”. c 说“弱”是错的。(c)'s “weak” is wrong.
- 异常值:扫一眼有没有孤单的点Outliers: look for isolated points 14 个点都在带子里,没有远离模式的个体。All 14 points sit inside the band; none departs from the pattern. a 最完整。(a) is the most complete.
| 选项Option | 判断与理由Verdict & reason |
|---|---|
| a | 对。方向、形状、强度、异常四项齐全,与图一致。Correct: all four features, all consistent with the plot. |
| b | 错。方向说反了,而且图里没有两个异常值。Wrong: direction reversed and no two outliers exist. |
| c | 错。强度看图,不看“因果叙事”;图上点很紧。Wrong: strength is read from the plot, not from a causal story; the points are tight. |
| d | 错。顺序反了:先看图描述,再算 \(r\) 作为补充。Wrong: order reversed — describe first, compute \(r\) as a supplement. |
一组数据的相关系数为 \(r=0.62\)。若把 \(x\) 的单位从“千克”改成“克”(数值乘 1000),\(y\) 不变,则新的相关系数是
A data set has \(r=0.62\). If \(x\) is converted from kilograms to grams (values multiplied by 1000) and \(y\) is unchanged, the new correlation is
- a620620
- b0.620.62
- c0.000620.00062
- d不能确定,要看数据cannot be determined without the data
- 看 \(r\) 的构成Look inside \(r\) \(r\) 由两个 z 值相乘取平均。\(x\) 乘 1000 后,\((x_i-\bar x)\) 与 \(s_x\) 同时乘 1000,比值不变。\(r\) averages products of two z-scores. Multiplying \(x\) by 1000 scales both \((x_i-\bar x)\) and \(s_x\), so the ratio is unchanged. \[ \frac{1000(x_i-\bar x)}{1000 s_x}=\frac{x_i-\bar x}{s_x} \] 每个 \(z_x\) 都没变,所以 \(r\) 不变。Every \(z_x\) is unchanged, hence so is \(r\).
- 对照“会变”的情形Contrast the case that does change 若把 \(x\) 乘 −1(方向反了),每个 \(z_x\) 变号,于是 \(r\) 变成 \(-0.62\)。AP 常用这一点考“变号还是不变”。Multiply \(x\) by −1 and every \(z_x\) flips, so \(r\) becomes \(-0.62\). AP loves testing “sign flip or no change”. 乘正数不变,乘负数变号。Positive constant: no change. Negative constant: sign flip.
| 选项Option | 判断与理由Verdict & reason |
|---|---|
| a | 错。把 \(r\) 当成了协方差——协方差才会随单位变。Wrong: treats \(r\) as a covariance, which does scale with units. |
| b | 对。标准化已消除单位,\(r\) 不变。Correct: standardising removed the units, so \(r\) is unchanged. |
| c | 错。把“缩放”误当成“除以”,方向搞反了,且 \(r\) 本来就不该变。Wrong: misreads scaling as dividing; \(r\) should not change at all. |
| d | 错。这是 \(r\) 的一条确定性性质,不需要原始数据。Wrong: this is a guaranteed property of \(r\), no data needed. |
10 个点紧密地沿一条正斜率的直线排列,\(r=0.98\)。现在加入第 11 个点:它的 \(x\) 远大于其他点,而 \(y\) 明显低于该处的趋势线。新的 \(r\) 最可能是
Ten points lie tightly along a line with positive slope, \(r=0.98\). An eleventh point is added: its \(x\) is far to the right and its \(y\) is well below the trend. The new \(r\) is most likely
- a0.99,因为多一个点更稳定0.99, because one more point adds stability
- b0.98,\(r\) 不受单个点影响0.98, since \(r\) is unaffected by a single point
- c大约 0.6,明显下降about 0.6, a clear drop
- d−0.98,正好变号−0.98, the sign flips exactly
- 先看这个点在哪Locate the point 它在右侧很远、下方 —— 属于“右下”象限,对乘积的贡献是负的,而且因为 \(x\) 的 z 值很大,这一项的权重特别大。Far right and low: a lower-right quadrant point, contributing a negative product — and because its \(z_x\) is large, its weight is large. \(r\) 会被明显拉低。\(r\) is pulled down substantially.
- 量级判断Size of the effect 原来 10 个点几乎共线,平均下来每项贡献都接近 +1;新点贡献接近 −1,但被 11 除,于是 \(r\) 从“接近 1”掉到“中等”(约 0.5–0.7)。Ten nearly collinear points each contribute about +1; the new point contributes about −1 but is divided by 11, so \(r\) falls from near 1 to moderate (roughly 0.5–0.7). c 最合理。(c) is the sensible choice.
- 顺带记住两件事Two lessons ① 删除点之前必须先解释它为什么在那里(记录错误?不同群体?),不能因为“影响结论”就删。② 报告 \(r\) 时若图上有异常值,应同时说明“含 / 不含该点”的 \(r\)。(1) Never delete a point merely because it changes the conclusion — explain it first (recording error? a different group?). (2) Report \(r\) with and without a suspect point. 这才是 AP 想听的“稳健性讨论”。That is the robustness discussion AP rewards.
| 选项Option | 判断与理由Verdict & reason |
|---|---|
| a | 错。多一点不一定更稳;这个点是“反方向”的。Wrong: more points are not automatically more stable, and this one pulls the other way. |
| b | 错。\(r\) 不稳健,恰是“一个点能改变很多”的统计量。Wrong: \(r\) is not resistant — one point can move it a lot. |
| c | 对。强正相关被一个远离趋势的点拉低为中等。Correct: a strong positive association becomes moderate once an off-trend far point enters. |
| d | 错。变号需要“整体方向反过来”,一个点不够;直觉上图仍以正向为主。Wrong: flipping the sign needs the whole pattern reversed; one point is not enough. |
一份基于 50 个州的数据显示:各州“参加 SAT 的学生百分比”与该州“SAT 数学平均分”的相关系数为 \(-0.85\)。下列哪一项是有依据的结论?
Using data on 50 states, the correlation between a state's percent of students taking the SAT and its mean SAT math score is \(-0.85\). Which conclusion is justified?
- a参加 SAT 会让学生考得更低taking the SAT lowers a student's score
- b这是群体层面(生态)的相关,不能直接推出个人层面的因果结论this is a group-level (ecological) correlation; it does not support an individual-level causal claim
- c因为 \(r<0\),说明两个变量没有关系since \(r<0\), the two variables are unrelated
- d\(r=-0.85\) 说明 85% 的分数差异由参与率造成\(r=-0.85\) means 85% of score variation is caused by participation
- 先拆“谁和谁”的相关Ask what is being correlated 每个点代表一个州,两个变量都是州的百分比 / 州平均分。所以这是州与州之间的关系。Each point is a state; both variables are state-level. So the association is between states. a 把群体关系直接搬到个人,越界了。(a) transports a group relation onto individuals — invalid.
- 找出潜伏变量Name the lurking variable 参与率高的州往往是“所有人都必须考”的州(学生整体水平更分散、平均分自然低);参与率低的州常常只有尖子生报考。真正在背后起作用的是“谁被要求参加考试”这个制度变量。High-participation states often require everyone to sit the test, pulling the mean down; low-participation states send only strong applicants. The lurking variable is who is required to take the test. 这既是生态相关,也是混杂的经典案例。Ecological and confounded at once.
- 纠正 c 与 dFix c and d \(r=-0.85\) 是很强的负关系,不是“无关系”;而“85% 由谁造成”要用 \(r^2=0.72\) 来说,且必须说成“被解释的变异比例”,不能说“造成”。\(r=-0.85\) is a strong negative association, not “no relation”; the “85%” idea needs \(r^2=0.72\) and even then it is “variation accounted for”, never “caused”. 只有 b 站得住。Only (b) survives.
| 选项Option | 判断与理由Verdict & reason |
|---|---|
| a | 错。观察数据 + 群体层面,双重越界;且方向可能是潜伏变量造成的。Wrong: observational and group-level — a double overreach, and a lurking variable may drive it. |
| b | 对。生态相关只能描述群体,不能推出个人因果。Correct: an ecological correlation describes groups and supports no individual-level causal claim. |
| c | 错。负号是方向,不表示“没关系”;\(|r|=0.85\) 相当强。Wrong: the negative sign is direction; \(|r|=0.85\) is strong. |
| d | 错。混淆了 \(r\) 与 \(r^2\),还用了“造成”这种因果措辞。Wrong: confuses \(r\) with \(r^2\) and uses causal language. |
本讲小结Summary
- 解释变量 \(x\)帮忙解释或影响,响应变量 \(y\)是被测量的结果;角色由研究问题决定,与是否随机分配无关。
- 散点图:一个个体一个点,解释变量放横轴,标名称与刻度,绝不连线。
- 描述四要素:方向、形状、强度,外加异常值 / 聚类 / 子群。
- \(r\) 是标准化后 z 乘积的平均,范围 \([-1,1]\),无量纲;它只测线性强度,不测“有没有关系”。
- 性质:换单位不变、交换 \(x/y\) 不变、加减常数不变、乘正常数不变(乘负数变号);不稳健。
- 相关 ≠ 因果;\(r\) 大 ≠ 斜率大;群体平均算出的生态相关不能推及个人。
- The explanatory variable \(x\) helps explain or influence; the response \(y\) is the measured outcome. Roles follow the research question, not random assignment.
- Scatterplot: one point per individual, explanatory variable on the horizontal axis, axes labelled and scaled, points never joined.
- Describe with four features: direction, form, strength, plus outliers / clusters / subgroups.
- \(r\) is the average product of standardised pairs, lies in \([-1,1]\), has no units, and measures only linear strength — not whether a relationship exists.
- Properties: unchanged by units, by swapping \(x\) and \(y\), by adding a constant, by a positive multiplier (negatives flip the sign); not resistant to outliers.
- Correlation is not causation; a large \(r\) is not a large slope; and an ecological correlation from group averages says nothing about individuals.
最小二乘回归Least-Squares Regression
第 7 讲的 \(r\) 只说“有一团点沿直线排得挺紧”,却不告诉你是哪条直线、怎么用它做预测。这一讲补上这条线:\(\hat y=b_0+b_1x\)。它由“让残差平方和最小”唯一确定,因此能写成一个漂亮公式;而它的诊断工具——残差图、\(s\)、\(r^2\)——正是后面所有回归题的主角。
Lecture 7's \(r\) said only “these points hug a line”, never which line or how to use it. This lecture supplies the line: \(\hat y=b_0+b_1x\), uniquely fixed by making the sum of squared residuals as small as possible — which is why it has a clean formula. Its diagnostic tools — the residual plot, \(s\) and \(r^2\) — carry every later regression question.
本讲学习目标Learning Objectives
- INTERPRET 解释回归线:斜率是“\(x\) 每增加 1 单位,预测的 \(y\) 变化多少”,截距是“\(x=0\) 时的预测值”。
- CALCULATE 计算最小二乘直线:\(b_1=r\,s_y/s_x\),\(b_0=\bar y-b_1\bar x\),并知道它一定经过 \((\bar x,\bar y)\)。
- CALCULATE 计算并解释残差 \(e=y-\hat y\):正残差表示实际值高于预测(低估),负残差表示高估。
- CONSTRUCT & INTERPRET 构造并解释残差图:无模式 \(\Rightarrow\) 线性模型合适;出现弯曲 \(\Rightarrow\) 线性不合适。
- DETERMINE 判断拟合得多好:残差标准差 \(s\) 是“典型的预测误差大小”,\(r^2\) 是“\(y\) 的变异中被直线解释的比例”。
- INTERPRET 读懂计算器 / 软件回归输出(Coef、s、R-Sq),并能指出外推的危险与强影响点。
- INTERPRET a regression line: the slope is the predicted change in \(y\) per one-unit increase in \(x\); the intercept is the predicted \(y\) when \(x=0\).
- CALCULATE the least-squares line with \(b_1=r\,s_y/s_x\) and \(b_0=\bar y-b_1\bar x\), knowing it always passes through \((\bar x,\bar y)\).
- CALCULATE and interpret residuals \(e=y-\hat y\): positive means the actual value is above the prediction (underestimate); negative means overestimate.
- CONSTRUCT and INTERPRET residual plots: no pattern \(\Rightarrow\) the linear model is appropriate; curvature \(\Rightarrow\) it is not.
- DETERMINE how well the line fits: the residual standard deviation \(s\) is a typical prediction error, and \(r^2\) is the fraction of variation in \(y\) explained by the line.
- INTERPRET computer regression output (Coef, s, R-Sq), and recognise the dangers of extrapolation and influential points.
核心概念Core Concepts
8.1 从“有关系”到“能预测”:回归线是什么8.1 From “Related” to “Predictable”: What a Regression Line Is
回归线是一条模型:给一个 \(x\),它吐出一个预测值 \(\hat y=b_0+b_1x\)。\(\hat y\) 头上的帽子不是装饰——它在提醒你,这是模型的输出,不是数据的真值。
A regression line is a model: feed it an \(x\), it returns a predicted value \(\hat y=b_0+b_1x\). The hat is not decoration — it marks a model output, not an observed truth.
为什么要“模型”而不是“把点连起来”?因为模型把一堆点压缩成两个数(\(b_0\) 与 \(b_1\)),于是你能对没观测过的 \(x\) 做预测,也能对“变化率”说一句定量的话。这和前一讲的正态曲线是同一个思路:用光滑的对象概括数据的整体模式。不同的是,正态曲线描述一个变量的分布,回归线描述两个变量的关系。
Why a model rather than joining the dots? Because a model compresses a cloud into two numbers (\(b_0\) and \(b_1\)), so you can predict at \(x\)-values you never observed and state a rate of change quantitatively. This is the same idea as the Normal curve in Lecture 6: summarise the overall pattern with a smooth object. The difference is that a density curve describes one variable while a regression line describes the relationship between two.
斜率的标准句式:“For each additional [1 单位 x], the predicted [y] increases/decreases by [\(b_1\)] [y 的单位].” 截距的标准句式:“When [x = 0], the predicted [y] is [\(b_0\)].” 少了 “predicted”,就等于宣称模型百分百准确——这是 AP 最常见的扣分点之一。另外,截距常常没有实际意义(例如“新生儿 0 个月大时身高”),此时要说明“它只是让直线落位的锚点”。
Slope, standard sentence: “For each additional [one unit of x], the predicted [y] increases/decreases by [\(b_1\)] [units of y].” Intercept, standard sentence: “When [x = 0], the predicted [y] is [\(b_0\)].” Drop “predicted” and you have claimed a perfect model — one of the most common lost points. Also, the intercept often has no meaningful context (height at age 0 months); say then that it merely anchors the line.
8.2 最小二乘:为什么惩罚“平方”而不是“绝对值”8.2 Least Squares: Why Square the Misses?
残差 \(e=y-\hat y\) 有正有负,直接相加会互相抵消(而且总和恒为 0,毫无信息)。于是我们把它们平方再相加,选那条使 \(\sum e_i^2\) 最小的直线——这就是“最小二乘”。
Residuals \(e=y-\hat y\) come with both signs, so adding them cancels out — the total is always 0 and carries no information. So we square them, add, and choose the line that minimises \(\sum e_i^2\): that is least squares.
平方有两个后果,都要知道:① 大残差被罚得更狠(残差 4 罚 16,残差 2 只罚 4),所以最小二乘对离群点特别敏感;② 平方与绝对值的差别,使得最优解有唯一的公式(若用绝对值,就没有初等闭式解)。这也解释了为什么“删掉一个点,直线可能大幅转动”——8.6 节会正式处理这件事。
Squaring has two consequences worth knowing. (1) Large residuals are punished disproportionately (a miss of 4 costs 16, a miss of 2 costs only 4), so least squares is acutely sensitive to outlying points. (2) Squaring instead of taking absolute values yields a closed-form optimum; absolute deviations would not. That is also why “delete one point and the line can swing” — the subject of 8.6.
还有一个必须记住的性质:最小二乘直线的残差之和恒为 0(\(\sum e_i=0\)),因此残差的平均数是 0。它等价于“直线穿过 \((\bar x,\bar y)\)”。所以看图时别指望残差整体偏高或偏低——一旦整体偏移,就说明那条线根本不是最小二乘线。
One property to memorise: the residuals of a least-squares line always sum to 0 (\(\sum e_i=0\)), so their mean is 0. Equivalently, the line passes through \((\bar x,\bar y)\). Never expect the residual plot to sit systematically above or below zero; if it does, the line is not a least-squares line.
下面这个三维模型把同一批点与残差抬到空间里:散点在水平面上,红线是拟合直线,每根竖线就是从点到直线的残差。拖动旋转,你会发现“最小二乘”其实是在找一根“总竖线长度(平方后)最短”的杆子——这也解释了为什么远离中心的点在 \(x\) 方向上一挪,整根杆就会歪得厉害。
The 3D model lifts the same points and residuals into space: the dots sit on the floor, the red line is the fit, and every vertical segment is one point's residual. Drag to rotate and you can see least squares as choosing the rod that minimises the total squared vertical length — which also explains why moving a far-out point sideways tilts the whole rod.
8.3 公式与“必过点”:不用逐个试线也能写出方程8.3 The Formula and the “Must-Pass Point”
斜率不等于 \(y\) 对 \(x\) 的“平均变化”,而是\(b_1=r\,\dfrac{s_y}{s_x}\):相关越强、\(y\) 越波动、\(x\) 越集中,线就越陡。截距由“必过 \((\bar x,\bar y)\)”反解:\(b_0=\bar y-b_1\bar x\)。
The slope is \(b_1=r\,\dfrac{s_y}{s_x}\) — steeper when the association is stronger, when \(y\) varies more, or when \(x\) varies less. The intercept follows from “must pass through \((\bar x,\bar y)\)”: \(b_0=\bar y-b_1\bar x\).
这个公式有两个非常实用的推论。第一,斜率与 \(r\) 同号:\(r>0\) 斜率正,\(r<0\) 斜率负——所以“相关方向”和“预测方向”永远一致。第二,斜率与单位有关,\(r\) 与单位无关:把 \(x\) 的单位放大 10 倍,\(s_x\) 也放大 10 倍,斜率缩小 10 倍,而 \(r\) 一动不动。这正是第 7 讲“\(r\) 大 \(\ne\) 斜率大”的数学根据。
Two useful corollaries. First, the slope has the same sign as \(r\): positive \(r\), positive slope — the direction of association and of prediction always agree. Second, the slope depends on units while \(r\) does not: multiply the \(x\)-units by 10 and \(s_x\) scales by 10, so the slope shrinks by 10 while \(r\) is untouched. That is the algebra behind Lecture 7's “a big \(r\) is not a big slope”.
8.4 残差图:线性到底合不合适8.4 Residual Plots: Is a Line Appropriate at All?
残差图把“模型没解释的部分”单独拎出来看:横轴是 \(x\)(或 \(\hat y\)),纵轴是残差。理想状态是一团没有模式的云;一旦出现弯曲或喇叭口,就说明直线不够用。
A residual plot isolates what the model failed to explain: \(x\) (or \(\hat y\)) on the horizontal axis, residuals on the vertical. The ideal is a patternless cloud; curvature or a fan shape means a straight line is not enough.
为什么残差图比原始散点图好?因为原始图上的“弯曲”常常被整体的上升趋势盖住,你很难看出 \(0.3\) 厘米的弧度;而残差图把趋势减掉了,只剩下偏差,弯曲立刻被放大。读图口诀三条:有模式 \(\Rightarrow\) 线性不合适;有喇叭形 \(\Rightarrow\) 离散程度随 \(x\) 变(严格来说违反等方差,AP 只要求你看出“越往右越散”);有单个远离点 \(\Rightarrow\) 它可能是异常值,也可能是记录错误。反过来,如果残差图没有明显模式、残差也都差不多大小,就说明“用直线描述是合适的”。
Why is a residual plot better than the original scatterplot? Because a gentle curve is hidden under the overall upward trend; the residual plot subtracts the trend and leaves only the deviations, so curvature is magnified. Three reading rules: a pattern \(\Rightarrow\) the linear model is not appropriate; a fan shape \(\Rightarrow\) the spread changes with \(x\) (unequal variance); one far-off point \(\Rightarrow\) possible outlier or recording error. If there is no obvious pattern and the residuals are of similar size, the straight-line model is appropriate.
残差图只检验线性是否够用这一件事。它无模式,可能仍有:很大的 \(s\)(预测误差大)、很低的 \(r^2\)(解释得少)、外推造成的荒唐预测、以及记录错误造成的隐藏异常值。所以完整的回答要同时提到线性是否合适与拟合有多好——前者看残差图,后者看 \(s\) 与 \(r^2\)。
A residual plot tests one thing only: whether a line is adequate. No pattern can still coexist with a large \(s\) (big prediction errors), a small \(r^2\) (little explained), absurd extrapolations, or a hidden recording error. A complete answer therefore addresses both is the form right (residual plot) and how good is the fit (\(s\) and \(r^2\)).
8.5 \(s\) 与 \(r^2\):一个说误差多大,一个说解释多少8.5 \(s\) and \(r^2\): One Measures Error, One Measures Explanation
\(s\)(残差标准差)是“典型的预测误差有多大”,单位与 \(y\) 相同;\(r^2\)(决定系数)是“\(y\) 的变异中被这条直线解释的比例”,是无量纲的百分数。两个都要会解释。
\(s\) (the residual standard deviation) is a typical prediction error, in the units of \(y\); \(r^2\) (the coefficient of determination) is the fraction of the variation in \(y\) accounted for by the line, and is a unitless proportion. You must interpret both.
解释 \(s\) 的一句话One sentence for \(s\)
“用 \(x\) 预测 \(y\) 时,我们通常会偏离约 \(s\) 个单位。”(英文:“When using the least-squares line to predict \(y\) from \(x\), we typically mispredict by about \(s\) units.”)
“When using the least-squares line to predict \(y\) from \(x\), we typically mispredict by about \(s\) units.” No percentage, no “explained” — just the size of a typical miss.
解释 \(r^2\) 的一句话One sentence for \(r^2\)
“\(y\) 的变异中约 \(r^2\times100\%\) 可以由 \(x\) 的线性模型解释。”(英文:“About \(r^2\times100\%\) of the variation in \(y\) is accounted for by the linear model with \(x\).”)注意“变异”和“解释”两个词都不能换成“准确率”或“造成”。
“About \(r^2\times100\%\) of the variation in \(y\) is accounted for by the linear model with \(x\).” Neither “variation” nor “accounted for” may be replaced by “accuracy” or “caused”.
| 你可能看到的问题The question you may see | 用 \(s\) 还是 \(r^2\)?Use \(s\) or \(r^2\)? |
|---|---|
| “预测会有多大误差?”“How large is a typical prediction error?” | \(s\),单位与 \(y\) 相同\(s\), in the units of \(y\) |
| “这条线解释了 \(y\) 多少变化?”“How much of \(y\)'s variation is explained?” | \(r^2\),比例 / 百分数\(r^2\), a proportion or percent |
| “相关有多强?”“How strong is the association?” | \(r\)(只在线性合适时才报)\(r\) (only when the form really is linear) |
| “线性模型合适吗?”“Is a linear model appropriate?” | 残差图,不能只看 \(r^2\)the residual plot — never \(r^2\) alone |
8.6 异常值、高杠杆点、强影响点与外推8.6 Outliers, High Leverage, Influential Points and Extrapolation
三个词别混:异常值是“残差大”(垂直方向远),高杠杆点是“\(x\) 极端”(水平方向远),强影响点是“删掉它,直线明显变”。高杠杆 + 乖离 = 强影响。
Three distinct words: an outlier has a large residual (far vertically), a high-leverage point has an extreme \(x\) (far horizontally), and an influential point is one whose removal visibly changes the line. High leverage plus a miss usually equals influence.
怎么判断How to judge
Outlier:看残差大小(在残差图里垂直偏离)。High leverage:看 \(x\) 是否远离其他 \(x\) 的中心。Influential:分别“含 / 不含该点”拟合两次,比较斜率、截距、\(r^2\) 的变化。不能只凭一个特征就下结论。
Outlier: look at residual size. High leverage: look at how far \(x\) sits from the other \(x\)-values. Influential: fit twice, with and without, and compare slope, intercept and \(r^2\). No single feature settles it.
外推(extrapolation)为什么危险Why extrapolation is dangerous
直线只在观测到的 \(x\) 范围内有证据支持。把儿童年龄回归线用到 20 岁,会得到“身高 104 英寸”——模型没有错,是问错了问题。判断依据:新的 \(x\) 是否远在该数据集的 \(x\) 范围内。
A line is supported only within the observed range of \(x\). Applying a children's age–height line at age 20 predicts 104 inches: the model is not wrong, the question is. Test: is the new \(x\) far outside the range of the data?
y = a + bx → a = 3.4964, b = −0.00340, r² = 0.6806, r = −0.8250
例题精讲Worked Examples
例 1 把一条回归线彻底讲清楚Example 1 Explaining a regression line completely
- (a) 斜率 −0.0034:每多 1 卡的 NEA,预测的脂肪增加减少 0.0034 kg。截距 3.50:若 NEA 完全不变(\(x=0\)),预测的脂肪增加是 3.50 kg——正是“坐着不动地过度进食”的基线。 (a) Slope −0.0034: each additional calorie of NEA predicts 0.0034 kg less fat gain. Intercept 3.50: if NEA does not change at all (\(x=0\)), the predicted gain is 3.50 kg — the baseline of overeating without moving.
- (b) 代入 \(x=400\)。注意别写成“400 卡增长”,单位是卡。 (b) Substitute \(x=400\); keep the units straight. \[ \hat y=3.50-0.0034(400)=3.50-1.36=2.14\ \text{kg} \]
- (c) 残差 = 实际 − 预测。先算预测值,再相减;正残差 = 实际比预测高 = 模型低估。 (c) Residual = observed − predicted. Compute the prediction first; positive means the actual exceeds the prediction, i.e. the model underestimated. \[ \hat y=3.50-0.0034(392)=2.17,\qquad e=3.8-2.17=+1.63\ \text{kg} \]
- (d) \(s=0.62\) kg:用这条线预测脂肪增加时,通常会偏离约 0.62 kg。\(r^2=0.68\):脂肪增加量的变异中约 68% 可由 NEA 的线性模型解释,剩下的 32% 来自个体差异等其他因素。 (d) \(s=0.62\) kg: predictions typically miss by about 0.62 kg. \(r^2=0.68\): about 68% of the variation in fat gain is accounted for by the linear model with NEA; the other 32% reflects individual variation.
例 2 从计算机输出读出一条回归线Example 2 Reading a regression line off computer output
- (a) Coef 列就是系数:Constant 是 \(b_0\),Years 是 \(b_1\)。先写方程再解释。 (a) The Coef column gives the coefficients: Constant is \(b_0\), Years is \(b_1\). Write the equation before interpreting. \[ \widehat{\text{magazines}}=13549.9+325.39\,(\text{years since 1988}) \] 斜率:“每过一年,预测的杂志种数增加约 325 种。”
- (b) 截距:“在 1988 年(年数 = 0),预测的杂志种数为约 13550 种。” 这里截距有实际意义,因为 \(x=0\) 就在数据范围内(1988 年是第一个观测年)。 (b) Intercept: “In 1988 (0 years since 1988), the predicted count is about 13 550.” Here the intercept is meaningful, because \(x=0\) lies inside the data range.
- (c) 1999 年 → \(x=1999-1988=11\)。代入。若直接代 1999 会得到天文数字,这是最常见的错。 (c) 1999 means \(x=11\). Substituting 1999 itself gives an astronomical number — the most common slip. \[ \hat y=13549.9+325.39(11)=17129.2\ \text{种}\approx 17\,129 \]
- (d) \(r^2=0.848\),所以 \(|r|=\sqrt{0.848}=0.921\);斜率正 \(\Rightarrow\) \(r\) 正号。 (d) \(r^2=0.848\), so \(|r|=\sqrt{0.848}=0.921\); a positive slope gives a positive \(r\). \[ r=+\sqrt{0.848}=0.921 \] 解释:“年份与杂志种数之间有强正线性关系。”
例 3 外推:模型没错,是问题错了Example 3 Extrapolation: the model is fine, the question is not
- (a) 先算 \(\bar x=62.7\) 个月、\(\bar y=41.9\) 英寸、\(r=0.994\)、\(s_x=38.9\)、\(s_y=13.4\),再用 \(b_1=r\,s_y/s_x\)。 (a) First \(\bar x=62.7\) months, \(\bar y=41.9\) in, \(r=0.994\), \(s_x=38.9\), \(s_y=13.4\), then \(b_1=r\,s_y/s_x\). \[ b_1=0.994\times\frac{13.4}{38.9}=0.342,\qquad b_0=41.9-0.342(62.7)=20.4 \]
- (b) 斜率:“每大 1 个月,预测的身高增加约 0.34 英寸。” 截距:“0 个月大(新生儿)时,预测身高约 20.4 英寸。” 这是一个“虽在 \(x=0\) 但几乎合理”的截距——所以可以解释。 (b) Slope: “each additional month predicts about 0.34 in more height.” Intercept: “at 0 months, predicted height is about 20.4 in.” Here the intercept is interpretable (a newborn's length).
- (c) 54 在数据范围(16–120)之内,属于内插,可信。 (c) 54 lies inside the observed range 16–120, so this is interpolation and is trustworthy. \[ \hat y=20.4+0.342(54)\approx 38.9\ \text{in} \]
- (d) 20.4 岁 = 244.8 个月,远远超出 120 个月。代入得 104.2 英寸(约 2.6 米),显然荒唐。模型并没有“算错”,是我们把它用到了没有证据的地方。 (d) 20.4 years is 244.8 months, far beyond 120. Substitution gives 104.2 in (about 2.6 m) — absurd. The model did not miscompute; we used it where there is no evidence. \[ \hat y=20.4+0.342(244.8)=104.2\ \text{in} \]
随堂练习Check Your Understanding
先自己算,再点“查看解答”。四道计算题都来自真实考点,最后一道是概念辨析。 Compute first, then reveal. Four of these are true calculation items; the last is conceptual.
残差(residual)是
A residual is
- a研究者没探索到的可能模型a possible model the researcher did not explore
- b响应变量中被模型解释掉的那部分变异the variation in the response explained by the model
- c观测到的响应值与模型预测值之差the difference between an observed response and the value predicted by the model
- d与其他个体不一致的观测数据data inconsistent with the rest of the group
- e衡量 \(x\) 与 \(y\) 线性关系强度的量a measure of the strength of the linear relationship between \(x\) and \(y\)
- 对照定义排除Eliminate by definition b 说的是“被解释的变异”(那是 \(r^2\) 的地盘);e 说的是 \(r\);a 与 d 分别描述“未探索的模型”和“异常值”。(b) describes explained variation (\(r^2\)'s job); (e) describes \(r\); (a) and (d) describe an unexplored model and an outlier. 只剩 c。Only (c) remains.
- 为什么是“观测 − 预测”Why observed minus predicted 这样正号表示“实际高于预测”,与“低估”一致;反之若写 \(\hat y-y\),所有解释都要反过来说,容易出错。This makes a positive residual mean “actual above prediction”, i.e. an underestimate. The reverse order flips every interpretation. \[ e=y-\hat y \] 单位与 \(y\) 相同。Units match \(y\).
| 选项Option | 判断与理由Verdict & reason |
|---|---|
| a | 错。这是“未考察的模型”,与残差无关。Wrong: an unexplored model has nothing to do with residuals. |
| b | 错。被解释的变异是 \(r^2\) 描述的对象。Wrong: explained variation is what \(r^2\) describes. |
| c | 对。定义:\(e=y-\hat y\)。Correct: \(e=y-\hat y\) by definition. |
| d | 错。与其他观测不一致的是异常值(outlier)。Wrong: that describes an outlier. |
| e | 错。衡量线性强度的是相关系数 \(r\)。Wrong: the correlation \(r\) measures linear strength. |
对两个变量 \(x,y\) 拟合最小二乘线,得 \(\hat y=-2.29+1.70x\)。点 \((5,6)\) 的残差是
A least-squares line fitted to \(x\) and \(y\) gives \(\hat y=-2.29+1.70x\). The residual for the point \((5,6)\) is
- a−2.91−2.91
- b−0.21−0.21
- c0.210.21
- d6.216.21
- e7.917.91
- 代入 \(x=5\) 求预测值Substitute \(x=5\) 题目给的是方程,不是数据表;\(x=5\) 代进去得到模型在这点的“期望”。The equation, not a data table, is given; plugging \(x=5\) gives the model's expectation there. \[ \hat y=-2.29+1.70(5)=6.21 \] 预测 6.21。Predicted 6.21.
- 相减Subtract 实际 6 比预测 6.21 略低,所以模型高估了它,残差为负。Actual 6 is slightly below 6.21, so the model overestimated and the residual is negative. \[ e=6-6.21=-0.21 \] −0.21。−0.21.
| 选项Option | 判断与理由Verdict & reason |
|---|---|
| a | 错。−2.91 是把截距与斜率搞错/相减顺序混乱的产物。Wrong: −2.91 comes from mishandling the intercept and the order of subtraction. |
| b | 对。\(6-6.21=-0.21\),表示高估。Correct: \(6-6.21=-0.21\), an overestimate. |
| c | 错。符号反了,是 \(\hat y-y\) 的结果。Wrong: sign reversed — that is \(\hat y-y\). |
| d | 错。6.21 是预测值,不是残差。Wrong: 6.21 is the predicted value, not a residual. |
| e | 错。7.91 是把 1.70 与 5 相乘后加 6 之类的错误组合。Wrong: 7.91 is an arithmetic mix-up. |
一组有序对 \((x,y)\) 满足 \(s_x=2.5\)、\(s_y=1.9\)、\(r=0.63\)。\(y\) 关于 \(x\) 的回归线斜率是
A set of ordered pairs has \(s_x=2.5\), \(s_y=1.9\), \(r=0.63\). The slope of the regression line of \(y\) on \(x\) is
- a0.480.48
- b0.650.65
- c1.321.32
- d1.901.90
- e2.632.63
- 代公式Substitute 先想一遍量纲:斜率单位是“\(y\) 的单位 / \(x\) 的单位”,所以 \(s_y\) 在上、\(s_x\) 在下。Check units: a slope is “units of \(y\) per unit of \(x\)”, so \(s_y\) goes on top and \(s_x\) below. \[ b_1=0.63\times\frac{1.9}{2.5}=0.63\times0.76=0.4788\approx0.48 \] 约 0.48。About 0.48.
- 用干扰项自查Check against the distractors 1.32 是 \(r\,s_x/s_y\)(分子分母颠倒);0.65、1.90、2.63 是把 \(r\) 与某个标准差相加得到的。1.32 is \(r\,s_x/s_y\) (inverted); 0.65, 1.90 and 2.63 come from adding \(r\) to a standard deviation. a 正确。(a) is correct.
| 选项Option | 判断与理由Verdict & reason |
|---|---|
| a | 对。\(0.63(1.9/2.5)=0.4788\)。Correct: \(0.63(1.9/2.5)=0.4788\). |
| b | 错。0.65 是把 \(r\) 加上某个标准差。Wrong: 0.65 adds \(r\) to a standard deviation. |
| c | 错。1.32 是分子分母颠倒(那是 \(x\) 关于 \(y\) 的斜率)。Wrong: 1.32 inverts the ratio — the slope of \(x\) on \(y\). |
| d | 错。1.90 就是 \(s_y\),与 \(x\) 的单位无关。Wrong: 1.90 is just \(s_y\). |
| e | 错。2.63 是把 \(r\) 加到 \(s_x\) 或 \(s_y\) 上的结果。Wrong: 2.63 comes from adding \(r\) to a standard deviation. |
某回归的决定系数 \(r^2=0.49\)。关于相关系数 \(r\),正确的说法是
A regression has \(r^2=0.49\). Which statement about \(r\) is correct?
- a\(r=0.70\)\(r=0.70\)
- b\(r=-0.70\)\(r=-0.70\)
- c\(|r|=0.70\),符号要看关联方向(或斜率的符号)\(|r|=0.70\), with the sign set by the direction of the association (the sign of the slope)
- d\(r=0.2401\)\(r=0.2401\)
- 开方Square root \(\sqrt{0.49}=0.70\),所以 \(|r|=0.70\),即 \(r\) 只可能是 \(0.70\) 或 \(-0.70\)。\(\sqrt{0.49}=0.70\), so \(|r|=0.70\) and \(r\) must be either \(0.70\) or \(-0.70\). \[ |r|=\sqrt{0.49}=0.70 \] 强度是“较强”。A moderately strong to strong association.
- 找符号Recover the sign 斜率 \(b_1=r\,s_y/s_x\) 与 \(r\) 同号(\(s_x,s_y>0\))。所以只要看斜率的正负,或直接看散点图往哪边斜。The slope \(b_1=r\,s_y/s_x\) shares the sign of \(r\) (both SDs are positive). So read the sign from the slope or from the scatterplot's direction. “只知道 \(r^2\) 时,符号无法确定”——这正是 c 的意思。“From \(r^2\) alone the sign is undetermined” — exactly what (c) says.
| 选项Option | 判断与理由Verdict & reason |
|---|---|
| a | 错。默认取正号是没根据的,负关联时 \(r=-0.70\)。Wrong: assuming the positive root is unjustified; a negative association gives \(-0.70\). |
| b | 错。同理,默认负号也没根据。Wrong: defaulting to the negative root is equally unjustified. |
| c | 对。\(|r|=\sqrt{r^2}\),符号另找依据。Correct: \(|r|=\sqrt{r^2}\) and the sign must come from elsewhere. |
| d | 错。0.2401 是 \(0.49^2\),把“平方”当成了“开方”。Wrong: 0.2401 is \(0.49^2\) — squaring instead of taking the root. |
研究者用 \(x\) 预测 \(y\),得到的残差图呈明显的“拱形”(残差先正、中间为负、末尾又变正)。最恰当的结论是
A residual plot from predicting \(y\) with \(x\) shows a clear arch (residuals positive, then negative, then positive again). The best conclusion is
- a直线高估了所有观测值the line overestimates every observation
- b直线低估了所有观测值the line underestimates every observation
- c数据之间没有关系,不应拟合there is no relationship, so nothing should be fitted
- d两个变量之间是非线性关系,直线模型不合适the relationship is nonlinear, so a straight-line model is not appropriate
- 排除“整体高估 / 低估”Rule out systematic bias 最小二乘线的残差和恒为 0,不可能全部同号;残差有正有负且有节奏,才是问题所在。Least-squares residuals always sum to 0, so they cannot all share a sign; the problem is the rhythm, not the average. a、b 都不可能。(a) and (b) are impossible.
- 看模式意味着什么What the pattern means 拱形 = 中段被直线系统性压低、两端被抬高,正是“抛物线型关系”被直线硬拟合的典型残差。说明关系存在,只是不直。An arch means the middle is systematically over-predicted while the ends are under-predicted — the classic residual signature of a curved relationship fitted with a line. The relationship exists; it just is not straight. c 说“没有关系”是把 \(r\approx0\) 与“无关系”混为一谈(第 7 讲的坑)。(c) confuses \(r\approx0\) with “no relationship” — Lecture 7's trap.
- 正确的下一步The right next step 既然不直就该换模型:对 \(x\) 或 \(y\) 做变换(如平方根、对数)后再回归,或改用曲线模型,并重新检查残差图。If it is not straight, change the model: transform \(x\) or \(y\) (square root, logarithm) and refit, then re-check the residual plot. d 是最完整的结论。(d) is the complete conclusion.
| 选项Option | 判断与理由Verdict & reason |
|---|---|
| a | 错。残差有正有负,不可能全部高估。Wrong: residuals take both signs, so total overestimation is impossible. |
| b | 错。同上,且残差和为 0。Wrong: same reason, and residuals sum to 0. |
| c | 错。拱形说明关系很强,只是非线性。Wrong: an arch signals a strong but nonlinear relationship. |
| d | 对。系统性的拱形 = 线性模型不合适。Correct: a systematic arch means the linear model is inappropriate. |
本讲小结Summary
- 回归线 \(\hat y=b_0+b_1x\) 是模型;斜率与截距的解释必须带 “predicted”。
- 最小二乘 = 让 \(\sum e_i^2\) 最小的直线;残差 \(e=y-\hat y\),且 \(\sum e_i=0\)。
- 系数公式:\(b_1=r\,s_y/s_x\),\(b_0=\bar y-b_1\bar x\);直线必过 \((\bar x,\bar y)\),斜率与 \(r\) 同号。
- 残差图判断线性是否合适:无模式 \(\Rightarrow\) 合适;弯曲或喇叭 \(\Rightarrow\) 不合适。
- \(s\) 是典型预测误差(单位同 \(y\));\(r^2\) 是 \(y\) 的变异中被解释的比例。
- 区分异常值 / 高杠杆 / 强影响点;不要在 \(x\) 的范围外外推。
- \(\hat y=b_0+b_1x\) is a model; interpreting slope and intercept requires the word “predicted”.
- Least squares minimises \(\sum e_i^2\) with \(e=y-\hat y\), and the residuals always sum to 0.
- \(b_1=r\,s_y/s_x\) and \(b_0=\bar y-b_1\bar x\); the line passes through \((\bar x,\bar y)\), and the slope shares the sign of \(r\).
- Residual plots judge form: no pattern \(\Rightarrow\) a line is fine; curvature or a fan \(\Rightarrow\) it is not.
- \(s\) is a typical prediction error (same units as \(y\)); \(r^2\) is the fraction of variation in \(y\) accounted for.
- Distinguish outliers, high-leverage and influential points; never extrapolate beyond the observed range of \(x\).
抽样与调查:样本能替谁说话Samples and Surveys: Whom Does a Sample Speak For?
前几讲我们一直在“描述”数据,好像那些数字是从天上掉下来的。这一讲回到源头:数据是怎么来的?如果抽样机制本身有偏,后面再漂亮的图表、再窄的置信区间,都只是把一个错误的数字说得更精确。我们要学会判断一个样本“能不能替一群人说话”,以及那个最反直觉的结论——大样本救不了偏差。
The previous lectures described data as if numbers simply rained down from the sky. This lecture goes back to the source: where does data come from? If the sampling mechanism is biased, every handsome chart and every narrow confidence interval merely states a wrong number more precisely. We learn to judge whether a sample can speak for a population — and to accept the most counter-intuitive conclusion in the chapter: a bigger sample does not cure bias.
本讲学习目标Learning Objectives
- 区分总体研究中想要了解的全部个体所组成的群体。它通常无法被完整地数一遍,描述它的数字(参数)是固定但未知的。The entire group of individuals we want information about. Usually impossible to enumerate; the numbers describing it (parameters) are fixed but unknown.、样本与普查,并说清任何一个样本结果究竟在替谁说话。
- 用严格的语言写出 SRS 的定义:不是“每个人被抽到的机会相等”,而是“任意 n 个人组成的集合被抽中的机会相等”。
- 会用随机数字表和计算器
randInt抽取 SRS,并说明“标号 → 读表 → 跳过越界与重复”三步里每一步为什么不能省。 - 比较 分层、整群、系统、方便、自愿回应五类抽样:它们各自什么时候用、精度与成本如何权衡。
- 识别四种偏差:undercoverage(覆盖不全)、nonresponse(无回应)、response bias(回答偏差)、措辞效应,并判断它会把估计推向哪一边。
- 解释偏差与变异性的区别,说明为什么样本量只能降低变异性、永远不能消除偏差。
- Distinguish the populationThe entire group of individuals we want information about; its parameters are fixed but unknown.想要了解的全部个体所组成的群体;描述它的参数固定但未知。, a sample and a census, and state exactly whom a given sample result speaks for.
- State the definition of an SRS precisely: not "each individual is equally likely" but "every set of n individuals is equally likely to be chosen".
- Use a table of random digits and
randIntto select an SRS, and explain why each of the three steps — label, read, skip — cannot be skipped. - Compare stratified, cluster, systematic, convenience and voluntary response sampling: when each is used and how precision trades off against cost.
- Identify undercoverage, nonresponse, response bias and wording effects, and predict which direction each pushes the estimate.
- Explain the difference between bias and variability, and why sample size shrinks the second but never the first.
核心概念Core Concepts
9.1 总体、样本与普查:一个数字背后站着谁9.1 Population, Sample and Census: Whom Is the Number About?
抽样题的第一步从来不是算数,而是回答:这个样本实际覆盖了谁?它和你想要的总体之间,往往藏着一整条鸿沟。
The first move in a sampling problem is never arithmetic. It is to ask: whom does this sample actually cover? Between that group and the population you care about there is often a wide gap.
先立三个词。总体(population)是你想了解的全部个体,可能是一所学校 1200 名学生,也可能是全国 2.4 亿成年人。样本(sample)是你真正动手量到的那一小部分人。普查(census)则试图把总体里每一个个体都量一遍。样本存在只有一个理由:普查太贵、太慢、有时根本做不到(想测灯泡寿命就得把灯泡烧掉)。
Three words first. The population is the entire group you want information about — 1 200 students at one school, or 240 million adults nationwide. A sample is the part you actually measure. A census attempts to measure every individual in the population. Samples exist for one reason: a census is too expensive, too slow, and sometimes impossible (testing a bulb's lifetime burns the bulb).
| 比较项Aspect | 普查 CensusCensus | 抽样调查 Sample surveySample survey |
|---|---|---|
| 覆盖范围Coverage | 总体中的每一个个体every individual | 总体中的一部分个体a subset of individuals |
| 结果是否“精确”Exactness | 没有抽样误差,但可能有非抽样误差(漏报、错报)no sampling error, but non-sampling error remains (refusals, misreporting) | 有抽样误差;误差大小可由样本量控制sampling error exists; its size is controlled by sample size |
| 成本与时间Cost & time | 极高,人口级普查往往十年一次very high; national censuses run once a decade | 低得多,可以频繁做、追加细节问题far cheaper; can be repeated and asked in depth |
| 什么时候用When to use | 法律要求(人口普查)、总体很小、必须无一遗漏legally required, population is small, or nothing may be missed | 绝大多数需要“估计”的场合,尤其是总体很大时whenever a quantity must be estimated, especially for a large population |
如果说一个研究设计有偏(bias),指的是它会一致地高估或一致地低估你想知道的那个值。注意“一致”两个字:偏差不是某一次抽样的运气不好,而是设计本身每次都朝同一个方向错。
A study design is biased if it would consistently overestimate or consistently underestimate the value you want to know. Notice "consistently": bias is not bad luck in one sample, it is the design going wrong in the same direction every time.
9.2 SRS:让运气来选人,而不是让人来选人9.2 The SRS: Let Chance Pick, Not People
SRS 的严格定义是关于样本组合的:任意 n 个人凑成的一组,被抽中的机会完全相同。只说“每个人机会相等”听起来对,却漏掉了关键的一半。
The definition of an SRS is about combinations of individuals: every set of n people must have exactly the same chance of being the sample. "Each individual is equally likely" sounds right but misses half the idea.
把 1200 名学生里抽 60 人想成“从 1200 张完全相同的纸条里摸 60 张”。哪一种 60 人的组合被摸到,机会都一样——这样的样本才叫简单随机样本大小为 n 的简单随机样本(SRS)是指:总体中任意 n 个个体组成的集合,都有完全相同的机会成为被选中的样本。An SRS of size n is a sample chosen so that every set of n individuals has exactly the same chance of being the sample selected.(SRS)。这个定义顺便告诉我们两件事:每个个体被选入的机会都是 \(n/N\);但反过来,“每个个体机会相等”不足以保证 SRS。
Picture drawing 60 slips from 1 200 identical slips. Any set of 60 slips is equally likely — that is a simple random sampleAn SRS of size n is chosen so that every set of n individuals has exactly the same chance of being the sample.大小为 n 的 SRS:总体中任意 n 个个体组成的集合,被选中的机会完全相同。 (SRS). The definition gives two facts: each individual has probability \(n/N\) of being included; but "each individual equally likely" is not enough to guarantee an SRS.
为什么不够?看下面这个班级:100 人,50 男 50 女。研究者想抽 10 人,于是“随机抽 5 男 5 女”。每个人被抽到的机会确实都是 1/10,可是“10 个男生”这种组合的机会是 0——它被这个规则彻底排除了。这不是 SRS,而是一种“配额抽样”。
Why not? Take a class of 100 — 50 men, 50 women. The researcher wants 10 students, so she draws "5 men and 5 women at random". Each individual indeed has probability 1/10 of inclusion, yet the all-male set of 10 has probability 0 — the rule excludes it entirely. That is not an SRS; it is quota sampling.
随机抽样同时排除了两种人为干预:抽样者的偏好(专挑看着顺眼的人)和被访者的自我选择(爱说话的人自己凑上来)。这两件事一旦进入样本,概率论就再也帮不了你。
Random sampling removes two human influences at once: the sampler's preference (picking people who look agreeable) and self-selection (the talkative volunteering themselves). Once either is inside the sample, probability theory can no longer help you.
randInt(1, 1200) → 连续按 ENTER,抽到重复的号码就跳过
randIntNoRep(1, 1200) → { … 60 个互不相同的整数 … }
randInt 是放回抽取,号码可能重复;抽人必须用不放回,重复即作废重抽。Note: randInt samples with replacement, so repeats occur; sampling people requires without replacement — discard repeats.9.3 随机数字表:不插电也能真随机9.3 The Random-Digit Table: Real Randomness Offline
随机数字表是一张“永远公平”的号码纸:每一位数字 0–9 等可能,而且各位之间互相独立——知道前面出现了什么,对下一位毫无提示。读表永远是两步:标号,然后读表。
A table of random digits is a strip of numbers that never plays favourites: each entry is equally likely to be any of 0–9, and entries are independent — knowing one part tells you nothing about the next. Reading it is always two steps: label, then read.
第一步,标号。给总体里每个人一个位数相同的号码,并且从 1 开始(01、02……而不是从 0 开始)。位数取“能覆盖全体”的最短长度:28 家酒店用两位数 01–28,1 200 名学生用四位数 0001–1200。第二步,读表。按固定位数分组读,凡是超出编号范围的、以及已经出现过的,全部跳过,直到凑满 n 个为止。
Step 1, label. Give every individual a numerical label of the same length, starting at 1 (01, 02… not 0). Use the shortest length that covers everyone: two digits 01–28 for 28 hotels, four digits 0001–1200 for 1 200 students. Step 2, read. Read consecutive groups of that length, skipping any group outside the label range and any group already used, until n labels are collected.
| 号码Label | 酒店Hotel | 号码Label | 酒店Hotel | 号码Label | 酒店Hotel | 号码Label | 酒店Hotel |
|---|---|---|---|---|---|---|---|
| 01 | Aloha Kai | 08 | Captiva | 15 | Palm Tree | 22 | Sea Shell |
| 02 | Anchor Down | 09 | Casa del Mar | 16 | Radisson | 23 | Silver Beach |
| 03 | Banana Bay | 10 | Coconuts | 17 | Ramada | 24 | Sunset Beach |
| 04 | Banyan Tree | 11 | Diplomat | 18 | Sandpiper | 25 | Tradewinds |
| 05 | Beach Castle | 12 | Holiday Inn | 19 | Sea Castle | 26 | Tropical Breeze |
| 06 | Best Western | 13 | Lime Tree | 20 | Sea Club | 27 | Tropical Shores |
| 07 | Cabana | 14 | Outrigger | 21 | Sea Grape | 28 | Veranda |
9.4 分层与整群:切开看,还是整把抓9.4 Stratified vs Cluster: Slice It or Grab It Whole
分层抽样要求层内越像越好、层间越不像越好,每个层都要抽一点;整群抽样要求群内越杂越好、群间越像越好,抽中的群全部查。两者对“相似性”的要求刚好反过来。
Stratified sampling wants similar within a stratum, different between strata and samples every stratum; cluster sampling wants varied within a cluster, similar between clusters and then measures whole clusters. The two designs demand the opposite kind of similarity.
为什么分层更精确?因为总体里最让人头疼的那部分差异——比如不同年级之间的差异——被“每层都抽”这个动作直接消掉了。剩下的只是层内的小波动,平均起来自然更稳。整群恰好相反:同一个班里的人本来就相似(同一批老师、同样的作息),你抽一个班等于只听到一个人说话,信息重复得很厉害,估计反而更抖。
Why is stratification more precise? Because the largest source of variation — differences between grades, say — is removed by sampling inside every stratum. What remains is small within-stratum noise, which averages out. Clusters are the opposite: students in one class resemble each other (same teachers, same schedule), so one selected class is nearly one voice repeated, and the estimate wobbles more.
| 对比Contrast | 分层抽样 StratifiedStratified sample | 整群抽样 ClusterCluster sample |
|---|---|---|
| 划分依据Groups are… | 按与研究变量相关的特征切(年级、性别、收入档)cut by a characteristic related to the response (grade, sex, income band) | 按地理位置或自然单位聚(班级、楼栋、社区)grouped by location or natural unit (class, building, block) |
| 组内 / 组间Within / between | 层内同质,层间异质similar within, different between | 群内异质,群间同质different within, similar between |
| 怎么抽How it is drawn | 每个层里各抽一个 SRS,再合并a separate SRS inside every stratum, then combined | 先抽若干群,被抽中的群全部调查take an SRS of clusters, then measure everyone in them |
| 精度Precision | 通常优于同样本量的 SRS(层间差异越大越明显)usually better than an SRS of the same size, more so when strata differ a lot | 通常不如同样本量的 SRSusually worse than an SRS of the same size |
| 成本Cost | 需要一份带分层信息的完整名单needs a complete list with stratum labels | 省时间省钱:只跑几个地点cheap and fast: visit only a few locations |
分层 = 每个层都摸一点,靠“层间差异被消掉”换精度;整群 = 抽中就整群查,靠“少跑几个地方”换成本。看到“按年级 / 性别 / 收入各抽若干”就是分层;看到“随机选 5 个班,班里所有人”就是整群。
Stratified = touch every stratum and buy precision by removing between-stratum variation. Cluster = visit a few whole groups and buy cost savings. "Take some from each grade / sex / income band" is stratified; "choose 5 classes and test everyone in them" is cluster.
9.5 系统、方便、自愿回应:看起来随机,其实不是9.5 Systematic, Convenience, Voluntary: Random-Looking but Not Random
方便抽样与自愿回应抽样不是“稍微不准”,而是系统性地朝同一个方向错;系统抽样本身可以是很正规的概率抽样,但名单里一旦藏着周期,它就会精准地挑出同一类人。
Convenience and voluntary response samples are not "a little off" — they are wrong in the same direction every time. Systematic sampling can be a legitimate probability sample, but if the list hides a periodic pattern it will pick exactly the same kind of person again and again.
系统抽样 SystematicSystematic sample
算一个间隔 \(k=N/n\),在头 \(k\) 个里随机起个头,之后每隔 \(k\) 个抽一个。真正的随机性只发生在“起点”这一次。
Compute \(k=N/n\), choose a random start among the first \(k\), then take every \(k\)-th unit. All the randomness lives in that single start.
陷阱宿舍每 8 人一间、床位按 1–8 编号,你若每 8 个抽 1 个且间隔正好是 8,抽到的永远是同一个床位号的人。
TrapDorm rooms hold 8 students with beds numbered 1–8; a step of exactly 8 always lands on the same bed number.
方便抽样 ConvenienceConvenience sample
挑最容易接触到的人:图书馆前 30 人、自己班上的同学、商场里的顾客。“容易找到”这件事本身就与要研究的特征高度相关。
Take whoever is easiest to reach: the first 30 outside the library, your own classmates, shoppers in a mall. Being easy to reach is itself strongly related to the variable of interest.
方向几乎必然有偏,而且方向可以预测(图书馆样本 → 自习时间偏高)。
DirectionAlmost certainly biased, with a predictable direction (a library sample overstates study time).
自愿回应 Voluntary responseVoluntary response sample
发一个公开邀请,谁想参加谁参加:热线电话、网页投票、随报纸附的问卷。
Issue an open invitation and let people decide: call-in polls, web votes, questionnaires tucked into a newspaper.
方向意见强烈的人最可能回应,而且强烈往往集中在同一边——样本被推到极端。
DirectionPeople with strong opinions respond most, and strong opinions cluster on one side, pushing the estimate toward an extreme.
多阶段抽样 MultistageMultistage sample
大项目几乎都这么做:先分层(省 → 市 → 区),再在层内整群(抽中几个社区,社区内再抽户),最后一层用 SRS 抽人。
How large surveys actually work: stratify first (province → city → district), then cluster inside each stratum (pick blocks, then households), and finish with an SRS of people.
要点每一层都仍然是概率抽样,所以整体仍然可以有误差范围。
PointEvery stage remains probability sampling, so the whole design still supports a margin of error.
把“系统抽样”当成“随机抽样”的同义词。系统抽样只有在“名单顺序与所研究的变量无关”时才近似 SRS。名单按学号排(无关)可以;名单按成绩排、按宿舍房间排(有关)就会周期性撞上同一类人。考试里出现“每隔 k 个抽一个”,一定要多问一句:这个名单是怎么排序的?
Treating "systematic" as a synonym for "random". Systematic sampling resembles an SRS only when the list order is unrelated to the variable. Ordered by student ID (unrelated) is fine; ordered by test score or by dorm room (related) hits the same kind of person periodically. When an exam says "take every k-th unit", always ask: how is this list ordered?
9.6 四种偏差,以及大样本的边界9.6 Four Forms of Bias, and the Limits of Sample Size
偏差让整个分布整体搬家,变异性只让分布变宽变窄。样本量能治后者,治不了前者——这是本讲最重要的一句话。
Bias moves the whole distribution; variability only stretches or squeezes it. Sample size fixes the second and never the first — the single most important sentence in this lecture.
从一个样本到“关于总体的结论”,中间有四道关口会漏人、会失真。AP 考试非常喜欢让你命名偏差类型,所以下面这张表要能默写。
Between a sample and a conclusion about the population there are four gates where people get lost or answers get distorted. The AP exam loves asking you to name the bias, so this table is worth memorising.
| 偏差Bias | 定义Definition | 典型场景Typical setting | 会把估计推向Pushes the estimate… |
|---|---|---|---|
| Undercoverage 覆盖不全 | 总体中有一部分人根本不可能被选进样本part of the population cannot possibly be chosen | 只打固定电话(漏掉只用手机的人)、只查在校生名单(漏掉辍学者)landline-only calling (misses cell-only households), school lists (miss dropouts) | 方向取决于被漏掉的那群人与众不同的地方depends on how the missed group differs |
| Nonresponse 无回应 | 被选中的人联系不上或拒绝回答chosen individuals cannot be reached or refuse | 邮寄问卷回收率 20%;电话调查连打三次没人接mailed surveys with a 20% return; three unanswered calls | 通常是“越忙 / 越不在意 / 越有隐私顾虑的人”缺席usually the busiest, least interested or most private people are absent |
| Response bias 回答偏差 | 回答出现系统性的不真实:说谎、讨好、记忆偏差、访员影响a systematic pattern of incorrect answers: lying, pleasing, faulty memory, interviewer effects | 问“你上一次考试作弊了吗”;访员穿制服提问"Did you ever cheat on a test?"; an interviewer in uniform | 朝“社会认为正确”的方向偏toward the socially approved answer |
| Wording 措辞效应 | 问题的用词、顺序、选项改变了答案the words, order or options change the answer | “是否支持给富人加税”vs“是否支持税收公平”;先问一个问题再问另一个"tax the rich" vs "tax fairness"; one question priming the next | 朝措辞暗示的方向偏,幅度常常最大toward what the wording suggests — often the largest effect of all |
“样本越大越准”是半句真话。准确说:样本越大,变异越小、误差范围越窄;但如果抽样方式本身有偏,更大的样本只是把同一个错误估得更精确——一个 20 万人的网上投票,比 1 200 人的随机样本更不可信。考试标准答法:增大样本量不能消除偏差,只能减小变异性。
"Bigger is better" is half true. Precisely: a larger sample reduces variability and narrows the margin of error; if the design is biased, a larger sample merely estimates the same wrong value more precisely — a 200 000-person web poll is less trustworthy than a 1 200-person random sample. The exam-ready sentence: increasing the sample size does not reduce bias, only variability.
例题精讲Worked Examples
例 1 用随机数字表抽 10 名学生Example 1 Drawing 10 students with a random-digit table
75425 56573 90420 48642 27537 61036 15074 84675请用这张表选出 10 名学生,并写出完整的操作步骤。 Eighty students are taking AP Statistics, and the teacher wants 10 of them to try a practice exam. One line of a random-digit table reads
75425 56573 90420 48642 27537 61036 15074 84675Use it to choose 10 students and write out the full procedure.
- 标号。给 80 名学生编号 01–80(两位数,因为 80 需要两位才能覆盖;从 01 开始而不是 00)。编号必须事先固定,不能边抽边换。 Label. Number the 80 students 01–80 (two digits, since 80 needs two; start at 01, not 00). The labels must be fixed in advance — never changed while drawing.
- 逐组读表。从行首开始,每次读两位:75、42、55、65、73、90、42、04、86、42、27、53、76、10、36、15、07、48、46、75…… Read in groups. From the start of the line, read two digits at a time: 75, 42, 55, 65, 73, 90, 42, 04, 86, 42, 27, 53, 76, 10, 36, 15, 07, 48, 46, 75…
- 跳过两类号码。越界的(90、86 都大于 80)不可能对应任何人;重复的(42 第二次、第三次出现)会让同一个人被算两次。跳过之后依次得到:75、42、55、65、73、04、27、53、76、10。 Skip two kinds. Out of range groups (90 and 86 exceed 80) match nobody; repeats (the second and third 42) would count one person twice. After skipping: 75, 42, 55, 65, 73, 04, 27, 53, 76, 10.
- 核对数量。正好 10 个号码,一一对应 10 名学生。整张名单上任意 10 人组合被选中的机会都相同,所以这是一个合法的 SRS。 Check the count. Exactly 10 labels, matching 10 students. Every set of 10 labels had the same chance, so this is a legitimate SRS.
randInt(1, 80, 10) → 得到 10 个可能重复的号码;重复就再抽
randIntNoRep(1,80) 一次给出不重复的 10 个。On the TI-84, randIntNoRep(1,80) returns 10 distinct labels at once.例 2 给一个学区设计调查,并预判偏差Example 2 Designing a district survey and anticipating bias
(a) 说明怎样用分层抽样抽 120 人,并指出分层的依据;
(b) 如果改成“随机抽 6 个班,班里所有学生都调查”,这是哪种抽样?精度会怎样变化?
(c) 若实际用“午休时在教学楼门口拦人”的方式,会引入哪些偏差?为什么把样本扩大到 1 200 人也没用? A district has five high schools and 4 200 students, and wants the mean hours of sleep per night. It holds a complete roster organised by school and grade.
(a) Describe a stratified sample of 120 and name the strata.
(b) If instead "6 classes are chosen at random and every student in them is surveyed", what design is that, and how does precision change?
(c) If students are actually stopped at the building door at lunch, which biases appear, and why does enlarging the sample to 1 200 not help?
- (a) 决定分层变量。睡眠时间与年级高度相关(毕业班睡得最少),所以按“学校 × 年级”切成层:5 校 × 3 个年级 = 15 层。层内学生作息相近,层间差别大,正合分层的理想条件。 (a) Choose the stratifying variable. Sleep is strongly related to grade (seniors sleep least), so cut the roster into strata by school × grade: 5 schools × 3 grades = 15 strata. Similar within, different between — the ideal condition.
- (a) 按比例分配 + 层内 SRS。每层人数不同,按“层人数 ÷ 4200 × 120”分配名额,四舍五入后再微调总数。然后在每一层内用
randIntNoRep抽出对应人数,合并起来就是样本。由于每层都被覆盖,样本不会因为学校或年级而系统性偏斜。 (a) Allocate proportionally, then SRS within. Give each stratum its share \(n_h = 120 \times N_h/4200\) (rounded, then adjusted to total 120) and draw that many withrandIntNoRep. Because every stratum is represented, the sample cannot tilt systematically by school or grade. \[ n_h = 120 \times \frac{N_h}{4200}, \qquad \sum n_h = 120 \] - (b) 判定设计。“抽 6 个班,班里所有人”=先抽群、群内全查,是整群抽样。同一个班的学生作息高度相似(同一作息表、同一批老师),信息重复,因此估计的变异性比同样本量的 SRS 更大;但只需进 6 个教室,成本极低。 (b) Name the design. "Choose 6 classes, survey everyone in them" is cluster sampling. Students in a class share a schedule and teachers, so the information is partly redundant and the estimate is more variable than an SRS of the same size — but it costs only six classroom visits.
- (c) 诊断偏差。午休门口拦人至少有三种毛病:覆盖不全(此时在睡觉、在社团、在外面的学生根本不在场);无回应(被拦下也可能摆手走开);回答偏差(当面被问,容易报一个“听起来正常”的数字)。这些偏差都作用在“谁被问”和“怎么答”上,与样本量无关。 (c) Diagnose the bias. Stopping people at lunch has at least three faults: undercoverage (students asleep, at clubs or off campus are never present), nonresponse (some wave you away), and response bias (face to face, people report a respectable number). All three act on who is asked and how they answer — neither depends on sample size.
- (c) 结论的写法。样本从 120 扩大到 1 200,只会让“被拦到的那群人的平均值”估得更稳,但那个平均值本身仍然系统地偏离全体学生的真值。正确做法是换抽样机制:按名册随机抽人,再用电话 / 短信补齐无回应者。 (c) Write the conclusion. Going from 120 to 1 200 estimates the mean of people who pass the door at lunch more precisely, but that mean is still systematically off from all students. The fix is to change the mechanism: sample from the roster and follow up nonrespondents by phone or text.
随堂练习Check Your Understanding
先自己选,再点“查看解答”。每题都给出考点、逐步推理与错误选项诊断——错也要错得明白。 Choose first, then reveal. Every question comes with the tested idea, step-by-step reasoning and a diagnosis of each wrong option.
一个年级有 100 名学生,50 名女生、50 名男生。研究者想抽 10 人做访谈,于是规定:随机抽 5 名女生和 5 名男生。这个样本是 SRS 吗?
A grade has 100 students, 50 female and 50 male. A researcher wants 10 interviews and decides to select 5 females and 5 males at random. Is this an SRS?
- a是。因为每个人被抽到的机会都是 1/10Yes, because each student has probability 1/10 of being chosen
- b是。因为抽样过程用到了随机数Yes, because random numbers are used
- c不是。因为“10 名男生”这样的组合机会为 0,各组合机会不相等No, because a set such as "10 males" has probability 0, so the sets are not equally likely
- d不是。因为样本量太小No, because the sample is too small
- 先算“这个组合有没有机会”Ask whether the set can occur at all 规则规定只能抽 5 男 5 女,因此“10 个全是男生”这一组合的概率被强行设成了 0;而“5 男 5 女”的某个组合概率约为 1/C(50,5)²,远大于 0。The rule permits only 5 males and 5 females, so the set "all 10 males" is forced to probability 0 while a given 5-and-5 set has probability about 1/C(50,5)² — far above 0. 不同组合的机会不相等 → 违反 SRS 定义。Sets are not equally likely → the SRS definition fails.
- 为什么“看起来也对”Why it looks right anyway 每个女生被选中的概率是 5/50 = 1/10,每个男生同样是 1/10,所以 a 选项看起来成立。但这只说明边际概率相等,不说明联合抽样机制是均匀的。Each female has probability 5/50 = 1/10 and each male the same, so (a) looks plausible. But that only says the marginal inclusion probabilities match; the joint mechanism is not uniform. 它叫“分层 / 配额抽样”,在需要按性别分析时很有用,但不是 SRS。This is a stratified/quota design — useful, but not an SRS.
| 选项Option | 判断与理由Verdict & reason |
|---|---|
| a | 错。个体机会相等 ≠ 组合机会相等,这是本题的全部陷阱。Wrong: equal individual probabilities do not imply equal set probabilities — the whole trap. |
| b | 错。用随机数只是手段;“各有配额”限制了哪些组合可能出现。Wrong: random numbers are a tool; the quotas restrict which sets can occur. |
| c | 对。SRS 要求每个 10 人组合机会相同,而这里“10 男”或“10 女”的组合概率为 0。Correct: an SRS requires every 10-person set to be equally likely, yet all-male or all-female sets have probability 0. |
| d | 错。样本量大小与“是不是 SRS”无关。Wrong: sample size has nothing to do with being an SRS. |
某市要调查居民对垃圾分类的满意度。下列做法分别属于哪种抽样方法?
① 把全市划成 40 个社区,随机抽 5 个社区,社区内每户都走访。
② 把居民按“是否住在老城区”分成两组,每组内随机抽 300 户。
③ 在市中心广场每隔 20 个路人拦一位访问。
④ 在社区服务中心门口访问前 50 位来办事的居民。
⑤ 电视台播出一条新闻,请观众拨打热线回答。
A city surveys satisfaction with recycling. Classify each plan:
① Divide the city into 40 neighbourhoods, choose 5 at random, and visit every household in them.
② Split residents into "old town" and "elsewhere", then sample 300 households at random within each group.
③ Stop every 20th passer-by in the central square.
④ Interview the first 50 residents who come to the community centre.
⑤ A TV station invites viewers to call a hotline.
- a①整群 ②分层 ③系统 ④方便 ⑤自愿①cluster ②stratified ③systematic ④convenience ⑤voluntary response
- b①分层 ②整群 ③方便 ④系统 ⑤自愿①stratified ②cluster ③convenience ④systematic ⑤voluntary response
- c①整群 ②分层 ③系统 ④自愿回应 ⑤方便①cluster ②stratified ③systematic ④voluntary response ⑤convenience
- d①多阶段 ②分层 ③系统 ④方便 ⑤方便①multistage ②stratified ③systematic ④convenience ⑤convenience
- 先分清“群”与“层”Separate clusters from strata ①的 40 个社区是地理位置上的群,抽中就要全查;②的两组是人为切出的层,每组都抽一部分。The 40 neighbourhoods in ① are geographic clusters measured entirely once chosen; the two groups in ② are strata, each of which is sampled. ①整群,②分层。① cluster, ② stratified.
- 再看“间隔”与“门槛”Then the interval and the doorstep ③按固定间隔取人,是系统抽样(此处“名单”=广场上人流经过的顺序);④只访问走到服务中心门口的人,是方便抽样。③ takes people at a fixed interval — systematic sampling, where the "list" is the order in which people pass; ④ reaches only those who show up at the centre — convenience. ③系统,④方便。③ systematic, ④ convenience.
- 最后看“谁决定入样”Finally, who decides inclusion ⑤里是观众自己决定要不要打电话,且打进来的多半是意见强烈的人,典型的自愿回应抽样。In ⑤ viewers decide for themselves, and callers tend to hold strong views — the textbook voluntary response sample. 答案 a。Answer a.
| 选项Option | 判断与理由Verdict & reason |
|---|---|
| a | 对。五条与五类一一对应,没有交换。Correct: all five match, no swaps. |
| b | 错。把①整群当成①分层、②分层当成②整群——两者“相似性要求”正好相反,这是最常见的混淆。Wrong: ① and ② are swapped. Their similarity requirements are opposite, which is why this swap is the most common error. |
| c | 错。④有明确的地点筛选,是方便而非自愿;⑤是自愿而非方便。Wrong: ④ is screened by location (convenience), not self-selection; ⑤ is the reverse. |
| d | 错。①只有一层整群,没有“先分层再抽群”,谈不上多阶段。Wrong: ① is a single cluster stage, not multistage. |
某高校用宿舍固定电话随机拨号,调查“学生每周运动时间”。电话接通后,若无人接听就跳过;问卷第一题是“你每周至少运动 3 次,对吧?”。最终 1 200 个有效样本的平均值为 4.8 小时,校方据此宣布“学生运动充足”。这套做法的问题不包括下列哪一项?
A university randomly dials dorm landlines to estimate weekly exercise. Unanswered calls are skipped; the first survey question reads "You exercise at least three times a week, right?". With 1 200 completed interviews averaging 4.8 hours, the university announces that students exercise enough. Which problem is NOT present?
- a覆盖不全:只用固定电话会漏掉没有装电话的宿舍 / 只用手机的学生Undercoverage: landline-only dialing misses students without a dorm phone or cell-only students
- b无回应:无人接听就跳过,缺席者往往更忙、更少运动Nonresponse: skipped unanswered calls; absent students tend to be busier and exercise less
- c措辞效应:第一题把“至少 3 次”塞进问句,诱导肯定回答Wording: leading with "at least three times" invites agreement
- d样本量不足 1 200 太小,无法推断总体Sample size of 1 200 is too small to support inference
- 顺着流程找漏洞Walk the pipeline 抽样框(宿舍电话簿)覆盖不到所有人 → 覆盖不全;接通与否由运气和作息决定 → 无回应;问句本身给对方一个“正确答案” → 措辞效应。三道关口各自缩窄了一次样本。The frame (dorm phone book) misses people → undercoverage; answering depends on schedule and luck → nonresponse; the question supplies the "right" answer → wording. Three gates, three narrowings. a、b、c 都真实存在。a, b and c are all real.
- 检验 dTest d 对 \(p\) 的估计,误差范围约 \(1/\sqrt{1200}\approx 2.9\%\)。仅仅因为“不够大”就否定它,是把偏差问题误诊成了样本量问题。For a proportion the margin is about \(1/\sqrt{1200}\approx 2.9\%\). Rejecting the study for being "too small" misdiagnoses bias as sample size. \[ \frac{1}{\sqrt{1200}}\approx 0.029 \] 样本量不是问题;d 的说法错误,所以选 d。Sample size is not the issue, so d is the false statement.
| 选项Option | 判断与理由Verdict & reason |
|---|---|
| a | 确实存在。固定电话抽样框天然漏人。Present: a landline frame inherently misses people. |
| b | 确实存在。“无人接听就跳过”是无回应的教科书定义。Present: "skip if unanswered" is the textbook nonresponse. |
| c | 确实存在。引导性问句属于措辞效应,AP 里常与 response bias 一起考。Present: a leading question is a wording effect, often tested alongside response bias. |
| d | 不存在。1 200 已是大样本;真正的病根是偏差,而不是数量。Not present: 1 200 is a large sample; the real fault is bias, not quantity. |
一家媒体在网上发起投票:“你支持延长图书馆开放时间吗?”三天内收到 18 642 份回答,其中 71% 支持。报道称:“本次调查误差不超过 ±1%,结果具有代表性。”请指出这段话中至少两个统计学问题,并说明为什么“样本很大”不能挽救它。
A news outlet posts an online poll: "Do you support longer library hours?" In three days 18 642 responses arrive, 71% in favour. The report says: "The margin of error is at most ±1%, so the result is representative." Identify at least two statistical problems and explain why a large sample cannot rescue the claim.
- 问题一:抽样机制是自愿回应Problem 1: self-selected sample 谁能看到这条投票、谁愿意点进去,都由个人决定。支持延长开放时间的人(常来图书馆的人)更可能看到并参与,因此 71% 几乎必然高估真实支持率。Who sees the poll and who bothers to click is self-selected. People who want longer hours — library users — are more likely to see it and vote, so 71% almost certainly overstates support. 这是自愿回应偏差,方向可预测。Voluntary response bias, with a predictable direction.
- 问题二:还有覆盖不全Problem 2: undercoverage 投票只发生在网上:不上网、不关注该媒体、没有账号的人根本不在抽样框里。这些人恰恰可能是最需要图书馆的人。The poll lives online: people who are offline, ignore the outlet, or lack an account are absent from the frame — and they may be exactly the people who need the library most. 覆盖不全 + 自愿回应,两道关口各自引入偏差。Undercoverage plus self-selection: two gates, two biases.
- 问题三:±1% 是错用了公式Problem 3: ±1% misapplies a formula \(1/\sqrt{18642}\approx 0.7\%\) 只对简单随机样本成立。自愿回应样本的偏差不能用这个公式度量,也不能用增加样本量来缩小。\(1/\sqrt{18642}\approx 0.7\%\) holds only for a simple random sample. The bias of a self-selected poll is neither measured by that formula nor reduced by more respondents. \[ \frac{1}{\sqrt{18\,642}}\approx 0.0073 \] 数字算得没错,用错了对象。The arithmetic is right; the object is wrong.
- 结论怎么写才拿分How to write it for credit 标准句式:“由于这是自愿回应样本,结果存在偏差,不能代表全体居民;增大样本量只会更精确地估计参与者(而非总体)的观点,无法消除偏差。要得到有代表性的结果,应使用随机抽样并报告基于概率样本的误差范围。”Model sentence: "Because this is a voluntary response sample, the result is biased and cannot represent all residents; a larger sample only estimates the participants' views more precisely, not the population's. A representative result requires random sampling and a margin of error based on a probability sample." “偏差不能靠样本量解决”是这一讲的终极考点。"Bias is not cured by sample size" is the ultimate tested idea of this lecture.
本讲小结Summary
- 总体是你想知道的全部对象,样本是你实际量到的一部分,普查是把总体量一遍。样本结果只对它覆盖到的那群人负责。
- SRS 的定义落在样本组合上:任意 n 个人组成的一组机会相等。“每个人机会相等”不够,“随机抽 5 男 5 女”不是 SRS。
- 抽 SRS 的两步是标号(等长、从 01 起)与读表(越界跳过、重复跳过);计算器用
randIntNoRep。 - 分层层内同质、层间异质,每层都抽,精度更高;整群群内异质、群间同质,抽中整群全查,省成本但精度更低。
- 四种偏差:undercoverage(根本抽不到)、nonresponse(抽到不应答)、response bias(答得不真实)、wording(问法影响答案)。系统抽样怕周期,方便与自愿回应几乎必然有偏。
- 偏差让分布整体搬家,变异性让分布变宽变窄。样本量只能治后者;\(1/\sqrt{n}\) 缩小的是误差范围,不是偏差。
- The population is everyone you want to know about; a sample is the part you measure; a census measures everyone. A sample result speaks only for whom it covers.
- An SRS is defined on sets: every set of n is equally likely. "Each individual equally likely" is not enough, and "5 males and 5 females" is not an SRS.
- Drawing an SRS means label (equal length, starting at 01) then read (skip out-of-range, skip repeats); on a calculator use
randIntNoRep. - Stratified: similar within, different between, sample every stratum — more precise. Cluster: different within, similar between, measure chosen clusters whole — cheaper but less precise.
- Four biases: undercoverage, nonresponse, response bias, wording. Systematic sampling fears periodicity; convenience and voluntary response are almost surely biased.
- Bias shifts the distribution; variability widens or narrows it. Sample size fixes only the second; \(1/\sqrt{n}\) shrinks the margin of error, not the bias.
实验设计:怎样证明“是它造成的”Experiments: How to Prove That It Caused It
第 9 讲解决“数据从谁那里来”,这一讲解决“数据是怎么被制造出来的”。观察性研究只能告诉你两件事相关;只有随机分配的实验才有资格说一件事造成了另一件事。这一讲给你一套可以照着写的设计流程:比较、随机、对照、重复,再加上区组、配对、安慰剂与盲法。
Lecture 9 asked whom the data come from; this lecture asks how the data were made. An observational study can only report that two things are associated; only an experiment with random assignment can say that one thing caused another. You get a design recipe you can write out on an exam: compare, randomise, control, replicate — plus blocking, matching, placebos and blinding.
本讲学习目标Learning Objectives
- 区分观察性研究与实验,并说清为什么只有后者能支持因果结论;分清回顾性与前瞻性观察研究。
- 定义潜变量没有被列入研究的第三个变量,它可能同时影响解释变量与响应变量,从而制造出一个虚假的关联。A third variable outside the study that may influence both the explanatory and the response variable, creating an association that is not causal.与混杂,并用“消防员越多、损失越大”这个例子说明混杂如何伪造因果。
- 使用实验的语言:实验单元 / 受试者、处理、因子、水平、响应变量,并数清一个多因子实验共有多少种处理。
- 说出并应用实验设计的四条原则:比较、随机分配、对照、重复。
- 设计三种常见方案:完全随机化设计、随机区组设计、配对设计,并说明区组是在“随机之前”先分组。
- 解释安慰剂效应、单盲 / 双盲与统计显著性,并说明随机化为什么能把混杂变量“平均掉”。
- Distinguish an observational study from an experiment, and explain why only the latter supports causal claims; tell retrospective from prospective studies.
- Define a lurking variableA third variable outside the study that may influence both the explanatory and the response variable, creating a non-causal association.研究之外、可能同时影响解释变量与响应变量的第三个变量,会制造虚假关联。 and confounding, using the "more firefighters, more damage" example.
- Use the language of experiments: experimental units / subjects, treatment, factor, level, response variable, and count the treatments in a multi-factor experiment.
- State and apply the four principles of design: comparison, random assignment, control, replication.
- Design a completely randomised design, a randomised block design and a matched pairs design, noting that blocking happens before randomisation.
- Explain the placebo effect, single / double blinding and statistical significance, and why randomisation "averages out" confounding variables.
核心概念Core Concepts
10.1 观察还是干预:谁有资格谈因果10.1 Observe or Intervene: Who May Speak of Cause
观察性研究看,实验动。只有当研究者主动施加某种处理、并用随机决定谁接受哪种处理时,才有资格说“是它造成的”。
An observational study watches; an experiment acts. Only when the researcher imposes a treatment and uses chance to decide who gets which one may we say that a treatment caused the response.
先给两个定义。观察性研究只观察个体、测量感兴趣的变量,不试图影响任何人的分组或行为。A study that observes individuals and measures variables of interest without attempting to influence the responses.观察个体、测量变量,但不干预谁属于哪一组;实验研究者主动对实验单元施加某种处理,再测量响应。只有实验能建立因果关系。A study in which the researcher deliberately imposes a treatment on experimental units and measures the response; only experiments establish causation.则主动施加处理。看似只差一个动作,后果却是天壤之别:观察性研究里“谁接受处理”是人自己或环境决定的,这个决定本身可能就与结果有关。
Two definitions first. An observational study watches individuals and measures variables without influencing who belongs to which group; an experiment deliberately imposes a treatment. The difference looks like one small action, but the consequence is enormous: in an observational study who receives the treatment is decided by people or circumstances, and that decision may itself be related to the outcome.
| 比较项Aspect | 观察性研究 Observational studyObservational study | 实验 ExperimentExperiment |
|---|---|---|
| 研究者做什么Researcher… | 只观察、测量、记录observes, measures and records only | 主动施加处理(treatment)deliberately imposes a treatment |
| 谁决定分组Who assigns groups | 个体自己 / 医生 / 习惯 / 环境individuals, doctors, habit or circumstance | 研究者用随机机制分配the researcher, using chance |
| 能得出的结论Conclusion | 相关(association)association | 因果(cause and effect)cause and effect |
| 最大威胁Main threat | 潜变量 / 混杂lurking variables, confounding | 设计不当(缺对照、未随机、样本太小)poor design: no control, no randomisation, too few units |
| 常见理由Why still used | 更便宜、更快、能看长期效应;有时做实验不道德cheaper, faster, captures long-term effects; sometimes an experiment would be unethical | 唯一能确立因果的设计the only design that establishes causation |
一项研究发现:学音乐的学生平均 GPA 3.59,不学的 2.91。研究者没有把学生随机分到“学音乐 / 不学音乐”两组,只是观察了他们已有的选择。学音乐的家庭往往更重视教育、收入更高、学校资源更好——这些条件同时提高了“学音乐的概率”和“GPA”。所以正确的结论只能是“学音乐与更高 GPA 相关”。
A study finds music students average 3.59 GPA versus 2.91 for others. Nobody assigned students to music; their choices were merely observed. Families who choose music tend to value education, earn more and attend better-resourced schools — factors that raise both the chance of studying music and the GPA. The honest conclusion is "music study is associated with higher GPA".
10.2 潜变量与混杂:消防员越多,损失越大?10.2 Lurking Variables and Confounding: More Firefighters, More Damage?
两个变量一起变大,不等于一个造成另一个。常常是第三个变量在背后同时推动它们——这个“看不见的推手”就是潜变量。
Two variables rising together does not mean one causes the other. Often a third variable pushes both from behind — that invisible hand is a lurking variable.
某市的数据显示:派往火场的消防员越多,火灾造成的损失越大。难道消防员在放火?当然不是。真正的原因是火势的严重程度:火越大,需要派的消防员越多,造成的损失也越大。火势没有被列入研究,却同时影响了 X(消防员人数)与 Y(损失),这就是典型的共同响应一个未被研究的变量同时影响解释变量与响应变量,使两者呈现出并非因果的关联。An unstudied variable that affects both the explanatory and the response variable, producing an association that is not causal.。
City data show that the more firefighters sent to a fire, the greater the damage. Are firefighters starting fires? No. The real driver is the seriousness of the fire: bigger fires need more firefighters and cause more damage. Fire severity was never in the study, yet it moves both X (firefighters) and Y (damage) — the classic pattern of common responseAn unstudied variable affecting both the explanatory and the response variable, creating a non-causal association.一个未被研究的变量同时影响解释变量与响应变量,制造出非因果的关联。.
潜变量 Lurking variableLurking variable
没有被列入研究(因为不知道、被低估或无法测量),却可能显著影响你对另外两个变量关系的解读。
Not among the explanatory or response variables (unknown, underestimated or unmeasurable), yet it can substantially change how you read the relationship between the other two.
例火势严重程度、家庭收入、气温
e.g.fire severity, family income, temperature
混杂 ConfoundingConfounding
两个变量与响应变量的关系纠缠在一起,无法分清各自的效果。混杂是“结果层面的描述”,潜变量是“变量层面的描述”。
Two variables are tangled so that their separate effects on the response cannot be distinguished. Confounding describes the situation; a lurking variable is the culprit.
判断两组人除了处理之外,还有别的系统差别 → 混杂。
TestDo the groups differ systematically in anything besides the treatment? Then it is confounded.
“相关”被写成“导致”。看到“A 越高,B 越高”就写“A 导致 B”,是 AP 阅卷里最常见的零分句式。正确的写法永远先问一句:有没有第三个变量同时影响 A 和 B?如果有,就只能说相关,并明确指出那个潜变量是什么。
Writing "causes" where only "is associated with" is earned. Turning "higher A goes with higher B" into "A causes B" is the single most common zero-credit sentence on the AP exam. Always ask first: is there a third variable driving both? If so, report association and name that variable.
10.3 实验的语言:单元、处理、因子、水平10.3 The Language of Experiments: Units, Treatments, Factors, Levels
做实验题的第一步是把谁、对他做什么、量什么三件事分开写。数处理种数时用乘法:各因子水平数相乘。
The first move in any experiment question is to separate who, what is done to them and what is measured. Count treatments by multiplying: the number of levels of each factor.
看一个具体的例子。园艺师有 24 株相似的番茄苗、同样的花盆,想研究“加不加肥料”与“每天浇多少水”对产量的影响:一半加肥料,一半不加;每 8 株分别浇 0.5、1、1.5 加仑。这里有两个因子(肥料、水量),第一个有 2 个水平,第二个有 3 个水平,所以共有 \(2\times3=6\) 种处理。
A concrete case. A gardener has 24 similar tomato plants in identical pots and wants to know how fertiliser and daily water affect yield: half get fertiliser, half do not; each set of 8 plants receives 0.5, 1 or 1.5 gallons. There are two factors (fertiliser, water) with 2 and 3 levels, so there are \(2\times3=6\) treatments.
| 术语Term | 定义Definition | 在本例中In this example |
|---|---|---|
| 实验单元 experimental unit | 接受处理的最小个体;当单元是人时称为受试者(subject)the smallest individual to which a treatment is applied; human units are called subjects | 24 株番茄苗the 24 tomato plants |
| 因子 / 解释变量 factor | 研究者主动操纵的变量a variable the researcher manipulates | 是否施肥、每日水量fertiliser, water amount |
| 水平 level | 一个因子取的具体值a specific value of a factor | 施肥 / 不施肥;0.5 / 1 / 1.5 加仑fertiliser / none; 0.5 / 1 / 1.5 gal |
| 处理 treatment | 各因子水平的一种组合a combination of one level of each factor | “施肥 + 0.5 加仑”等 6 种six combinations, e.g. "fertiliser + 0.5 gal" |
| 响应变量 response variable | 用来衡量处理效果的变量the variable that measures the outcome | 三个月内每株的番茄总重量total tomato weight per plant after three months |
10.4 让比较公平:比较、随机、对照、重复10.4 Making the Comparison Fair: Compare, Randomise, Control, Replicate
好的实验只允许一个东西在两组之间系统性地不同:处理。做到这件事靠四件事——比较、随机分配、对照、重复。
A good experiment allows exactly one thing to differ systematically between groups: the treatment. Four moves achieve it — comparison, random assignment, control, replication.
randInt, a random-digit table — to decide who goes where. It does not make groups identical; it makes every difference between them random noise.四条原则里,随机分配最容易被误解,也最关键。它的作用不是“让两组完全一样”,而是“让所有没被控制住的变量——包括你不知道的——在两组之间大致平衡”。基线严重度、年龄、作息、性格,全都被打散。样本越大,平衡得越好。
Of the four, random assignment is the most misunderstood and the most important. It does not make the groups identical; it makes every uncontrolled variable — including ones you never thought of — roughly balanced between them. Baseline severity, age, sleep habits, temperament: all get shuffled. The larger the sample, the better the balance.
下面这个三维模型把同一个想法放到三个维度里看:每个点是一个实验单元,三个坐标是年龄、基线严重度、基线响应。随机分配之后,红色(处理组)与蓝色(对照组)在每一维上都混在一起,没有一个角落被某一组独占。这正是“把混杂变量平均掉”的几何含义。
The 3-D model below puts the same idea in three dimensions: each dot is a unit, with age, baseline severity and baseline response as coordinates. After random assignment, red (treatment) and blue (control) are interleaved along every axis; no corner is owned by either group. That is what "averaging out the confounders" looks like in geometry.
randIntNoRep(1, 24) → 取前 12 个编号 → 新肥料组;其余 12 株 → 对照组
randIntNoRep(1, 24) → 前 4 个 → 处理 1;第 5–8 个 → 处理 2;……
10.5 三种设计:完全随机、区组、配对10.5 Three Designs: Completely Randomised, Blocked, Matched Pairs
区组=先分组,再在组内随机;配对是最小的区组(每组只有两个相似单元)。区组不是为了消除偏差,而是为了消除一个已知的、与响应有关的变量带来的变异性。
Blocking means grouping first, randomising inside; matched pairs is the smallest block (two similar units). Blocking does not remove bias — it removes variability caused by a known variable related to the response.
为什么要在随机之前先分组?因为有些差异你控制不了,却知道它会影响结果。比如性别、年龄、病情严重程度:你不能把一个人变成另一个性别,但你可以在每个性别内部分别随机分配处理。这样一来,处理组与对照组的性别构成自动相同,性别带来的波动就被“挡在比较之外”了。
Why group before randomising? Because some differences cannot be controlled yet are known to matter: sex, age, disease severity. You cannot change a person's sex, but you can randomise within each sex. Then the treatment and control groups automatically have the same sex mix, and the variation due to sex is kept out of the comparison.
| 设计Design | 怎么做How it works | 什么时候用When to use it |
|---|---|---|
| 完全随机化 completely randomised | 所有单元一次性随机分到各处理组all units are assigned to treatments by chance in one step | 单元彼此相似、没有明显的“必须平衡”的变量units are similar and no variable obviously needs balancing |
| 随机区组 randomised block | 先把单元按已知会影响响应的变量分成若干同质区组,在每个区组内随机分配first split units into homogeneous blocks by a known response-related variable, then randomise within each block | 存在一个你想“消掉”的变异来源(性别、年龄段、地块位置)there is a source of variation you want to remove (sex, age band, field position) |
| 配对 matched pairs | 每两个相似单元组成一“块”,随机决定谁接受哪种处理;也可以是同一个体先后接受两种处理(顺序随机)pair similar units into blocks of two and randomly decide who gets which; one unit may also take both treatments in random order | 只比较两种处理,且能找到高度相似的配对comparing exactly two treatments and close matches exist |
它们长得像,但用在不同的地方。分层抽样是抽样阶段的事:把总体切成层,每层抽一点,提高估计的精度。区组设计是实验阶段的事:把实验单元切成区组,每区内随机分配,提高比较的精度。共同点是都利用“组内相似”来消掉变异。
They look alike but live in different stages. Stratifying belongs to sampling: cut the population into strata and sample each, improving the precision of an estimate. Blocking belongs to experiments: cut units into blocks and randomise inside, improving the precision of a comparison. Both exploit "similar within".
把“随机分配”和“随机抽样”混为一谈。随机抽样决定“谁能进入研究”,它让结果可以推广到总体;随机分配决定“进入研究的人接受哪种处理”,它让结论可以谈因果。两个都做,才既可推广又有因果。看到题目问“这个结论能否推广到全体学生”,答案取决于抽样;问“能否说明因果”,取决于分配。
Confusing random assignment with random sampling. Random sampling decides who enters the study (generalisation); random assignment decides which treatment they receive (causation). Do both and the result is both generalisable and causal. "Can this be generalised to all students?" is answered by sampling; "Does it show cause and effect?" by assignment.
10.6 安慰剂、盲法与统计显著性10.6 Placebos, Blinding and Statistical Significance
人会因为“以为自己被治疗了”而真的好转——这叫安慰剂效应。要把它从真实药效里剥出来,需要安慰剂 + 盲法:让受试者与评估者都不知道谁吃了真药。
People really do improve because they believe they are being treated — the placebo effect. To separate it from a genuine drug effect you need a placebo plus blinding: neither the subjects nor the evaluators know who received the real treatment.
安慰剂是一颗“看起来、尝起来都和真药一样,但没有有效成分”的药。它让对照组的心理预期与处理组相同,于是两组的差别只剩“有效成分”。单盲是受试者不知道自己在哪组;双盲是受试者与评估者都不知道。双盲能同时挡住两种偏差:受试者的心理作用,和评估者“我希望新药有效”的无意识偏袒。
A placebo looks and tastes exactly like the real medicine but contains no active ingredient. It gives the control group the same psychological expectation, leaving only the active ingredient as a difference. Single-blind: subjects do not know their group. Double-blind: neither subjects nor evaluators do. Double blinding blocks two biases at once — the subject's expectation and the evaluator's unconscious wish to see the new drug work.
最后,实验结果要回答一个很实际的问题:这点差别会不会只是运气?如果处理组与对照组的差异大到“如果只靠运气几乎不可能出现”,我们就称它统计显著观察到的效应大到在“只有随机波动”的假设下很少发生。设计良好的实验中,统计显著的关联可以支持因果结论。An observed effect so large that it would rarely occur by chance alone. In a well-designed experiment, a statistically significant association does support causation.。注意:显著性靠的是效应大小 ÷ 随机波动,而随机波动由样本量与设计共同决定。
Finally, the practical question: could this difference be luck? If the gap between groups is so large that chance alone would rarely produce it, we call it statistically significantAn observed effect so large that it would rarely occur by chance alone; in a well-designed experiment it supports causation.在“只有随机波动”的假设下很少出现的、足够大的效应;设计良好的实验中可以支持因果结论。. Significance is the ratio of effect size to random noise, and the noise is set by sample size and design.
实验设计的全部野心,就是让两组只在处理上不同。比较造出两组,随机让两组可比,对照让其余变量不动,重复让“运气”变小。区组与配对则是把已知的变异提前拿走。
The whole ambition of design is to make the groups differ only in the treatment. Comparison creates the groups, randomisation makes them comparable, control freezes everything else, replication shrinks luck. Blocking and matching remove a known source of variation in advance.
例题精讲Worked Examples
例 1 番茄实验:把语言、原则、设计一次写完Example 1 The tomato experiment: language, principles and design in one answer
(a) 指出实验单元、两个因子及其水平、全部处理、响应变量。
(b) 说明如何用完全随机化设计分配这 24 株,并写出随机化的具体操作。
(c) 指出这个实验中“对照”和“重复”分别体现在哪里。 A gardener has 24 similar tomato plants in identical pots and wants to study fertiliser (yes/no) and daily water (0.5 / 1 / 1.5 gal), weighing total tomato yield after three months.
(a) Identify the experimental units, both factors and their levels, all treatments, and the response.
(b) Describe a completely randomised design and the exact randomisation step.
(c) Point out where control and replication appear.
- 先写“谁”。实验单元是 24 株番茄苗(不是花盆,也不是番茄果实);因为单元不是人,所以不叫“受试者”。 Who first. The experimental units are the 24 plants — not the pots, not the tomatoes. Since they are not people, we do not call them subjects.
- 再写“因子与水平”。因子一:肥料,2 个水平(施肥 / 不施肥);因子二:水量,3 个水平(0.5 / 1 / 1.5 加仑)。响应变量:每株三个月内的番茄总重量。 Then factors and levels. Factor 1: fertiliser, 2 levels (yes / no). Factor 2: water, 3 levels (0.5 / 1 / 1.5 gal). Response: total tomato weight per plant over three months.
- 处理数是乘出来的,不是数出来的。\(2\times3=6\) 种处理:施肥×0.5、施肥×1、施肥×1.5、不施肥×0.5、不施肥×1、不施肥×1.5。每种处理分到 4 株(24 ÷ 6 = 4)。 Treatments multiply. \(2\times3=6\): fertiliser×0.5, ×1, ×1.5 and no-fertiliser×0.5, ×1, ×1.5. Each treatment gets 4 plants (24 ÷ 6 = 4). \[ \text{treatments}=2\times3=6,\qquad 24/6=4\ \text{plants each} \]
- 随机化的写法要具体到工具。把 24 株编号 01–24,用
randIntNoRep(1,24)打乱顺序;前 4 个编号分到处理 1,第 5–8 个分到处理 2,依此类推。整个过程由运气决定谁去哪一组,而不是按位置、按长势挑。 Name the tool. Label the plants 01–24, shuffle withrandIntNoRep(1,24), then assign the first four labels to treatment 1, the next four to treatment 2, and so on. Chance — not position or apparent health — decides who goes where. - (c) 对照与重复。对照:同样的花盆、同样的土壤、同样的温室位置与光照、同样的测量方法;只有肥料与水量不同。重复:每种处理有 4 株,一共 24 个单元——这样某一株的“运气”不至于被当成处理的效果。 (c) Control and replication. Control: identical pots, soil, greenhouse position, light and measurement; only fertiliser and water differ. Replication: four plants per treatment, 24 units in all, so one plant's luck is not mistaken for a treatment effect.
randIntNoRep 打乱后每 4 个一组分入 6 种处理。(c) 对照=花盆、土壤、光照等保持相同;重复=每种处理 4 株。
(a) Units = the 24 plants; factors = fertiliser (2 levels) and water (3 levels); treatments = the 6 combinations; response = total tomato weight. (b) Label 01–24, shuffle with randIntNoRep, assign blocks of four to the six treatments. (c) Control = identical pots, soil and light; replication = four plants per treatment.
例 2 皮肤病药膏:区组与配对怎么写Example 2 Skin creams: writing a blocked design and a matched pairs design
(a) 说明如何做随机区组设计,并指出区组变量。
(b) 如果只想比较两种药膏、而且每位受试者左右手臂的病情相近,可以怎样做配对设计?
(c) 区组“减少了什么”?它有没有消除混杂? A researcher compares four skin creams using 90 subjects whose disease severity varies, and severity is known to affect recovery.
(a) Describe a randomised block design and name the blocking variable.
(b) If only two creams were compared and each subject's left and right arms were similarly affected, how would a matched pairs design work?
(c) What does blocking reduce — and does it remove confounding?
- (a) 先分区组。按严重程度把 90 人分成 3 个区组(重度 / 中度 / 轻度),每组 30 人。区组必须在随机之前形成,而且区组变量要与响应有关——这里正是“病情严重程度”。 (a) Block first. Split the 90 subjects into three blocks by severity (severe / moderate / mild), 30 each. Blocks must exist before randomisation, and the blocking variable must relate to the response — here, severity.
- (a) 再在区组内随机。在每个区组内部,把 30 人随机分成 4 组(例如用
randIntNoRep(1,30)排序后切 4 段),分别接受四种药膏。这样每种药膏在“重度 / 中度 / 轻度”里的人数都相同,严重程度就不再是解释差异的借口。 (a) Randomise within. Inside each block, randomly split the 30 into four groups (e.g. shuffle withrandIntNoRep(1,30)and cut into four) and give each group a different cream. Every cream now has the same severe/moderate/mild mix, so severity can no longer explain a difference. - (b) 配对的做法。对每位受试者,把左右手臂随机指定为“药膏 A / 药膏 B”(例如抛硬币)。同一人两臂的病情、体质、作息几乎相同,等于把“人”这个最大的变异来源整个消掉,比较的是同一人身上的差异。 (b) Matching. For each subject, randomly assign left/right arms to cream A or B (a coin flip will do). Both arms share the same person, so the largest source of variation — the person — is eliminated and the comparison is within-subject.
- (c) 区组减少了什么。它减少的是变异性:区组之间的差异(重度 vs 轻度)被移出比较,剩下的差异更小,于是更容易看出药膏之间真正有没有差别。它没有消除混杂——如果还有一个未知变量同时影响分组与恢复,只有随机分配能对付它。 (c) What blocking buys. It reduces variability: differences between blocks (severe vs mild) leave the comparison, so a real difference between creams is easier to see. It does not remove confounding — only random assignment handles an unknown variable that affects both group and recovery.
随堂练习Check Your Understanding
先自己选,再点“查看解答”。每题都给出考点、逐步推理与错误选项诊断——错也要错得明白。 Choose first, then reveal. Every question comes with the tested idea, step-by-step reasoning and a diagnosis of each wrong option.
研究者比较“中学时学过音乐”与“没学过音乐”的两组学生,回溯查阅他们的高中成绩,发现学音乐组平均 GPA 更高。这项研究属于
Researchers compare students who did and did not study music in secondary school, looking back at their high-school records, and find higher GPAs among music students. This study is
- a实验,因为研究者比较了两组an experiment, because two groups are compared
- b前瞻性观察研究,因为成绩是后来才收集的a prospective observational study, because grades were collected later
- c回顾性观察研究,因为没有分配谁学音乐a retrospective observational study, because nobody was assigned to study music
- d配对实验,因为学生被两两配对a matched pairs experiment, because students were paired
- 问“谁决定了分组”Ask who decided the groups 学不学音乐是学生与家庭自己的选择,研究者只是事后按这个已有事实分组。Whether to study music was chosen by students and families; the researchers merely grouped people by an existing fact. 没有干预 → 观察性研究,排除 a、d。No intervention → observational; a and d are out.
- 再问“时间往哪走”Then ask which way time runs 研究者先找到“学过音乐”的人,再回看他们过去的成绩——由结果回望过去,是回顾性。若先选人、再跟踪未来成绩,才叫前瞻性。They first identified music students, then looked back at past grades: from outcome back to exposure, which is retrospective. Selecting people now and following them forward would be prospective. 答案是回溯性观察研究。A retrospective observational study.
| 选项Option | 判断与理由Verdict & reason |
|---|---|
| a | 错。“有比较”不等于“是实验”,关键是分配方式。Wrong: comparing groups is not enough; assignment is what matters. |
| b | 错。时间方向反了:这里是回看过去。Wrong: the direction is backwards — past records were examined. |
| c | 对。没有分配处理,且由结果回溯原因。Correct: no treatment assigned, and outcomes were traced backwards. |
| d | 错。配对要求研究者主动构造相似对子并随机分配,这里都没有。Wrong: matching requires the researcher to form pairs and randomise — neither happened. |
一项观察研究发现:每天打高尔夫的人寿命更长。媒体据此报道“打高尔夫延年益寿”。下列哪一项最可能是解释这一关联的潜变量?
An observational study finds that people who play golf daily live longer. Media report "golf extends life". Which is the most likely lurking variable explaining the association?
- a寿命长短length of life
- b是否每天打高尔夫whether one plays golf daily
- c收入水平与医疗服务income and access to medical care
- d这项研究的样本量the sample size of the study
- 画出三条边Draw the three edges 收入高 → 更有钱、有时间每周打球;收入高 → 更好的医疗、更好的营养,从而更长寿。两条路径都成立。Higher income → more money and leisure to play daily; higher income → better medical care and nutrition, hence longer life. Both paths exist. 它可能单独解释掉全部“延寿”效应。It may explain the entire "longevity" effect on its own.
- 为什么不能靠“大样本”解决Why a big sample cannot help 样本再大,也只是更精确地估计“打球者活得更久”这个事实,而无法把收入的影响从打球里剥出来——那需要随机分配谁去打球。A larger sample estimates "golfers live longer" more precisely but still cannot separate income from golf — that needs random assignment to golf. 观察性研究的混杂不能靠数量解决,只能靠设计解决。Confounding in an observational study is solved by design, not by sample size.
| 选项Option | 判断与理由Verdict & reason |
|---|---|
| a | 错。寿命是响应变量,被解释的对象。Wrong: longevity is the response, the thing being explained. |
| b | 错。打不打球是解释变量。Wrong: golf is the explanatory variable. |
| c | 对。同时影响“是否打球”和“是否长寿”,符合潜变量定义。Correct: it affects both golf and longevity — a textbook confounder. |
| d | 错。样本量影响精度,不制造关联。Wrong: sample size affects precision, not the existence of an association. |
某农资公司想比较三种肥料 A、B、C 对作物产量的影响,有 15 块相似的田地,每块用一种肥料。
下列设计步骤中,哪一项最不恰当?
A company compares three fertilisers A, B, C on 15 similar plots, one fertiliser per plot. Which step is least appropriate?
- a把 15 块地编号 01–15,用
randIntNoRep打乱后每 5 块分给一种肥料Label plots 01–15, shuffle withrandIntNoRep, give five plots to each fertiliser - b15 块地都种同一种作物、同时播种、同样灌溉Plant the same crop, sow at the same time, irrigate identically
- c把阳光最好、土质最肥的 5 块地留给最有希望的新肥料 AGive the sunniest, richest five plots to the most promising fertiliser A
- d记录每块地的单位面积产量作为响应变量Record yield per unit area on each plot as the response
- 先看哪一步破坏了可比性Which step destroys comparability c 让肥料 A 同时拥有“阳光最好、土质最肥”的优势。即使 A 产量最高,你也分不清是肥料好还是地好——这就是混杂。(c) gives A both the best sunlight and the richest soil. Even if A yields most, you cannot tell fertiliser from land — confounding. c 最不恰当(而且是致命的)。(c) is the least appropriate — and fatal.
- 确认其他三项都对应一条原则Check the others against the principles a 是随机分配(randIntNoRep 给出真正由机会决定的分组);b 是控制(同样的作物、播期、灌溉,只让肥料不同);d 是定义响应变量。(a) is random assignment; (b) is control (same crop, sowing date, irrigation); (d) defines the response variable. a、b、d 都是正例,只有 c 反其道而行。(a), (b), (d) are all correct practice; only (c) inverts it.
| 选项Option | 判断与理由Verdict & reason |
|---|---|
| a | 恰当。这就是完全随机化设计的标准操作。Appropriate: standard completely randomised assignment. |
| b | 恰当。这是 control:把其他变量固定住。Appropriate: control — everything else held constant. |
| c | 不恰当。地力与肥料效果混杂,结论无法归因于肥料。Inappropriate: land quality is confounded with fertiliser, so no attribution is possible. |
| d | 恰当。明确响应变量是设计的一部分。Appropriate: naming the response is part of the design. |
某公司要测试“新肥料 vs 现有肥料”,选了 10 块分散在全县的 2 英亩田地。每块地被分成两半,一半施新肥料、一半施现有肥料,种小麦后比较产量。
(a) 这是什么设计?随机化发生在哪里?
(b) 为什么把每块地劈成两半,而不是随机挑 5 块地施新肥料?
(c) 如果在两块相邻的地上分别施两种肥料,会有什么问题?
A company tests a new fertiliser against the current one on ten 2-acre plots scattered across the county. Each plot is split in half — one half new, one half current — and wheat yields are compared.
(a) What design is this, and where does randomisation occur?
(b) Why split each plot instead of randomly choosing five whole plots for the new fertiliser?
(c) What goes wrong if the two fertilisers are applied to two adjacent whole plots instead?
- (a) 命名设计与随机化位置(a) Name it and locate the randomness
每块地自带一对“相似单元”(两半),是配对设计(也可看成以田地为区组的随机区组设计)。随机化发生在每块地内部:抛硬币或
randInt(1,2)决定左半还是右半用新肥料。Each plot supplies its own pair of similar units — a matched pairs design (equivalently, a randomised block design with plots as blocks). Randomisation happens within each plot: a coin flip orrandInt(1,2)decides which half gets the new fertiliser. 配对 + 每对内部随机。Matched pairs with randomisation inside each pair. - (b) 为什么要劈成两半(b) Why split 同一块地的土壤、坡度、光照、地下水位几乎相同。劈成两半后,两半之间的差异主要只剩肥料;而两块不同的地之间差异可能很大(土质、日照),会盖过肥料的效果。这就是“消掉一个已知变异来源”。Two halves of one plot share soil, slope, light and water table. After splitting, the only real difference is the fertiliser; between two whole plots, differences in soil and sun may swamp the treatment effect. That is removing a known source of variation. 配对提高了精度,让真实效果更容易显形。Matching raises precision so a real effect can show.
- (c) 相邻整块的问题(c) The adjacent-plot problem 两块相邻地在土质、水分上高度相关,若“新肥料恰好落在地力更好的那一块”,肥料效果与地力效果就混杂了;只做一次也缺乏重复,无法判断差异是不是运气。Neighbouring plots share soil and moisture; if the new fertiliser happens to land on the better plot, fertiliser and land quality are confounded. One run also lacks replication, so luck cannot be ruled out. 同质配对 + 内部随机 + 多处重复,才是完整答案。Homogeneous pairs, randomisation inside, and replication across plots — the complete answer.
本讲小结Summary
- 观察性研究只观察、不干预,只能说明相关;实验主动施加处理,配合随机分配才能谈因果。
- 潜变量是研究之外、同时影响 X 与 Y 的第三个变量;混杂指两个变量的效果纠缠到分不清。消防员与火灾损失就是经典案例。
- 实验语言:单元 / 受试者、因子、水平、处理、响应变量;处理种数=各因子水平数相乘。
- 四原则:比较(至少两组)、随机分配(用机会分组)、对照(其余变量固定)、重复(每组足够多单元)。
- 完全随机化一次分完;区组先按已知变量分组、再组内随机;配对是最小的区组(两个相似单元或同一人两次处理)。
- 安慰剂效应靠安慰剂 + 双盲剥离;统计显著指效应大到不像运气。区组与配对减小变异性,随机分配负责平衡混杂。
- An observational study only observes and supports association; an experiment imposes a treatment and, with random assignment, supports causation.
- A lurking variable sits outside the study and moves both X and Y; confounding means their effects cannot be separated. Firefighters and fire damage is the classic case.
- Language: units / subjects, factor, level, treatment, response; the number of treatments is the product of the numbers of levels.
- Four principles: comparison, random assignment, control, replication.
- Completely randomised assigns in one step; blocking groups first, then randomises inside; matched pairs is the smallest block (two similar units, or one unit twice).
- The placebo effect is removed with a placebo and double blinding; statistical significance means the effect is too large for luck. Blocking and matching reduce variability; random assignment balances confounders.
概率法则:随机性到底长什么样Probability Rules: What Randomness Actually Looks Like
第 10 讲最后留下一个问题:“处理组和对照组的差别,会不会只是运气?”要回答它,先得把“运气”变成一个可以计算的数。这一讲建立概率模型、样本空间、补事件与加法法则,学会从双向表和维恩图里读出概率,并用随机数字或 randInt 做模拟。
Lecture 10 ended with a question: could the difference between treatment and control be luck? To answer it, luck must first become something computable. This lecture builds probability models, sample spaces, complements and the addition rule, reads probabilities off two-way tables and Venn diagrams, and imitates chance with random digits and randInt.
本讲学习目标Learning Objectives
- 用长期频率解释概率,并识破两个关于随机性的迷思:短期规律(热手)与“平均法则”(赌徒谬误)。
- 写出一个概率模型对一个随机过程的完整描述,包含两部分:样本空间 S(所有可能结果)以及每个结果的概率。必须满足每条概率在 0 与 1 之间,且总和为 1。A complete description of a chance process: a sample space S plus a probability for each outcome. Every probability lies between 0 and 1 and they sum to 1.的两个条件,并判断一组概率是否合法。
- 区分事件、补事件、并集、交集,并用补事件法则处理“至少一个”型问题。
- 使用加法法则 \(P(A\cup B)=P(A)+P(B)-P(A\cap B)\),并说清互斥(disjoint)与独立(independent)不是一回事。
- 从双向表读出联合、边际与并集概率,并用维恩图检查自己的计算。
- 按四步法(State / Plan / Do / Conclude)用随机数字或
randInt完成一次模拟,并理解模拟的精度随重复次数提高。
- Explain probability as a long-run frequency, and see through two myths: short-run regularity (the hot hand) and the "law of averages" (gambler's fallacy).
- Write the two conditions of a probability modelA sample space S plus a probability for each outcome; every probability is between 0 and 1 and they sum to 1.样本空间 S 加上每个结果的概率;每条概率在 0 与 1 之间且总和为 1。, and decide whether a proposed set of probabilities is legitimate.
- Distinguish an event, its complement, a union and an intersection, and use the complement rule for "at least one" problems.
- Apply the addition rule \(P(A\cup B)=P(A)+P(B)-P(A\cap B)\), and explain why disjoint is not the same as independent.
- Read joint, marginal and union probabilities from a two-way table, and check them with a Venn diagram.
- Run a simulation with random digits or
randIntusing the four-step process (State / Plan / Do / Conclude), and explain why more repetitions improve precision.
核心概念Core Concepts
11.1 概率是长期频率,不是短期预言11.1 Probability Is a Long-Run Frequency, Not a Short-Run Forecast
概率描述的是“重复很多很多次之后,某个结果出现的比例”。它对下一次几乎什么也没说——短期不可预测,长期才稳定。
A probability describes the proportion of times an outcome occurs after very many repetitions. It says almost nothing about the next trial — unpredictable in the short run, stable in the long run.
抛一枚公平硬币,正面概率 0.5。这句话的意思不是“每两次一定一次正面”,而是“抛一万次,正面比例会非常接近 0.5”。大数定律随着重复次数增加,某个结果出现的比例会越来越接近它的概率。As the number of repetitions grows, the proportion of times an outcome occurs approaches its probability.保证的是比例的收敛,而不是次数的配平。连抛 5 次都是正面之后,第 6 次正面的概率仍然是 0.5——硬币没有记忆。
A fair coin has probability 0.5 of heads. That does not mean "one head every two tosses"; it means "in ten thousand tosses the proportion of heads will be very close to 0.5". The law of large numbersAs repetitions grow, the proportion of times an outcome occurs approaches its probability.重复次数增加时,某结果出现的比例会趋近它的概率。 guarantees that the proportion converges — not that the counts balance. After five heads in a row, the sixth toss is still 0.5: coins have no memory.
迷思一:短期规律(热手)Myth 1: short-run regularity
“他连进三个球,手正热,下一个一定进。”错。随机性只在长期有规律;短期完全可以连续出现同一结果,而这正是随机该有的样子。
"Three baskets in a row — he is hot, the next one is going in." Wrong. Randomness is regular only in the long run; short streaks are exactly what randomness looks like.
迷思二:“平均法则”(赌徒谬误)Myth 2: the "law of averages"
“已经连开 5 次红,下次该黑了。”错。过去的结果不改变未来的概率。轮盘没有欠你一次黑色,它只是继续转。
"Red five times — black is due." Wrong. Past outcomes do not change future probabilities. The wheel owes you nothing; it just keeps spinning.
把“长期平衡”理解成“短期补偿”。概率说“一万次之后比例接近 0.5”,并没有说“接下来会多出一些反面来补齐”。补齐靠的是分母变大,不是靠未来的结果反过来修正过去。考场上一旦看到“因为前面……所以下次更可能……”,直接判错。
Reading long-run balance as short-run compensation. "The proportion approaches 0.5 in ten thousand tosses" never means "extra tails will arrive to make up for it". Balance comes from a bigger denominator, not from future outcomes correcting the past. Any sentence of the form "because of the past, the next one is more likely" is wrong on sight.
11.2 概率模型:样本空间 + 每个结果的概率11.2 Probability Models: Sample Space Plus Probabilities
一个概率模型只有两样东西:所有可能结果(样本空间 S),以及每个结果的概率。合法性的两条硬性条件:每条概率在 0 与 1 之间,全部加起来恰好等于 1。
A probability model has exactly two parts: all possible outcomes (the sample space S) and a probability for each. The two requirements: every probability lies in [0, 1], and together they sum to exactly 1.
掷两颗骰子(一红一绿),样本空间是 \(6\times6=36\) 个有序结果:\((1,1),(1,2),\ldots,(6,6)\)。因为骰子公平,每个结果的概率都是 \(1/36\)。把所有 36 个结果的概率加起来正好是 1——这是判断“模型是否合法”最直接的办法。把两颗骰子的点数和作为事件(和 = 2, 3, …, 12),每个和对应的结果个数不同,概率自然也不同。
Roll two dice (one red, one green): the sample space has \(6\times6=36\) ordered outcomes, \((1,1),(1,2),\ldots,(6,6)\). With fair dice each has probability \(1/36\), and the 36 probabilities add to exactly 1 — the quickest legitimacy check. Take the sum as an event (2, 3, …, 12): different sums contain different numbers of outcomes, so their probabilities differ.
\(P(A)=\dfrac{\text{A 包含的结果数}}{\text{S 中的结果总数}}\) 这条公式的前提是“所有结果等可能”。对公平骰子成立;对“明天下雨 / 不下雨”不成立——两个结果,概率却远不是各 1/2。
\(P(A)=\dfrac{\text{outcomes in }A}{\text{outcomes in }S}\) requires that all outcomes are equally likely. True for fair dice; false for "rain tomorrow / no rain" — two outcomes, but nowhere near 1/2 each.
11.3 事件、补事件与“至少一个”11.3 Events, Complements and "At Least One"
“至少一个”几乎总是应该反过来算:\(P(\text{至少一个})=1-P(\text{一个都没有})\)。正面硬算要分情况,反面只要一步。
"At least one" should almost always be computed backwards: \(P(\text{at least one})=1-P(\text{none})\). Direct counting splits into cases; the complement takes one step.
事件是样本空间的子集:比如“和是 5”={(1,4),(2,3),(3,2),(4,1)},概率 \(4/36\)。补事件 \(A^c\) 是“A 不发生”,包含所有不在 A 里的结果。因为 A 与 \(A^c\) 合起来正好是整个样本空间,所以 \(P(A^c)=1-P(A)\)。
An event is a subset of the sample space: "sum is 5" = {(1,4),(2,3),(3,2),(4,1)}, probability \(4/36\). The complement \(A^c\) is "A does not happen" — every outcome not in A. Since A and \(A^c\) together form the whole sample space, \(P(A^c)=1-P(A)\).
例:连掷 4 次公平骰子,求“至少出现一次 6”。正面算要分“恰好 1 次、2 次、3 次、4 次”,四段相加;反过来只需算“四次都不是 6”的概率:每次 \(5/6\),四次 \(\left(\frac56\right)^4\),于是 \(P=1-\left(\frac56\right)^4\approx0.5177\)。
Roll a fair die four times; find P(at least one 6). Directly, you would add "exactly 1, 2, 3 or 4 sixes". Backwards, note that "no six in four rolls" has probability \((5/6)^4\), so \(P=1-(5/6)^4\approx0.5177\).
randInt(1, 6, 4) → {2 5 6 1} → 这一组“有 6”,记为成功
sum(randInt(1,6,4) 中含 6 的组数) / 100 ≈ 0.52
11.4 加法法则与互斥:为什么不能直接相加11.4 The Addition Rule and Disjoint Events: Why Adding Is Not Enough
直接加 \(P(A)+P(B)\) 会把同时属于两者的那部分算两遍,所以要减掉一次交集。只有当 \(A\cap B\) 为空(互斥)时,才可以直接相加。
Adding \(P(A)+P(B)\) counts the part in both twice, so subtract one copy of the intersection. Only when \(A\cap B\) is empty (disjoint) may you add directly.
用第 11 讲开头那个“穿孔耳洞”的例子:178 名学生,其中 90 名男生、103 人戴耳环,而既男生又戴耳环的有 19 人。若问“随机抽一名学生,是男生或戴耳环的概率”,正确的算法是
Use the pierced-ears example: 178 students, 90 male, 103 with pierced ears, and 19 who are both. For "a randomly chosen student is male or has pierced ears", the correct computation is
把“互斥”和“独立”当成同义词。互斥(disjoint)说的是“不可能同时发生”,\(P(A\cap B)=0\);独立(independent)说的是“一个发生不改变另一个的概率”。这两件事在逻辑上几乎相反:如果 A 与 B 互斥且都有正概率,那么知道 A 发生了就确定 B 不会发生——这恰恰是“不独立”。互斥事件(在概率都大于 0 时)一定不独立。
Treating "disjoint" and "independent" as synonyms. Disjoint means "cannot happen together", \(P(A\cap B)=0\). Independent means "one happening does not change the other's probability". Logically they are near opposites: if A and B are disjoint with positive probabilities, learning that A happened makes B certain not to happen — which is dependence. Disjoint events with positive probabilities are never independent.
11.5 双向表:把样本空间摊开成一张表11.5 Two-Way Tables: Spreading the Sample Space Out
双向表是 AP 最爱的概率载体。读它的规矩只有一条:分母永远是你正在谈的那个“总体”——整张表的合计,还是某一行 / 某一列的合计。
The two-way table is the AP exam's favourite setting. One rule governs it: the denominator is always the group you are talking about — the grand total, or a row total, or a column total.
| 戴耳环 YesPierced: yes | 未戴 NoPierced: no | 合计Total | |
|---|---|---|---|
| 男生 MaleMale | 19 | 71 | 90 |
| 女生 FemaleFemale | 84 | 4 | 88 |
| 合计Total | 103 | 75 | 178 |
| 要算的概率Probability | 写法Notation | 分子 / 分母Numerator / denominator | 结果Value |
|---|---|---|---|
| 联合(且)Joint (and) | \(P(A\cap B)\) | 19 / 178 全部学生19 / 178 all students | 0.107 |
| 边际(单个事件)Marginal | \(P(B)\) | 103 / 178 全部学生103 / 178 all students | 0.579 |
| 并集(或)Union (or) | \(P(A\cup B)\) | 174 / 178 全部学生174 / 178 all students | 0.978 |
| 条件(在男生中)Conditional (among males) | \(P(B\mid A)\) | 19 / 90 只看男生19 / 90 males only | 0.211 |
11.6 模拟:用随机数字把“运气”跑一遍11.6 Simulation: Running Luck with Random Digits
模拟不是“大概猜一下”,而是一套四步流程:说清问题、设计一个随机装置、重复很多次、用比例作结论。每一步都要写得让阅卷人能照着复现。
A simulation is not hand-waving; it is a four-step procedure: state the question, design a chance device, repeat many times, conclude from the proportion. Each step must be written so a reader could reproduce it.
randInt(1,6,4) 生成 4 个 1–6 的数,若含 6 记为“成功”。并说明每个数字等可能、各次独立。Describe one repetition and what you record: draw four integers 1–6 with randInt(1,6,4); record "success" if any is a 6. State that digits are equally likely and independent.6905 1648 1787 1740 9517 8453 4064 8987 20…
因为很多概率算不出来或算起来太复杂:扑克牌里的某种牌型、篮球比赛最后 30 秒的逆转、排队系统的等待时间。模拟把“算”换成“跑”,用频率代替积分。代价是它只给近似值,而且必须写清规则,否则跑得再多也是错的。
Because many probabilities are hard or impossible to compute: a particular poker hand, a comeback in the last 30 seconds, waiting times in a queue. Simulation replaces calculus with repetition, using frequency in place of an integral. The price is approximation — and the obligation to state the rules, or a million runs of the wrong model are still wrong.
例题精讲Worked Examples
例 1 合法吗?一组概率的体检Example 1 Is this legitimate? Checking a set of probabilities
(a) 验证这是一个合法的概率模型。
(b) 求“该学生不在 18–23 岁”的概率。
(c) 若把 30–39 岁的概率误写成 0.24,会发生什么? A distance-learning undergraduate is chosen at random and their age band recorded. The proposed model: 18–23: 0.57; 24–29: 0.17; 30–39: 0.14; 40+: 0.12.
(a) Verify that this is a legitimate probability model.
(b) Find the probability that the student is not 18–23.
(c) What goes wrong if the 30–39 probability were typed as 0.24?
- (a) 逐条检查两个条件。第一,每条概率都在 0 与 1 之间:0.57、0.17、0.14、0.12 全部满足。第二,四条相加:\(0.57+0.17+0.14+0.12=1.00\),恰好为 1。 (a) Check both requirements. Each probability lies in [0, 1]: 0.57, 0.17, 0.14, 0.12 all do. And \(0.57+0.17+0.14+0.12=1.00\), exactly 1. \[ 0.57+0.17+0.14+0.12=1.00 \]
- (a) 结论要写“为什么”。“因为四个年龄组互斥且覆盖了所有学生,且概率非负、总和为 1,所以这是一个合法的概率模型。”只写“加起来是 1”会丢掉“互斥且穷尽”这一半的分数。 (a) Justify, do not just compute. "The four age bands are mutually exclusive and exhaustive, each probability is non-negative, and they sum to 1, so the model is legitimate." Writing only "they add to 1" loses the exclusivity/completeness half.
- (b) 用补事件,不要重算三项。“不在 18–23 岁”是“在 18–23 岁”的补事件,所以 \(P=1-0.57=0.43\)。也可以把其余三项相加 \(0.17+0.14+0.12=0.43\) 交叉验证。 (b) Use the complement. "Not 18–23" is the complement of "18–23", so \(P=1-0.57=0.43\). Cross-check by adding the other three: \(0.17+0.14+0.12=0.43\). \[ P(A^c)=1-P(A)=1-0.57=0.43 \]
- (c) 总和超过 1 → 模型不合法。把 0.14 改成 0.24 后总和变成 1.10。概率加起来不能超过 1,说明这四个“互斥且穷尽”的事件里,至少有一个概率写错了,或者年龄组有重叠。 (c) Sum above 1 breaks the model. Changing 0.14 to 0.24 makes the total 1.10. Probabilities of exclusive, exhaustive events cannot exceed 1, so at least one entry is wrong or the bands overlap.
例 2 从双向表到加法法则Example 2 From a two-way table to the addition rule
(a) 是男生且戴耳环的概率;
(b) 是男生或戴耳环的概率;
(c) 若不是男生,戴耳环的概率是多少? In a class of 178 students, 90 are male, 103 have pierced ears, and 19 are males with pierced ears. One student is chosen at random. Find:
(a) P(male and pierced);
(b) P(male or pierced);
(c) P(pierced | not male).
- 先把表补全。男生戴耳环 19,则男生未戴 \(90-19=71\);戴耳环共 103,则女生戴耳环 \(103-19=84\);女生共 88,则女生未戴 \(88-84=4\)。四块相加 \(19+71+84+4=178\),与总数吻合。 Complete the table first. Males pierced 19, so males not pierced \(90-19=71\); pierced total 103, so females pierced \(103-19=84\); females total 88, so females not pierced \(88-84=4\). The four cells sum to \(19+71+84+4=178\).
- (a) “且”用整表作分母。\(P(\text{男}\cap\text{耳环})=19/178\approx0.107\)。 (a) "And" uses the whole table. \(P(\text{male}\cap\text{pierced})=19/178\approx0.107\). \[ P(A\cap B)=\frac{19}{178}\approx0.107 \]
- (b) 加法法则,记得减交集。\(P(A\cup B)=\frac{90}{178}+\frac{103}{178}-\frac{19}{178}=\frac{174}{178}\approx0.978\)。用维恩图核对:\(71+19+84=174\) ✓。 (b) Addition rule, subtract the overlap. \(P(A\cup B)=\frac{90}{178}+\frac{103}{178}-\frac{19}{178}=\frac{174}{178}\approx0.978\). Venn check: \(71+19+84=174\) ✓. \[ P(A\cup B)=\frac{90+103-19}{178}=\frac{174}{178}\approx0.978 \]
- (c) 只在“不是男生”里算。不是男生即女生,共 88 人,其中戴耳环 84 人,所以 \(P=84/88\approx0.955\)。注意分母从 178 换成了 88——条件概率的本质就是换分母。 (c) Restrict to "not male". Not male means female: 88 students, of whom 84 have pierced ears, so \(P=84/88\approx0.955\). The denominator moved from 178 to 88 — that switch is conditional probability. \[ P(\text{pierced}\mid\text{female})=\frac{84}{88}\approx0.955 \]
随堂练习Check Your Understanding
先自己选,再点“查看解答”。每题都给出考点、逐步推理与错误选项诊断——错也要错得明白。 Choose first, then reveal. Every question comes with the tested idea, step-by-step reasoning and a diagnosis of each wrong option.
下列哪一组概率可以作为一个合法的概率模型?
Which set of probabilities is a legitimate probability model?
- a一个骰子的六个面:0.1, 0.1, 0.1, 0.1, 0.1, 0.1six faces of a die: 0.1, 0.1, 0.1, 0.1, 0.1, 0.1
- b明天的天气:下雨 0.6,不下雨 0.5tomorrow's weather: rain 0.6, no rain 0.5
- c一次投篮:命中 0.35,不中 0.65one shot: make 0.35, miss 0.65
- d一名学生的年级:9 年级 0.3,10 年级 0.3,11 年级 0.3,12 年级 −0.1a student's grade: 9th 0.3, 10th 0.3, 11th 0.3, 12th −0.1
- 先检查“范围”Check the range first a 的六项都合法但加起来只有 0.6;b 的 0.6 + 0.5 = 1.1 超过 1;d 出现负概率,直接出局。a's six values are legal but sum to only 0.6; b's 0.6 + 0.5 = 1.1 exceeds 1; d contains a negative probability and fails outright. a、b、d 都被排除。a, b and d are out.
- 再检查“总和”与“穷尽”Check the sum and completeness c 的两个结果互斥(一次投篮要么进要么不进)且穷尽,0.35 + 0.65 = 1.00,两条都满足。c's two outcomes are exclusive (a shot goes in or it does not) and exhaustive, and 0.35 + 0.65 = 1.00. Both conditions hold. 只有 c 合法。Only c is legitimate.
| 选项Option | 判断与理由Verdict & reason |
|---|---|
| a | 错。六项之和 0.6 ≠ 1,漏掉了 0.4 的概率质量。Wrong: they sum to 0.6, not 1 — 0.4 of probability is missing. |
| b | 错。0.6 + 0.5 = 1.1 > 1。Wrong: 0.6 + 0.5 = 1.1 > 1. |
| c | 对。互斥且穷尽,非负,总和为 1。Correct: exclusive, exhaustive, non-negative, sums to 1. |
| d | 错。概率不能为负(−0.1),哪怕总和为 0.8 也不对。Wrong: a probability cannot be negative, even if the total were 0.8. |
某社区 500 户家庭中,有 180 户有孩子,有 320 户养宠物,其中 140 户既有孩子又养宠物。随机选一户,它有孩子或养宠物的概率是
Of 500 households, 180 have children, 320 keep pets, and 140 do both. For a randomly chosen household, the probability of having children or pets is
- a\(180/500+320/500=1.00\)\(180/500+320/500=1.00\)
- b\((180+320-140)/500=0.72\)\((180+320-140)/500=0.72\)
- c\(140/500=0.28\)\(140/500=0.28\)
- d\((500-180-320)/500=0.00\)\((500-180-320)/500=0.00\)
- 先看 A 与 B 是否互斥Are A and B disjoint? 有 140 户同时满足两者,所以交集非空,不能直接相加。140 households satisfy both, so the intersection is non-empty and direct addition is not allowed. 排除 a;140/500 只是交集,排除 c。(a) is out; 140/500 is only the intersection, so (c) is out.
- 代入公式Substitute 并集人数 = 180 + 320 − 140 = 360,占 500 户的 0.72。Union count = 180 + 320 − 140 = 360, which is 0.72 of 500. \[ \frac{180+320-140}{500}=\frac{360}{500}=0.72 \] 答案 b。Answer b.
| 选项Option | 判断与理由Verdict & reason |
|---|---|
| a | 错。直接相加把交集数了两遍,得到荒唐的 1.00。Wrong: double-counts the overlap and reaches an absurd 1.00. |
| b | 对。加法法则算出 360/500 = 0.72。Correct: the addition rule gives 360/500 = 0.72. |
| c | 错。140/500 是“且”,不是“或”。Wrong: 140/500 is "and", not "or". |
| d | 错。这是“两者都没有”的算法,且数字也不对(应为 500−360=140)。Wrong: that is the "neither" computation, and the arithmetic is off (500−360=140). |
某射手的罚球命中率为 0.8,每次罚球相互独立。他连续罚 5 次,至少命中 1 次的概率约为
A player makes 80% of free throws, independently. Over five attempts, the probability of making at least one is about
- a\(5\times0.8=4.0\)\(5\times0.8=4.0\)
- b\(1-0.2^5\approx0.99968\)\(1-0.2^5\approx0.99968\)
- c\(0.8^5\approx0.328\)\(0.8^5\approx0.328\)
- d\(0.2^5\approx0.00032\)\(0.2^5\approx0.00032\)
- 把问题翻译成补事件Translate to the complement “至少命中 1 次”的反面是“5 次全部不中”,后者只有一条路径,算起来最快。The opposite of "at least one make" is "all five miss" — a single path, the fastest thing to compute. \(P(\text{至少一次})=1-P(\text{全不中})\)。\(P(\text{at least one})=1-P(\text{all miss})\).
- 独立事件相乘Multiply for independence 每次不中概率 0.2,且相互独立,所以 5 次全不中为 \(0.2\times0.2\times0.2\times0.2\times0.2=0.2^5\approx0.00032\)。Each miss has probability 0.2 and attempts are independent, so all five miss with probability \(0.2^5\approx0.00032\). \[ P(\text{all miss})=0.2^5=0.00032 \] \(P=1-0.00032=0.99968\)。\(P=1-0.00032=0.99968\).
- 检验选项的“合理性”Sanity-check the options 概率不能超过 1,a 直接排除;c 是“5 次全中”的概率;d 是“全不中”的概率,恰好是需要被减掉的那一项。A probability cannot exceed 1, so (a) dies; (c) is "all five make"; (d) is "all miss" — exactly the term being subtracted. 答案 b。Answer b.
| 选项Option | 判断与理由Verdict & reason |
|---|---|
| a | 错。概率不能大于 1;这是把期望次数当成了概率。Wrong: a probability cannot exceed 1 — this is an expected count, not a probability. |
| b | 对。补事件法则 \(1-0.2^5\)。Correct: the complement rule \(1-0.2^5\). |
| c | 错。\(0.8^5\) 是五次全中的概率。Wrong: \(0.8^5\) is the probability of five makes. |
| d | 错。\(0.2^5\) 是全不中的概率,正是补事件本身。Wrong: \(0.2^5\) is the probability of no makes — the complement itself. |
某篮球运动员的罚球命中率为 60%,且各次独立。教练想知道:连续罚 3 次,至少命中 2 次的概率是多少?
(a) 用随机数字设计一次模拟,说明怎么表示一次重复。
(b) 说明要记录什么、重复多少次。
(c) 若模拟 200 次中有 131 次“至少命中 2 次”,估计概率并说明它与理论值的关系。
A basketball player makes 60% of free throws, independently. The coach asks for the probability of at least two makes in three attempts.
(a) Design a simulation with random digits and describe one repetition.
(b) State what to record and how many repetitions.
(c) If 131 of 200 repetitions succeed, estimate the probability and relate it to the theoretical value.
- (a) 让数字与概率对上(a) Match digits to probability 取随机数字 0–9,规定 0–5 表示“命中”(6 个数字,占 60%),6–9 表示“不中”(4 个数字,占 40%)。每读 3 个数字=一次重复(三次罚球)。Use random digits 0–9: 0–5 mean "make" (six digits, 60%), 6–9 mean "miss" (four digits, 40%). Three digits = one repetition (three throws). 概率与数字一一对应,模拟才有效。The digit-to-probability match is what makes it valid.
- (b) 记录与重复(b) Record and repeat 每组 3 个数字中,若命中的数字(0–5)出现 2 个或 3 个,记为“成功”。重复至少 100 次(这里做了 200 次),统计成功比例。For each triple, record a success if two or three of the digits are 0–5. Repeat at least 100 times (200 here) and take the proportion of successes. 重复次数越多,比例越接近真实概率。More repetitions, closer to the true probability.
- (c) 估计与理论值(c) Estimate versus theory \(131/200=0.655\)。理论值可用二项概率算出:\(P(2)+P(3)=3(0.6)^2(0.4)+(0.6)^3=0.432+0.216=0.648\)。模拟值 0.655 与之接近,差异来自随机波动。\(131/200=0.655\). The theoretical value: \(P(2)+P(3)=3(0.6)^2(0.4)+(0.6)^3=0.432+0.216=0.648\). The simulated 0.655 is close; the gap is random fluctuation. \[ \frac{131}{200}=0.655,\qquad 3(0.6)^2(0.4)+(0.6)^3=0.648 \] 答案写法:“根据模拟,概率约为 0.655,与理论值 0.648 接近。”Model sentence: "Based on the simulation, the probability is about 0.655, close to the theoretical 0.648."
本讲小结Summary
- 概率是长期频率:短期不可预测,长期比例稳定。热手与赌徒谬误都源于把“长期”当成“短期”。
- 概率模型=样本空间 + 每个结果的概率;两条条件:每条 \(0\le P\le1\),总和恰为 1。
- 等可能时才可用“有利结果数 ÷ 总结果数”;补事件法则 \(P(A^c)=1-P(A)\),专门对付“至少一个”。
- 加法法则 \(P(A\cup B)=P(A)+P(B)-P(A\cap B)\);只有互斥(交集为空)时才可以直接相加。
- 双向表读概率的关键是分母:整表(且、或)还是某一行列(条件);维恩图用来核对四块人数。
- 模拟四步:State / Plan / Do / Conclude;数字与概率必须对应,重复次数越多,估计越稳。互斥 ≠ 独立。
- Probability is a long-run frequency: unpredictable short run, stable long run. The hot hand and the gambler's fallacy both mistake the long run for the short run.
- A probability model = sample space + probabilities; the two requirements are \(0\le P\le1\) for each and a total of exactly 1.
- Counting outcomes requires equally likely outcomes; the complement rule \(P(A^c)=1-P(A)\) handles "at least one".
- The addition rule \(P(A\cup B)=P(A)+P(B)-P(A\cap B)\); direct addition is legal only when the events are disjoint.
- In a two-way table the key is the denominator — whole table (and, or) or a row/column (conditional); a Venn diagram checks the four cells.
- Simulation in four steps: State / Plan / Do / Conclude; digits must match probabilities, and more repetitions give steadier estimates. Disjoint ≠ independent.
条件概率与独立性:知道一点之后Conditional Probability and Independence: After You Learn Something
上一讲最后一行字的写法是“在……之中”。这一讲把那句话变成公式:条件概率就是换掉分母之后的概率。我们还会学会乘法法则、用树状图处理多阶段过程,以及 AP 最爱的那个陷阱——互斥不等于独立。
Lecture 11 ended with the phrase "among …". This lecture turns that phrase into a formula: a conditional probability is a probability with a new denominator. We add the multiplication rule, tree diagrams for multi-stage processes, and the AP exam's favourite trap — disjoint is not independent.
本讲学习目标Learning Objectives
- 用自己的话定义条件概率在已知另一个事件已经发生的条件下,某事件发生的概率,记作 P(B|A),读作“在 A 发生的条件下 B 的概率”。The probability that event B occurs given that event A is already known to have occurred, written P(B|A).,并把 \(P(B\mid A)\) 读成“在 A 已发生的条件下,B 的概率”。
- 用公式 \(P(B\mid A)=\dfrac{P(A\cap B)}{P(A)}\) 与双向表计算条件概率,永远清楚分子与分母分别来自哪一格。
- 使用一般乘法法则 \(P(A\cap B)=P(A)\,P(B\mid A)\),把多阶段过程的概率写成连乘。
- 用三种等价方式判定独立:\(P(B\mid A)=P(B)\)、\(P(A\mid B)=P(A)\)、\(P(A\cap B)=P(A)P(B)\)。
- 画出并读懂树状图:沿一条枝相乘,把若干枝的末端结果相加。
- 说清互斥与独立为什么不能同时成立(概率为正时),并识别“把条件概率分子分母颠倒”这一常见错误。
- Define conditional probabilityThe probability that B occurs given that A is already known to have occurred, written P(B|A).在已知 A 已发生的条件下 B 发生的概率,记作 P(B|A)。 and read \(P(B\mid A)\) as "the probability of B given A".
- Compute conditional probabilities from the formula \(P(B\mid A)=\dfrac{P(A\cap B)}{P(A)}\) and from two-way tables, always knowing which cell is the numerator.
- Use the general multiplication rule \(P(A\cap B)=P(A)\,P(B\mid A)\) to write multi-stage probabilities as products.
- Test independence three equivalent ways: \(P(B\mid A)=P(B)\), \(P(A\mid B)=P(A)\), \(P(A\cap B)=P(A)P(B)\).
- Draw and read a tree diagram: multiply along a branch, add the ends of several branches.
- Explain why disjoint and independent cannot both hold (when probabilities are positive), and avoid swapping the numerator and denominator of a conditional probability.
核心概念Core Concepts
12.1 条件概率:分母变小了12.1 Conditional Probability: The Denominator Shrinks
知道“A 已经发生”之后,样本空间就从“所有人”缩小成“A 中的那些人”。条件概率就是把分母从全体换成 A。
Once you know A happened, the sample space shrinks from "everyone" to "the people in A". A conditional probability replaces the denominator with A.
看一张 10 000 条成绩记录的表。事件 E 表示“这门课属于 EPS 项目”,事件 LB 表示“成绩低于 B”。从表中读出:\(P(E)=1600/10000=0.16\),低于 B 的共有 3 656 条,而其中 800 条来自 EPS。如果已经知道这条记录低于 B,那么“它来自 EPS”的概率就是 \(800/3656\approx0.219\)——分母从 10 000 变成了 3 656。
Consider 10 000 course records. Let E = "the course is in the EPS programme" and LB = "the grade is lower than a B". The table gives \(P(E)=1600/10000=0.16\); 3 656 records are below a B, and 800 of them are EPS. Given that a record is below a B, the probability it is EPS is \(800/3656\approx0.219\) — the denominator moved from 10 000 to 3 656.
把 \(P(B\mid A)\) 和 \(P(A\mid B)\) 当成同一个数。上面例子已经说明:\(P(E\mid LB)=0.219\),而 \(P(LB\mid E)=0.50\),差了不止一倍。条件概率的方向写在竖线后面:竖线后面才是“已知条件”,也是新的分母。做题时先圈出“在……中 / 已知…… / 如果……”,再把那个组的人数放到分母上。
Treating \(P(B\mid A)\) and \(P(A\mid B)\) as the same number. The example shows otherwise: \(P(E\mid LB)=0.219\) while \(P(LB\mid E)=0.50\). The condition sits after the bar and becomes the new denominator. Circle the phrase "among / given / if" first, then put that group on the bottom.
12.2 双向表:条件概率的主战场12.2 Two-Way Tables: Where Conditional Probability Lives
AP 的条件概率题八成从双向表出。解题动作只有一个:先找到条件所在的那一行或那一列,把它的合计写在分母上,再从这一行里挑出分子。
Four out of five AP conditional-probability questions start from a two-way table. One move solves them: find the row or column named by the condition, put its total on the bottom, then pick the numerator from inside that row.
某停车场调查了 359 位驾驶者的身份与车型,整理如下。注意行合计与列合计都在最外侧——它们是“条件”对应的分母来源。
A car park surveyed 359 drivers by status and car type. The row and column totals sit on the outside — they are the denominators behind every condition.
| American 美系American | European 欧系European | Asian 亚系Asian | 合计Total | |
|---|---|---|---|---|
| 学生 StudentStudent | 107 | 33 | 55 | 195 |
| 教职工 StaffStaff | 105 | 12 | 47 | 164 |
| 合计Total | 212 | 45 | 102 | 359 |
| 问题Question | 分母(条件)Denominator (condition) | 分子(同时满足)Numerator (both) | 结果Value |
|---|---|---|---|
| 随机一人是学生A random driver is a student | 全体 359all 359 | 学生共 195195 students | 0.543 |
| 在亚系车主中,是学生的概率Among Asian-car owners, P(student) | 亚系合计 102102 Asian | 5555 | 0.539 |
| 在欧系车主中,是学生的概率Among European-car owners, P(student) | 欧系合计 4545 European | 3333 | 0.733 |
| 在学生中,开欧系车的概率Among students, P(European car) | 学生合计 195195 students | 3333 | 0.169 |
| 是教职工或开亚系车Staff or Asian car | 全体 359all 359 | 164+102−47164+102−47 | 0.610 |
12.3 乘法法则:把“并且”拆成两步12.3 The Multiplication Rule: Splitting "And" into Steps
\(P(A\cap B)=P(A)\cdot P(B\mid A)\):先让 A 发生,再在“A 已发生”的世界里让 B 发生。事件有先后时,乘法法则就是把故事讲一遍。
\(P(A\cap B)=P(A)\cdot P(B\mid A)\): first let A happen, then ask for B inside the world where A happened. When the story has steps, the multiplication rule is the story.
Pew 的调查显示:93% 的美国青少年上网;而在上网的青少年中,55% 在社交网站发布过个人资料。问“随机一名青少年既上网又发过资料”的比例:先取 0.93,再乘以 0.55,得到 0.5115。注意第二个概率是在“上网者”这个缩小后的世界里给出的——它本身就是条件概率。
Pew reports that 93% of US teens are online, and 55% of those online have posted a profile. The share who are both online and have posted is \(0.93\times0.55=0.5115\). The second probability is given inside the smaller world of online teens — it is already conditional.
把 \(P(B\mid A)=\dfrac{P(A\cap B)}{P(A)}\) 两边同乘 \(P(A)\),就得到 \(P(A\cap B)=P(A)P(B\mid A)\)。所以它们不是两个要背的公式,而是同一个关系。考试里看到“先……再……”“其中……的百分之多少”这类表述,就是乘法法则的信号。
Multiply both sides of \(P(B\mid A)=\dfrac{P(A\cap B)}{P(A)}\) by \(P(A)\) and you get \(P(A\cap B)=P(A)P(B\mid A)\). They are one relationship, not two formulas. Phrases such as "first … then …" or "of those, X percent" signal the multiplication rule.
12.4 独立:知道了也不改变12.4 Independence: Knowing Changes Nothing
A 与 B 独立,意思是“知道 A 发生了”完全不会改变 B 的概率:\(P(B\mid A)=P(B)\)。等价的写法还有 \(P(A\mid B)=P(A)\) 与 \(P(A\cap B)=P(A)P(B)\)。
A and B are independent when knowing A happened does not change the probability of B: \(P(B\mid A)=P(B)\). Equivalent forms: \(P(A\mid B)=P(A)\) and \(P(A\cap B)=P(A)P(B)\).
用真实数据检验一次。某班 50 人,其中 23 名男生、7 名左撇子,而男生中的左撇子有 3 人。若“性别”与“左撇子”独立,应有 \(P(\text{左}\mid\text{男})=P(\text{左})\)。实际是 \(3/23\approx0.130\) 与 \(7/50=0.140\)——不相等。数值很接近,但判定独立不能靠“看起来差不多”,必须比较(或用乘法检验 \(P(\text{男}\cap\text{左})=3/50\) 是否等于 \(23/50\times7/50=0.0644\);实际 0.06,也不等)。
Test it with data. In a class of 50, there are 23 males and 7 left-handers, and 3 of the males are left-handed. If sex and handedness were independent, \(P(\text{left}\mid\text{male})\) would equal \(P(\text{left})\). In fact \(3/23\approx0.130\) versus \(7/50=0.140\) — not equal. They are close, but independence is judged by comparison, not by eyeballing (or check \(P(\text{male}\cap\text{left})=3/50\) against \(23/50\times7/50=0.0644\); \(0.06\neq0.0644\)).
| 判定方式Test | 写法Statement | 什么时候最方便Most convenient when |
|---|---|---|
| 条件概率Conditional | \(P(B\mid A)=P(B)\) | 题目已经给出或容易算出条件概率a conditional probability is given or easy to compute |
| 反向条件Reverse conditional | \(P(A\mid B)=P(A)\) | 另一个方向的数据更顺手the other direction is easier from the data |
| 乘法Multiplication | \(P(A\cap B)=P(A)P(B)\) | 已知两个边际概率与交集both marginals and the intersection are known |
“互斥”与“独立”混着用。互斥说的是 \(P(A\cap B)=0\):两件事不可能同时发生。独立说的是 \(P(A\cap B)=P(A)P(B)\):一个发生不改变另一个的概率。如果 A、B 都可能有正概率且互斥,那么一旦知道 A 发生,B 就确定不发生,\(P(B\mid A)=0\neq P(B)\)——这恰恰是极端的依赖。所以 AP 的标准答案:互斥事件(P 为正时)一定不独立。
Swapping "disjoint" and "independent". Disjoint means \(P(A\cap B)=0\): the events cannot happen together. Independent means \(P(A\cap B)=P(A)P(B)\): one does not change the other's probability. If A and B are disjoint with positive probabilities, then learning A happened makes B certain not to happen, so \(P(B\mid A)=0\neq P(B)\) — extreme dependence. The AP-ready sentence: disjoint events with positive probabilities are never independent.
12.5 树状图:多阶段过程的标配12.5 Tree Diagrams: Standard Equipment for Multi-Stage Processes
树状图把“先发生什么、再发生什么”画出来。沿一条枝把概率相乘,把几条枝的末端结果相加。一个乘、一个加,别搞反。
A tree diagram draws the order of events. Multiply along a branch, add across the branch ends you want. One multiplication, one addition — do not mix them up.
YouTube 的调查把成年网民按年龄分成三段:18–29 岁占 27%,30–49 岁占 45%,50 岁以上占 28%。三段里“访问过视频网站”的比例分别是 70%、51%、26%。问全体成年网民中访问过视频网站的比例——这正是“分段加权平均”,也就是树状图里三条“是”枝末端之和。
The YouTube survey splits adult internet users into three age bands: 27% aged 18–29, 45% aged 30–49, 28% aged 50+. Within each band, 70%, 51% and 26% have visited a video-sharing site. The overall share who visited is a weighted average — the sum of the three "yes" branch ends in the tree.
重复 200 次 → 数出“访问=是”的次数 ÷ 200 → 应接近 0.4913
0.27 × 0.7 = 0.189、0.45 × 0.51 = 0.2295。For the products alone, just multiply: 0.27 × 0.7 = 0.189, 0.45 × 0.51 = 0.2295.12.6 独立、互斥与条件概率的三角关系12.6 The Triangle: Independence, Disjointness and Conditioning
把三件事放在一起记:独立是“知道 A 不改变 B”;互斥是“A 与 B 不能同时发生”;条件概率是“在 A 的世界里重新算 B”。三者互相牵制,考试最爱在这里设陷阱。
Keep three ideas together: independence means "A does not change B"; disjointness means "A and B cannot co-occur"; conditioning means "recompute B inside A's world". They constrain each other, and the exam loves the seams.
若 A、B 独立If A and B are independent
\(P(A\cap B)=P(A)P(B)\),且 \(P(B\mid A)=P(B)\)。此时 \(P(A\cup B)=P(A)+P(B)-P(A)P(B)\)。独立的事件一定有交集(概率为正时),因为 \(P(A\cap B)=P(A)P(B)>0\)。
\(P(A\cap B)=P(A)P(B)\) and \(P(B\mid A)=P(B)\), so \(P(A\cup B)=P(A)+P(B)-P(A)P(B)\). Two independent events with positive probabilities must have a non-empty intersection, because \(P(A\cap B)=P(A)P(B)>0\).
若 A、B 互斥If A and B are disjoint
\(P(A\cap B)=0\),且 \(P(A\cup B)=P(A)+P(B)\)。此时 \(P(B\mid A)=0\):知道 A 发生就等于宣布 B 不可能发生。互斥(P 都为正)一定不独立。
\(P(A\cap B)=0\) and \(P(A\cup B)=P(A)+P(B)\). Then \(P(B\mid A)=0\): knowing A happened rules B out entirely. Disjoint events with positive probabilities are never independent.
例题精讲Worked Examples
例 1 同一张成绩表,三个不同的概率Example 1 One grade table, three different probabilities
(a) \(P(E)\);(b) \(P(E\mid LB)\);(c) \(P(LB\mid E)\);(d) 判断 E 与 LB 是否独立。 Of 10 000 course records, 1 600 are EPS; 3 656 grades are below a B, of which 800 are EPS. Let E = "EPS" and LB = "below B". Find:
(a) \(P(E)\); (b) \(P(E\mid LB)\); (c) \(P(LB\mid E)\); (d) decide whether E and LB are independent.
- (a) 无条件 → 用整表。\(P(E)=1600/10000=0.16\)。分母 10 000 是全体记录。 (a) No condition → whole table. \(P(E)=1600/10000=0.16\) with 10 000 on the bottom.
- (b) 条件是 LB → 分母换成 3 656。\(P(E\mid LB)=800/3656\approx0.2188\)。分子 800 是“EPS 且低于 B”的那一格。 (b) Condition LB → denominator 3 656. \(P(E\mid LB)=800/3656\approx0.2188\); the numerator is the EPS-and-below-B cell. \[ P(E\mid LB)=\frac{P(E\cap LB)}{P(LB)}=\frac{800/10000}{3656/10000}=\frac{800}{3656}\approx0.219 \]
- (c) 反过来问 → 分母换成 1 600。\(P(LB\mid E)=800/1600=0.50\)。整整一半的 EPS 成绩低于 B,而全体中只有 36.6% 低于 B——这说明 EPS 与 LB 不独立。 (c) Reverse → denominator 1 600. \(P(LB\mid E)=800/1600=0.50\). Half of EPS grades are below a B versus 36.6% overall — a sign of dependence. \[ P(LB\mid E)=\frac{800}{1600}=0.500 \]
- (d) 用三种判定的任意一种。比较 \(P(E\mid LB)=0.219\) 与 \(P(E)=0.16\):不相等 → 不独立。或用乘法检验:\(P(E)P(LB)=0.16\times0.3656=0.0585\),而 \(P(E\cap LB)=800/10000=0.08\),也不相等。 (d) Use any of the three tests. \(P(E\mid LB)=0.219\neq P(E)=0.16\) → dependent. Or check \(P(E)P(LB)=0.16\times0.3656=0.0585\) against \(P(E\cap LB)=0.08\) — again unequal. \[ 0.16\times0.3656=0.0585\neq0.08=P(E\cap LB) \]
例 2 树状图算“总体比例”Example 2 A tree diagram for an overall proportion
(a) 画出树状图并标出所有枝末概率。
(b) 求全体成年网民中访问过视频网站的比例。
(c) 已知某人访问过视频网站,他是 18–29 岁的概率是多少? Among adult internet users, 27% are 18–29, 45% are 30–49 and 28% are 50+; the share who visited a video site is 70%, 51% and 26% respectively.
(a) Draw the tree and label every branch end.
(b) Find the overall share who visited.
(c) Given that a person visited, what is the probability they are 18–29?
- (a) 第一层是年龄,第二层是访问。三层年龄概率之和 \(0.27+0.45+0.28=1\);每层再分“是 / 否”两枝,同层两枝相加为 1。 (a) Age first, visit second. The age labels sum to \(0.27+0.45+0.28=1\); each node then splits into yes/no, whose labels also add to 1.
- (a) 枝末 = 沿枝相乘。\(0.27\times0.70=0.1890\),\(0.45\times0.51=0.2295\),\(0.28\times0.26=0.0728\);对应的“否”枝为 0.0810、0.2205、0.2072。六个数加起来应为 1。 (a) Branch end = product along the branch. \(0.27\times0.70=0.1890\), \(0.45\times0.51=0.2295\), \(0.28\times0.26=0.0728\); the "no" ends are 0.0810, 0.2205, 0.2072. All six sum to 1.
- (b) 把“是”枝相加。\(P(\text{访问})=0.1890+0.2295+0.0728=0.4913\)。这就是“按年龄加权平均”,权重是各年龄段的占比。 (b) Add the "yes" ends. \(P(\text{visit})=0.1890+0.2295+0.0728=0.4913\) — the age-weighted average of the three rates. \[ P(\text{visit})=0.1890+0.2295+0.0728=0.4913 \]
- (c) 条件概率的分子分母都在树上。\(P(18\text{–}29\mid\text{访问})=\dfrac{0.1890}{0.4913}\approx0.385\)。分母是“访问”的总概率(0.4913),分子是“既 18–29 又访问”的枝末(0.1890)。 (c) Both parts live on the tree. \(P(18\text{–}29\mid\text{visit})=\dfrac{0.1890}{0.4913}\approx0.385\). The denominator is the total visit probability; the numerator is the "18–29 and visited" branch end. \[ P(18\text{–}29\mid\text{visit})=\frac{0.1890}{0.4913}\approx0.385 \]
随堂练习Check Your Understanding
先自己选,再点“查看解答”。每题都给出考点、逐步推理与错误选项诊断——错也要错得明白。 Choose first, then reveal. Every question comes with the tested idea, step-by-step reasoning and a diagnosis of each wrong option.
沿用本讲的双向表(学生 195、教职工 164、欧系车 45,其中学生开欧系车的 33 人,共 359 人)。随机选一位驾驶者,已知他开的是欧系车,他是学生的概率为
Using this lecture's table (195 students, 164 staff, 45 European cars, 33 of them students, 359 total): given that a randomly chosen driver owns a European car, the probability of being a student is
- a\(33/359\approx0.092\)\(33/359\approx0.092\)
- b\(33/195\approx0.169\)\(33/195\approx0.169\)
- c\(33/45\approx0.733\)\(33/45\approx0.733\)
- d\(45/359\approx0.125\)\(45/359\approx0.125\)
- 先圈出条件Underline the condition “已知他开的是欧系车”把总体限制在 45 人里,其余 314 人不在考虑范围内。"Given a European car" restricts the population to 45 people; the other 314 are no longer in play. 分母 = 45。Denominator = 45.
- 再挑分子Pick the numerator 45 位欧系车主中,学生有 33 人,所以概率为 \(33/45\approx0.733\)。用公式核对:\(P(\text{学生}\mid\text{欧系})=\dfrac{33/359}{45/359}=\dfrac{33}{45}\)。Of the 45 European-car owners, 33 are students, so the probability is \(33/45\approx0.733\). By formula: \(P(\text{student}\mid\text{European})=\dfrac{33/359}{45/359}=\dfrac{33}{45}\). \[ P(S\mid E)=\frac{P(S\cap E)}{P(E)}=\frac{33/359}{45/359}=\frac{33}{45}\approx0.733 \] 答案 c。Answer c.
| 选项Option | 判断与理由Verdict & reason |
|---|---|
| a | 错。\(33/359\) 是“既学生又开欧系车”的联合概率,没有用条件。Wrong: \(33/359\) is the joint probability, with no conditioning. |
| b | 错。\(33/195\) 是反方向 \(P(\text{欧系}\mid\text{学生})\),分母用错了组。Wrong: \(33/195\) is the reverse direction \(P(\text{European}\mid\text{student})\) — wrong denominator. |
| c | 对。条件为欧系车,分母 45,分子 33。Correct: condition European, denominator 45, numerator 33. |
| d | 错。\(45/359\) 是“开欧系车”的边际概率。Wrong: \(45/359\) is the marginal probability of a European car. |
某班 50 名学生中,23 名男生、7 名左撇子,且男生中有 3 名左撇子。记 M=“男生”,L=“左撇子”。下列判断正确的是
In a class of 50, there are 23 males and 7 left-handers, and 3 males are left-handed. Let M = "male" and L = "left-handed". Which statement is correct?
- a独立,因为 \(3/23\approx0.130\) 与 \(7/50=0.140\) 很接近Independent, because \(3/23\approx0.130\) is close to \(7/50=0.140\)
- b不独立,因为 \(P(L\mid M)\neq P(L)\)Not independent, because \(P(L\mid M)\neq P(L)\)
- c独立,因为 \(P(M\cap L)=3/50=0.06\)Independent, because \(P(M\cap L)=3/50=0.06\)
- d无法判断,因为样本量太小Cannot be determined; the sample is too small
- 算两个方向的条件概率Compute both conditionals \(P(L\mid M)=3/23\approx0.130\);而全班左撇子的比例 \(P(L)=7/50=0.140\)。两者不相等。\(P(L\mid M)=3/23\approx0.130\), while the class-wide share is \(P(L)=7/50=0.140\). Not equal. \[ P(L\mid M)=\frac{3}{23}\approx0.130\ \neq\ 0.140=\frac{7}{50} \] 不独立。Dependent.
- 用乘法法则复核Cross-check with multiplication 若独立,应有 \(P(M\cap L)=(23/50)(7/50)=0.0644\);实际 \(P(M\cap L)=3/50=0.06\),同样不等。If independent, \(P(M\cap L)=(23/50)(7/50)=0.0644\); in fact \(P(M\cap L)=3/50=0.06\), again unequal. \[ \frac{23}{50}\times\frac{7}{50}=0.0644\ \neq\ 0.06 \] 两种判法结论一致:不独立。Both tests agree: dependent.
| 选项Option | 判断与理由Verdict & reason |
|---|---|
| a | 错。“接近”不是独立;独立要求严格相等。Wrong: "close" is not independent; the requirement is exact equality. |
| b | 对。\(P(L\mid M)=0.130\neq0.140=P(L)\)。Correct: \(P(L\mid M)=0.130\neq0.140=P(L)\). |
| c | 错。联合概率本身不能证明独立;要把它和 \(P(M)P(L)\) 比较。Wrong: a joint probability alone never proves independence; compare it with \(P(M)P(L)\). |
| d | 错。这是对全班 50 人的普查式数据,不存在“样本太小无法判断”。Wrong: this is the whole class of 50, not a sample — no inference problem. |
一个盒子里有 5 个红球、3 个蓝球。先随机取一个球不放回,再取第二个。两次都取到红球的概率是
A box holds 5 red and 3 blue balls. One ball is drawn at random without replacement, then a second. The probability that both are red is
- a\(\frac58\times\frac58=\frac{25}{64}\)\(\frac58\times\frac58=\frac{25}{64}\)
- b\(\frac58\times\frac47=\frac{5}{14}\)\(\frac58\times\frac47=\frac{5}{14}\)
- c\(\frac58+\frac47=\frac{67}{56}\)\(\frac58+\frac47=\frac{67}{56}\)
- d\(\frac58\times\frac48=\frac{1}{4}\)\(\frac58\times\frac48=\frac{1}{4}\)
- 第一次:8 个球里 5 个红First draw: 5 red of 8 \(P(\text{第一次红})=5/8\)。\(P(\text{first red})=5/8\). 分母 8。Denominator 8.
- 第二次:条件变了Second draw: the world changed 已知第一次取了红球且不放回,盒里只剩 7 个球、4 个红。所以 \(P(\text{第二次红}\mid\text{第一次红})=4/7\)。Given a red was removed, 7 balls remain with 4 red, so \(P(\text{second red}\mid\text{first red})=4/7\). 第二个因子必须用条件概率。The second factor must be conditional.
- 相乘Multiply \(P(\text{都红})=\frac58\times\frac47=\frac{20}{56}=\frac{5}{14}\approx0.357\)。若放回,第二次仍是 \(5/8\),答案才是 \(25/64\)。\(P(\text{both red})=\frac58\times\frac47=\frac{20}{56}=\frac{5}{14}\approx0.357\). With replacement the second draw would again be \(5/8\), giving \(25/64\). \[ P(\text{both red})=\frac{5}{8}\times\frac{4}{7}=\frac{20}{56}=\frac{5}{14}\approx0.357 \] 答案 b。Answer b.
| 选项Option | 判断与理由Verdict & reason |
|---|---|
| a | 错。这是“放回”的算法,第二次仍是 5/8。Wrong: this assumes replacement; the second draw would again be 5/8. |
| b | 对。不放回时第二次是 4/7。Correct: without replacement the second draw is 4/7. |
| c | 错。“都发生”用乘法不用加法,而且结果超过 1。Wrong: "both" uses multiplication, and the value exceeds 1. |
| d | 错。4/8 是“放回且把取走的球也算回去”的混搭,不符合情境。Wrong: 4/8 mixes the two scenarios and matches neither. |
掷一枚公平的六面骰子。设 A=“点数为 2”,B=“点数为奇数”。
(a) 求 \(P(A)\)、\(P(B)\)、\(P(A\cap B)\)。
(b) A 与 B 互斥吗?
(c) A 与 B 独立吗?请用定义说明。
(d) 一般地,若 \(P(A)>0\)、\(P(B)>0\) 且 A、B 互斥,能否独立?为什么?
Roll a fair six-sided die. Let A = "the roll is 2" and B = "the roll is odd".
(a) Find \(P(A)\), \(P(B)\), \(P(A\cap B)\).
(b) Are A and B disjoint?
(c) Are A and B independent? Justify with the definition.
(d) In general, if \(P(A)>0\), \(P(B)>0\) and A, B are disjoint, can they be independent? Why?
- (a) 基本概率(a) Basic probabilities \(P(A)=1/6\);奇数是 {1,3,5},故 \(P(B)=3/6=1/2\);2 不是奇数,所以 A 与 B 没有共同结果,\(P(A\cap B)=0\)。\(P(A)=1/6\); odd numbers are {1,3,5}, so \(P(B)=3/6=1/2\); 2 is not odd, so the events share no outcome and \(P(A\cap B)=0\). \[ P(A)=\frac16,\quad P(B)=\frac12,\quad P(A\cap B)=0 \] 交集概率为 0。The intersection has probability 0.
- (b) 互斥(b) Disjoint 掷出 2 就不可能同时是奇数,两件事没有共同结果。A roll of 2 cannot also be odd; no outcome is in both. 互斥,因为 \(P(A\cap B)=0\)。Disjoint, since \(P(A\cap B)=0\).
- (c) 用定义判断独立(c) Test independence 若独立需 \(P(A\cap B)=P(A)P(B)=\frac16\times\frac12=\frac{1}{12}\),但实际是 0。或看条件概率:\(P(A\mid B)=\frac{P(A\cap B)}{P(B)}=\frac{0}{1/2}=0\neq\frac16=P(A)\)——知道点数是奇数,反而让“点数为 2”变得不可能。Independence would need \(P(A\cap B)=\frac16\times\frac12=\frac{1}{12}\), but it is 0. Equivalently \(P(A\mid B)=0\neq\frac16=P(A)\): knowing the roll is odd makes "a 2" impossible. \[ P(A)P(B)=\frac{1}{12}\neq0=P(A\cap B) \] 不独立,而且方向相反:互斥让它们极端依赖。Not independent — the opposite: disjointness makes them extremely dependent.
- (d) 一般结论(d) The general claim 若互斥,则 \(P(A\cap B)=0\);若又独立,则 \(P(A\cap B)=P(A)P(B)>0\)(因为两个概率都为正)。0 不可能同时大于 0,矛盾。所以概率为正的互斥事件一定不独立。Disjoint gives \(P(A\cap B)=0\); independent would give \(P(A\cap B)=P(A)P(B)>0\) since both probabilities are positive. Zero cannot be positive — a contradiction. So disjoint events with positive probabilities are never independent. AP 标准句式:“因为 \(P(A\cap B)=0\) 而 \(P(A)P(B)>0\),所以不独立。”AP model sentence: "Since \(P(A\cap B)=0\) while \(P(A)P(B)>0\), the events are not independent."
本讲小结Summary
- 条件概率 \(P(B\mid A)=\dfrac{P(A\cap B)}{P(A)}\) 的本质是换分母:从全体换成 A。竖线后面是条件,也是新的总体。
- \(P(B\mid A)\neq P(A\mid B)\)。成绩表里 0.219 与 0.50 的差别,全部来自分母不同。
- 乘法法则 \(P(A\cap B)=P(A)P(B\mid A)\):事件有先后顺序时,沿故事线相乘;它其实是条件概率公式的变形。
- 独立有三种等价写法:\(P(B\mid A)=P(B)\)、\(P(A\mid B)=P(A)\)、\(P(A\cap B)=P(A)P(B)\)。判定必须比较数值,不能凭“看起来接近”。
- 树状图:沿枝相乘、枝末相加。所有枝末之和必须为 1,这是最快的自检。
- 互斥 ≠ 独立:概率为正时,互斥意味着 \(P(B\mid A)=0\),恰恰是极端依赖。三类口令:AND 用乘、OR 用加、GIVEN 换分母。
- A conditional probability \(P(B\mid A)=\dfrac{P(A\cap B)}{P(A)}\) is a change of denominator: from everyone to A. Whatever follows the bar is the condition and the new universe.
- \(P(B\mid A)\neq P(A\mid B)\). The 0.219 versus 0.50 in the grade table differ only in their denominators.
- The multiplication rule \(P(A\cap B)=P(A)P(B\mid A)\): when events come in order, multiply along the story; it is the conditional formula rearranged.
- Independence has three equivalent forms: \(P(B\mid A)=P(B)\), \(P(A\mid B)=P(A)\), \(P(A\cap B)=P(A)P(B)\). Judge by comparing numbers, never by "looks close".
- Tree diagrams: multiply along a branch, add branch ends; all ends must total 1 — the fastest self-check.
- Disjoint ≠ independent: with positive probabilities, disjointness forces \(P(B\mid A)=0\), extreme dependence. Three cues: AND multiply, OR add, GIVEN changes the denominator.
离散与连续随机变量Discrete and Continuous Random Variables
前十二讲我们一直在“看数据”,从这一讲开始,主角换成了随机变量把随机试验的结果翻译成数字的规则,通常记作 X;它取到的具体数值记作 x。A rule that turns the outcome of a chance process into a number; written X, with a realised value x.。只要我们能用“取值 + 概率”完整描述它,就能算它的中心(均值)与离散程度(标准差)——这两个数字就是后面所有推断的原料。凡是“期望值”“长期平均”“平均会差多少”这类说法,答案都在这一讲里。
For twelve lectures we have been reading data; from here on the main character is the random variableA rule that turns the outcome of a chance process into a number.把随机试验的结果翻译成数字的规则。. Once a variable is fully described by its values and their probabilities, we can compute its center (mean) and spread (standard deviation) — the raw material for every inference that follows. "Expected value", "long-run average", "how far off on average" all live in this lecture.
本讲学习目标Learning Objectives
- 说清随机变量与它的概率分布之间的对应关系:分布给的是“每一个取值有多大概率”,不是“这次会是多少”。
- 写出离散随机变量的概率分布表,并用两条硬性条件检验它是否合法:每个概率在 \(0\) 与 \(1\) 之间,全部概率之和恰好等于 \(1\)。
- 用 \( \mu_X=\sum x_i p_i \) 计算并解释离散随机变量的均值(期望值)——它是长期平均,不必是一个可能取到的值,也不必是整数。
- 用 \( \sigma_X^2=\sum (x_i-\mu_X)^2p_i \) 计算方差与标准差,并用一句话解释“平均偏离均值多少”。
- 熟练使用计算器:取值放 L1、概率放 L2,用 1-Var Stats 求出加权均值与标准差,并知道要读 σx 而不是 Sx。
- 描述连续随机变量:概率 = 密度曲线下的面积,任何单点的概率为 0,只有区间才有正概率。
- 掌握连续均匀分布的 \( \mu=\frac{a+b}{2} \) 与 \( \sigma=\frac{b-a}{\sqrt{12}} \),并能算区间概率。
- Explain how a random variable and its probability distribution fit together: the distribution says how likely each value is, not what will happen this time.
- Write the probability distribution of a discrete random variable and CHECK that it is legitimate: every probability lies in \([0,1]\) and the probabilities sum to exactly 1.
- CALCULATE and INTERPRET the mean (expected value) \( \mu_X=\sum x_i p_i \) — a long-run average that need not be an attainable value or an integer.
- CALCULATE the variance \( \sigma_X^2=\sum (x_i-\mu_X)^2p_i \) and its square root, and INTERPRET the SD as the typical distance from the mean.
- Use the calculator: values in L1, probabilities in L2, then 1-Var Stats; read σx, never Sx.
- DESCRIBE a continuous random variable: probability is the area under a density curve; every single point has probability 0, only intervals have positive probability.
- Use the continuous uniform distribution: \( \mu=\frac{a+b}{2} \), \( \sigma=\frac{b-a}{\sqrt{12}} \), and compute interval probabilities as areas of rectangles.
核心概念Core Concepts
6.1.1 从随机试验到随机变量:X 是一条“翻译规则”6.1.1 From a chance process to a random variable: X is a translation rule
随机变量不是“随便变的数”,而是一条规则:每个可能的结果 → 一个数字。规则定下来之后,剩下的问题只有一个——这个数字有多大可能出现?
A random variable is not "a number that changes"; it is a rule that sends every outcome to a number. Once the rule is fixed, only one question remains — how likely is each number?
第 1 讲我们已经区分过“确定的数”与“还没发生的数”。现在把这个想法做实:抛三次均匀硬币,结果有 \(2^3=8\) 种(HHH、HHT、HTH、…、TTT)。这些结果本身不是数,没法直接算平均。于是我们定义
Lecture 1 separated certain numbers from not-yet-happened ones. Let us make it concrete: toss a fair coin three times — there are \(2^3=8\) equally likely outcomes (HHH, HHT, HTH, …, TTT). Outcomes are not numbers, so we cannot average them. So we define
| 随机试验Chance process | 随机变量 XRandom variable X | 可能的取值Possible values | 类型Type |
|---|---|---|---|
| 抛三次硬币Toss a coin 3 times | 正面出现的次数number of heads | 0, 1, 2, 3 | 离散discrete |
| 抽一张牌并记录花色与点数Draw a card | 按规则能拿到的奖金prize won under a rule | 0, 5, 10, 100 | 离散discrete |
| 随机选一位年轻女性Choose a young woman at random | 她的身高(英寸)her height (inches) | 一个区间里的任意数any number in an interval | 连续continuous |
| 等下一班公交Wait for the next bus | 等待时间(分钟)waiting time (minutes) | [0, 15] 内任意数any value in [0, 15] | 连续continuous |
有了 \(X\),还要给每个取值配上概率,才算“描述完整”。取值 + 概率合在一起,就叫 \(X\) 的概率分布。记住记号:大写 \(X\) 是变量本身,小写 \(x\) 是它取到的某个值,\(P(X=x)\) 简写成 \(p(x)\)。题目里看到“设 X = …”这一步千万别跳过,它是后面所有计算的支点。
Having \(X\) is not enough — each value needs a probability. Values + probabilities together form the probability distribution of \(X\). Notation: capital \(X\) is the variable, lower-case \(x\) is one value it takes, and \(P(X=x)\) is shortened to \(p(x)\). Never skip the "Let X = …" sentence in a problem; every later calculation hangs on it.
6.1.2 离散随机变量:一张表 + 两条硬条件6.1.2 Discrete random variables: one table, two hard conditions
离散随机变量的分布是一张“取值—概率”表。它合法的条件只有两条:每个概率在 0 与 1 之间,且全部加起来恰好等于 1。
The distribution of a discrete random variable is a "value–probability" table. It is legitimate under just two conditions: every probability lies between 0 and 1, and they all add up to exactly 1.
离散的意思是“可以一个一个列出来”,取值之间有间隙(0、1、2、3…)。判断合法性时,先扫一遍有没有负数或大于 1 的“概率”,再把整列加起来——加起来不等于 1,这张表就是废的,后面的均值和标准差全部作废。
Discrete means the values can be listed one by one, with gaps between them (0, 1, 2, 3…). To check legitimacy, first scan for negative entries or entries above 1, then add the whole column — if the total is not 1, the table is invalid and every mean and SD computed from it is worthless.
先看抛三次硬币的完整分布:三个正面只有 HHH 一种;两个正面有 HHT、HTH、THH 三种。所以概率依次是 \(1/8,3/8,3/8,1/8\),加起来正好 1。再看一个真实一点的例子——新生儿 Apgar 评分新生儿出生后 1 分钟做的健康评分,0–10 分,分数越高越健康;7 分及以上通常视为健康。A 0–10 health score assigned one minute after birth; 7 or above usually indicates a healthy baby.,它是 0 到 10 的整数,是典型的离散随机变量。
Start with three coin tosses: three heads happens only as HHH; two heads happens as HHT, HTH, THH. The probabilities are \(1/8, 3/8, 3/8, 1/8\), summing to exactly 1. Now a real example — the Apgar scoreA 0–10 health score given one minute after birth; 7+ usually indicates a healthy baby.新生儿出生 1 分钟后的 0–10 分健康评分,7 分及以上通常视为健康。 of a newborn, an integer from 0 to 10: a classic discrete random variable.
第 3–4 讲描述数据时用“形状、中心、离散程度、异常值”;描述随机变量完全一样,只是把“样本”换成“概率”。这张图:形状左偏;中心在 8–9 之间(下面会算出 8.128);离散程度由标准差衡量(1.437);异常值是 0–2 分这些低概率取值,概率虽小但真实存在,不能删。
Lectures 3–4 described data with shape, center, spread and outliers; describing a random variable is identical, with "sample" replaced by "probability". This figure: shape skewed left; center between 8 and 9 (8.128 below); spread measured by the SD (1.437); outliers are the rare low scores 0–2 — unlikely but real, so they cannot be deleted.
6.1.3 均值:概率就是权重6.1.3 The mean: probability is the weight
离散随机变量的均值 \( \mu_X=\sum x_ip_i \) 就是以概率为权重的加权平均;它回答的是“重复无数次之后,平均落在哪里”。
The mean of a discrete random variable, \( \mu_X=\sum x_ip_i \), is a weighted average with probabilities as weights; it answers "where does the average land after infinitely many repetitions?"
为什么不是普通平均?因为普通平均默认每个取值“一样重要”(各占 \(1/k\))。可 Apgar 评分取 10 的概率是 0.053,取 9 的概率是 0.437——后者出现的次数是前者的八倍多,它对“长期平均”的贡献当然更大。把概率当权重,正好完成这件事。
Why not a plain average? A plain average treats every value as equally important (weight \(1/k\)). But Apgar 10 has probability 0.053 while 9 has 0.437 — nine occurs more than eight times as often, so it deserves more weight in the long-run average. Probability as weight does exactly that.
| \(x\) | \(p(x)\) | \(x\cdot p(x)\) | \((x-\mu_X)^2p(x)\) |
|---|---|---|---|
| 0 | 0.001 | 0.000 | 0.066 |
| 1 | 0.006 | 0.006 | 0.305 |
| 2 | 0.007 | 0.014 | 0.263 |
| 3 | 0.008 | 0.024 | 0.210 |
| 4 | 0.012 | 0.048 | 0.205 |
| 5 | 0.020 | 0.100 | 0.196 |
| 6 | 0.038 | 0.228 | 0.172 |
| 7 | 0.099 | 0.693 | 0.126 |
| 8 | 0.319 | 2.552 | 0.005 |
| 9 | 0.437 | 3.933 | 0.332 |
| 10 | 0.053 | 0.530 | 0.186 |
| 合计Total | 1.000 | 8.128 | 2.066 |
第三列加起来得到 \( \mu_X=8.128 \)。解读要完整:“随机选一名新生儿,其 Apgar 评分的长期平均是 8.128 分。”注意两点——期望值不必是可能取到的值(没人得 8.128 分),也不必是整数;它描述的是“很多很多次之后的平均”,不是“下一次会怎样”。
The third column adds to \( \mu_X=8.128 \). A complete interpretation: "the long-run average Apgar score of a randomly chosen newborn is 8.128." Two cautions — the expected value need not be attainable (nobody scores 8.128) or an integer; it describes the average over many repetitions, not "what happens next time".
6.1.4 方差与标准差:还是加权,加在“平方偏离”上6.1.4 Variance and SD: same weighting, applied to squared distances
离散随机变量的方差,是每个取值到均值的距离平方再按概率加权平均;标准差是它的平方根,读作“平均偏离均值多少”。
The variance of a discrete random variable is the squared distance from each value to the mean, averaged with probabilities as weights; the SD is its square root, read as "the typical distance from the mean".
上表第四列就是每个 \((x-\mu_X)^2p(x)\),加起来是 \( \sigma_X^2=2.066 \),开根号得 \( \sigma_X\approx 1.437 \)。解读:“随机选一名新生儿,其 Apgar 评分与均值 8.128 分平均相差约 1.4 分。”——必须有“平均相差”这个意思,只报数字不给分。
The fourth column above holds each \((x-\mu_X)^2p(x)\); they add to \( \sigma_X^2=2.066 \), whose square root is \( \sigma_X\approx 1.437 \). Interpretation: "a randomly chosen newborn's Apgar score differs from the mean 8.128 by about 1.4 points on average." The phrase "on average differs" is required for credit.
L1 = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10} L2 = {.001, .006, .007, .008, .012, .020, .038, .099, .319, .437, .053}
1-Var Stats L1, L2 → x̄ = 8.128 σx = 1.437
计算器同时给出 Sx 与 σx。Sx 用 \(n-1\) 做分母,是“把清单当样本”时的标准差;随机变量的标准差用 \( \sigma_X=\sum(x_i-\mu_X)^2p_i \) 定义,对应输出里的 σx。在 L1/L2 的加权设定下,两者数值不同,考试写错一个数就是白丢分。
The calculator prints both Sx and σx. Sx uses the \(n-1\) denominator, i.e. it treats the list as a sample; a random variable's SD is defined by \( \sigma_X=\sum(x_i-\mu_X)^2p_i \), which is the σx output. With L1/L2 weights the two numbers differ, and writing the wrong one loses the point.
算出 \( \sigma_X^2=2.066 \) 之后必须先开根号才能叫“标准差”;有人嫌 1.437 不好看,直接写 \( \sigma=-1.437 \),这在数学上不可能。另外方差的单位是“分²”,读起来没有意义,所以要报告标准差。
After computing \( \sigma_X^2=2.066 \), take the square root before calling it an SD. Reporting \( \sigma=-1.437 \) is impossible. Also, the variance's unit is "points squared", which reads as nonsense in context — report the SD.
6.1.5 连续随机变量:概率是面积,不是高度6.1.5 Continuous random variables: probability is area, not height
连续随机变量取值铺满一个区间,概率 = 密度曲线下的面积;因此任何一个精确值的概率都是 0,只有区间才有正概率。
A continuous random variable fills an interval, and probability is the area under the density curve; therefore every exact value has probability 0, and only intervals carry positive probability.
测量出来的东西(身高、体重、等待时间、温度)通常是连续的。把密度曲线画出来,横轴是取值、纵轴是密度:曲线本身不直接给概率,它下方的面积才给。整条曲线下的总面积恒为 1;问“\(Y\) 落在 68 到 70 之间”的概率,就是求那一段的面积。
Things you measure — height, weight, waiting time, temperature — are usually continuous. Draw the density curve with values on the horizontal axis and density on the vertical: the curve itself is not a probability, but the area under it is. The total area is exactly 1, and "the probability that \(Y\) lies between 68 and 70" is the area of that slice.
真正的分水岭是单点概率是否为零。离散型:\(P(X=8)=0.319>0\),柱子的高度就是概率。连续型:\(P(Y=68)=0\),因为一条线没有面积;所以 \(P(Y<68)=P(Y\le 68)\),加不加等号完全一样。这解释了为什么“概率为 0”并不等于“不可能发生”——身高恰好等于 68.000… 的概率是 0,但身高落在 68 附近是很常见的。
The real dividing line is whether a single point has probability zero. Discrete: \(P(X=8)=0.319>0\), and the bar height is the probability. Continuous: \(P(Y=68)=0\), because a line has no area — hence \(P(Y<68)=P(Y\le 68)\); the inequality sign does not matter. This explains why "probability 0" does not mean "impossible": the chance of a height being exactly 68.000… is 0, yet heights near 68 are common.
第二个坑是关于密度的高度:密度可以大于 1(比如把取值压在一个很窄的区间上),因为它不是概率,只有面积才被限制在 [0, 1]。第 6 讲的正态曲线这里正式用上了——那时我们只会“查面积”,现在我们知道那面积就是概率。
A second trap concerns the height of the density: a density may exceed 1 (squeeze the values into a narrow interval), because it is not a probability; only areas are bounded by [0, 1]. The Normal curve from Lecture 6 is now fully in use: back then we "looked up areas"; now we know those areas are probabilities.
6.1.6 连续均匀分布:把概率摊平6.1.6 The continuous uniform distribution: probability spread flat
均匀分布把全部概率平均摊在区间 \([a,b]\) 上,密度是常数 \( \frac{1}{b-a} \);于是算概率退化成算矩形面积。
The uniform distribution spreads all probability evenly over \([a,b]\), so the density is the constant \( \frac{1}{b-a} \) and computing a probability reduces to the area of a rectangle.
算均匀概率只要三秒:区间长度 ÷ 总长度。本例 \( \mu=\frac{0+15}{2}=7.5 \) 分钟,\( \sigma=\frac{15-0}{\sqrt{12}}\approx 4.33 \) 分钟。解读:“随机等一次车,平均等 7.5 分钟;实际等待时间与 7.5 分钟平均相差约 4.3 分钟。”
A uniform probability takes three seconds: interval length ÷ total length. Here \( \mu=\frac{0+15}{2}=7.5 \) minutes and \( \sigma=\frac{15-0}{\sqrt{12}}\approx 4.33 \) minutes. Interpretation: "a randomly chosen wait averages 7.5 minutes, and actual waits differ from 7.5 by about 4.3 minutes on average."
离散型:概率 = 柱高;连续型:概率 = 面积。均匀分布:面积 = 长度 ÷ 总长度。三句话覆盖本节所有计算。
Discrete: probability = bar height. Continuous: probability = area. Uniform: area = length ÷ total length. Three lines cover every calculation in this section.
例题精讲Worked Examples
例 1 这个游戏值得玩吗?用期望值判断Example 1 Is this game worth playing? Deciding with expected value
- 先数清每种结果的张数再给概率。红桃 A 有 1 张(\(1/52\));其他 A 有 3 张(\(3/52\));其他红桃有 \(13-1=12\) 张(\(12/52\));剩下的非红桃非 A 有 \(52-1-3-12=36\) 张(\(36/52\))。检查:\(1+3+12+36=52\),概率和为 1。 First count the cards behind each outcome. Ace of hearts: 1 card (\(1/52\)). Other aces: 3 cards (\(3/52\)). Other hearts: \(13-1=12\) cards (\(12/52\)). Remaining cards: \(52-1-3-12=36\) (\(36/52\)). Check: \(1+3+12+36=52\), so the probabilities sum to 1.
- 用加权平均求期望奖金。注意 \(X=0\) 那项的贡献是 0,但它必须留在表里,否则概率和就不是 1 了。 Use the weighted average. The \(X=0\) term contributes 0, but it must stay in the table or the probabilities no longer sum to 1. \[ \mu_X=100\cdot\tfrac{1}{52}+10\cdot\tfrac{3}{52}+5\cdot\tfrac{12}{52}+0\cdot\tfrac{36}{52}=\frac{100+30+60}{52}=\frac{190}{52}\approx 3.65 \]
- (b) 净收益 \(Y=X-5\)。这里不要重新算一遍分布——加减常数只平移中心:\( \mu_Y=\mu_X-5 \)。 (b) Net gain \(Y=X-5\). Do not rebuild the distribution: adding or subtracting a constant only shifts the center, so \( \mu_Y=\mu_X-5 \). \[ \mu_Y=3.65-5=-1.35 \]
- 把结论写回情境:一局亏 $1.35 是“长期平均”,不是“每局都亏这么多”——抽到红桃 A 你就赚 $95。 Put the conclusion back in context: losing $1.35 per play is a long-run average, not what happens every game — draw the ace of hearts and you gain $95.
例 2 从一张不完整的表出发:补概率 + 算 μ 与 σExample 2 Starting from an incomplete table: fill in p, then find μ and σ
- (a) 概率之和必须等于 1,所以缺的那块是 \(1-(0.1+0.4+0.3)=0.2\)。这一步几乎每道题都有,先做它。 (a) The probabilities must add to 1, so the missing piece is \(1-(0.1+0.4+0.3)=0.2\). Nearly every problem has this step — do it first. \[ P(X=3)=0.2 \]
- (b) 均值:\(0(0.1)+1(0.4)+2(0.3)+3(0.2)=1.6\)。 (b) Mean: \(0(0.1)+1(0.4)+2(0.3)+3(0.2)=1.6\). \[ \mu_X=0+0.4+0.6+0.6=1.6 \]
- 方差:先算 \( \sum x^2p(x) \) 再减 \( \mu_X^2 \)(这是等价算法,比逐项算偏差快):\( \sum x^2p(x)=0+0.4+1.2+1.8=3.4 \)。 Variance: compute \( \sum x^2p(x) \) and subtract \( \mu_X^2 \) (equivalent and faster than computing every deviation): \( \sum x^2p(x)=0+0.4+1.2+1.8=3.4 \). \[ \sigma_X^2=3.4-1.6^2=3.4-2.56=0.84,\qquad \sigma_X=\sqrt{0.84}\approx 0.917 \]
- (c) 营业额 \(R=4X-1\)(一次购买只收一次包装成本)。线性变换把中心和离散程度一起搬过去:\( \mu_R=4(1.6)-1=5.4 \)。 (c) Revenue \(R=4X-1\) (the packaging cost is charged once per purchase). The linear transformation moves center and spread together: \( \mu_R=4(1.6)-1=5.4 \). \[ \mu_R=6.4-1=5.4,\qquad \sigma_R=4(0.917)\approx 3.67 \]
例 3 连续型:把概率算成面积Example 3 Continuous: turning a probability into an area
- 连续型的问题一律“先标准化,再算面积”。\( z=\frac{y-\mu}{\sigma} \),两个端点各算一次。 For continuous problems, standardise first, then compute areas. Use \( z=\frac{y-\mu}{\sigma} \) at both endpoints. \[ z_1=\frac{68-64}{2.7}\approx 1.48,\qquad z_2=\frac{70-64}{2.7}\approx 2.22 \]
- 面积用“大减小”:\( P(1.48\le Z\le 2.22)=\Phi(2.22)-\Phi(1.48) \)。 Areas subtract: \( P(1.48\le Z\le 2.22)=\Phi(2.22)-\Phi(1.48) \). \[ 0.9868-0.9306=0.0562 \]
- \(P(Y=68)=0\):连续型的单点没有面积。这不是“不可能”,只是“恰好等于”这件事在无数可能值里占的宽度为 0。 \(P(Y=68)=0\): a single point has no area for a continuous variable. It is not "impossible" — the event "exactly 68" simply occupies zero width among infinitely many values. \(P(68\le Y\le 70)\approx 5.6\%\),且 \(P(Y=68)=0\)。\(P(68\le Y\le 70)\approx 5.6\%\) and \(P(Y=68)=0\).
- (b) 均匀分布只算长度:\( P(X>10)=\frac{15-10}{15}=\frac13 \)。 (b) Uniform probabilities are lengths: \( P(X>10)=\frac{15-10}{15}=\frac13 \). \[ P(X>10)=\frac{5}{15}\approx 0.333,\qquad P(X=7.5)=0 \]
normalcdf(68, 70, 64, 2.7) → 0.0561
随堂练习Check Your Understanding
先自己选,再点“查看解答”。每题给出考点、逐步推理和错误选项诊断——错也要错得明白。 Choose first, then reveal. Each item comes with the tested idea, step-by-step reasoning and a diagnosis of every wrong option.
下列哪一个可以是离散随机变量的概率分布?
Which of the following could be the probability distribution of a discrete random variable?
- a\(x=1,2,3,4\),对应概率 \(0.2,\ 0.3,\ 0.3,\ 0.2\)\(x=1,2,3,4\) with probabilities \(0.2,\ 0.3,\ 0.3,\ 0.2\)
- b\(x=0,1,2\),对应概率 \(0.5,\ 0.6,\ -0.1\)\(x=0,1,2\) with probabilities \(0.5,\ 0.6,\ -0.1\)
- c\(x=0,1,2,3\),对应概率 \(0.4,\ 0.4,\ 0.4,\ 0.4\)\(x=0,1,2,3\) with probabilities \(0.4,\ 0.4,\ 0.4,\ 0.4\)
- d\(x=0,1,2,3\),对应概率 \(0.1,\ 0.2,\ 0.3,\ 0.3\)\(x=0,1,2,3\) with probabilities \(0.1,\ 0.2,\ 0.3,\ 0.3\)
- 先查“和为 1”Check the sum first a: \(0.2+0.3+0.3+0.2=1.0\) ✓;c: \(4\times0.4=1.6\) ✗;d: \(0.1+0.2+0.3+0.3=0.9\) ✗。a: \(0.2+0.3+0.3+0.2=1.0\) ✓; c: \(4\times0.4=1.6\) ✗; d: \(0.1+0.2+0.3+0.3=0.9\) ✗. c、d 直接出局。c and d are eliminated.
- 再查“每个都在 [0,1]”Then check the range b 虽然和为 \(0.5+0.6-0.1=1\),但出现了负概率 \(-0.1\)。概率不能是负数。b sums to \(0.5+0.6-0.1=1\), but it contains the negative probability \(-0.1\). Probabilities cannot be negative. 只有 a 同时满足两条。Only a satisfies both conditions.
| 选项Option | 判断与理由Verdict & reason |
|---|---|
| a | 对。四个概率都在 [0,1] 内,且和为 1。Correct: all four lie in [0,1] and sum to 1. |
| b | 错。和为 1,但 \(-0.1\) 是负概率。Wrong: sums to 1, but \(-0.1\) is a negative probability. |
| c | 错。每个概率合法,但总和 1.6 > 1。Wrong: each entry is legal, but the total is 1.6 > 1. |
| d | 错。总和 0.9 < 1,剩下的 0.1 概率“消失”了。Wrong: the total is 0.9 < 1 — 0.1 of probability has vanished. |
某随机变量 \(X\) 的分布为:\(P(X=0)=0.3\)、\(P(X=1)=0.4\)、\(P(X=2)=0.2\)、\(P(X=3)=0.1\)。则 \( \mu_X \) 与 \( \sigma_X \) 约为
A random variable has \(P(X=0)=0.3\), \(P(X=1)=0.4\), \(P(X=2)=0.2\), \(P(X=3)=0.1\). Then \( \mu_X \) and \( \sigma_X \) are approximately
- a\( \mu=1.0,\ \sigma=0.95 \)\( \mu=1.0,\ \sigma=0.95 \)
- b\( \mu=1.1,\ \sigma=0.94 \)\( \mu=1.1,\ \sigma=0.94 \)
- c\( \mu=1.1,\ \sigma=0.89 \)\( \mu=1.1,\ \sigma=0.89 \)
- d\( \mu=1.5,\ \sigma=1.12 \)\( \mu=1.5,\ \sigma=1.12 \)
- 第 1 步 均值Step 1 — the mean \[ \mu=0(0.3)+1(0.4)+2(0.2)+3(0.1)=0+0.4+0.4+0.3=1.1 \]
- 第 2 步 平方的期望Step 2 — expected square 这是算方差最快的路线:\( E(X^2)=\sum x^2p(x) \),再减去 \( \mu^2 \)。This is the fastest route: \( E(X^2)=\sum x^2p(x) \), then subtract \( \mu^2 \). \[ E(X^2)=0+0.4+0.8+0.9=2.1,\qquad \sigma^2=2.1-1.21=0.89 \]
- 第 3 步 开根号并解释Step 3 — take the root and interpret \[ \sigma=\sqrt{0.89}\approx 0.943 \] \( \mu=1.1 \)、\( \sigma\approx 0.94 \)。\( \mu=1.1 \), \( \sigma\approx 0.94 \).
| 选项Option | 判断与理由Verdict & reason |
|---|---|
| a | 错。均值算漏了一项,把 \(3(0.1)\) 丢掉了。Wrong: the term \(3(0.1)\) was dropped from the mean. |
| b | 对。\( \mu=1.1 \),\( \sigma^2=0.89 \),\( \sigma=0.943 \)。Correct: \( \mu=1.1 \), \( \sigma^2=0.89 \), \( \sigma=0.943 \). |
| c | 错。报的是方差 0.89,没开根号。Wrong: this is the variance 0.89, not square-rooted. |
| d | 错。把四个取值做了普通平均 \( (0+1+2+3)/4=1.5 \),忽略了概率权重。Wrong: it is the plain average \( (0+1+2+3)/4=1.5 \), ignoring the probability weights. |
公交每 15 分钟一班,某人的等车时间 \(X\sim U(0,15)\)(分钟)。下列哪一项正确?
Buses come every 15 minutes and a person's wait is \(X\sim U(0,15)\) minutes. Which statement is true?
- a\(P(X=7.5)\) 最大,因为 7.5 是均值\(P(X=7.5)\) is largest because 7.5 is the mean
- b\(P(X=7.5)=0\),而 \(P(X>10)=1/3\)\(P(X=7.5)=0\) while \(P(X>10)=1/3\)
- c\(P(X<5)=P(X\le 5)\) 不成立,因为等号会改变概率\(P(X<5)=P(X\le 5)\) fails because the equality sign changes the probability
- d密度曲线的高度 \(1/15\) 就是“等 1 分钟”的概率the density height \(1/15\) equals the probability of a 1-minute wait
- 算区间概率:长度 ÷ 总长度Interval probability: length ÷ total length \[ P(X>10)=\frac{15-10}{15}=\frac{1}{3},\qquad P(X<5)=\frac{5}{15}=\frac{1}{3} \]
- 再判断单点Then judge a single point \(X=7.5\) 是一条竖线,没有宽度就没有面积,所以概率为 0;因此 \(<\) 与 \(\le\) 完全等价。\(X=7.5\) is a vertical line: no width, no area, so probability 0 — hence \(<\) and \(\le\) are interchangeable here. b 正确;a、c 都在这一条上出错。b is right; a and c both fail on this point.
- 密度高度的含义What the density height means 高度 \(1/15\) 要乘上宽度才变成概率;单说“高 1/15”不是任何事件的概率。The height \(1/15\) must be multiplied by a width before it becomes a probability; by itself it is not the probability of any event. d 混淆了“密度”与“概率”。d confuses density with probability.
| 选项Option | 判断与理由Verdict & reason |
|---|---|
| a | 错。均匀分布下每个单点概率都是 0,均值不是“最可能的值”。Wrong: under a uniform density every point has probability 0, so the mean is not a "most likely value". |
| b | 对。单点 0,区间 \(10\) 到 \(15\) 占全部的 \(1/3\)。Correct: the point is 0, and the interval from 10 to 15 is \(1/3\) of the whole. |
| c | 错。加不加等号不影响连续型的概率,因为单点概率为 0。Wrong: the equality sign changes nothing for a continuous variable, since a point has probability 0. |
| d | 错。密度高度不是概率;概率需要“高度 × 宽度”。Wrong: density height is not probability; probability is height × width. |
某活动出售 1000 张奖券,每张 $3。奖金设置:1 张中 $500,10 张中 $20。若你买一张,长期来看
A raffle sells 1 000 tickets at $3 each. Prizes: one ticket wins $500 and ten win $20. If you buy one ticket, in the long run
- a平均赚 $0.70you gain $0.70 on average
- b平均亏 $2.30you lose $2.30 on average
- c平均亏 $3.00you lose $3.00 on average
- d有机会中 $500,所以平均一定赚钱since $500 is possible, the average must be positive
- 第 1 步 奖金的分布Step 1 — the prize distribution \(P(X=500)=1/1000\),\(P(X=20)=10/1000\),\(P(X=0)=989/1000\)。和为 1 ✓。\(P(X=500)=1/1000\), \(P(X=20)=10/1000\), \(P(X=0)=989/1000\). They sum to 1 ✓. \[ \mu_X=500(0.001)+20(0.010)+0(0.989)=0.50+0.20=0.70 \]
- 第 2 步 减去成本Step 2 — subtract the cost \[ \mu_{\text{net}}=0.70-3.00=-2.30 \]
- 第 3 步 结论要带“长期”Step 3 — conclude with "long run" 平均每买一张亏 $2.30;$500 的存在不改变期望,它只是把极小概率配了极大金额。You lose $2.30 per ticket on average; the existence of the $500 prize does not change the expectation — it merely pairs a tiny probability with a large amount.
| 选项Option | 判断与理由Verdict & reason |
|---|---|
| a | 错。这是期望奖金,忘了减票价。Wrong: that is the expected prize; the ticket price was not subtracted. |
| b | 对。\(0.70-3.00=-2.30\)。Correct: \(0.70-3.00=-2.30\). |
| c | 错。等于“从来没中奖”,忽略了 0.70 的期望奖金。Wrong: that assumes you never win, ignoring the 0.70 expected prize. |
| d | 错。中奖金额大不代表期望大;要乘上它那 0.001 的概率。Wrong: a large prize does not imply a large expectation; it must be multiplied by its 0.001 probability. |
本讲小结Summary
- 随机变量把随机试验的结果翻译成数字;它的概率分布给出每个取值(或区间)的概率。
- 离散随机变量:概率表 / 概率直方图;合法条件是每个 \(p_i\in[0,1]\) 且 \( \sum p_i=1 \)。柱高就是概率。
- 离散型的均值 \( \mu_X=\sum x_ip_i \),标准差 \( \sigma_X=\sqrt{\sum (x_i-\mu_X)^2p_i} \);两者都要能用一句话解释。
- 计算器:x 放 L1、p 放 L2,用 1-Var Stats;取 \( \bar x \) 作均值、取 σx 作标准差(不是 Sx)。
- 连续随机变量:概率 = 密度曲线下的面积;任何单点概率为 0,所以 \(<\) 与 \(\le\) 无差别,密度高度也不是概率。
- 连续均匀分布 \(U(a,b)\):\( \mu=\frac{a+b}{2} \)、\( \sigma=\frac{b-a}{\sqrt{12}} \),区间概率 = 长度 ÷ 总长度。
- A random variable turns outcomes into numbers; its probability distribution gives the probability of each value (or interval).
- Discrete: a probability table or histogram; legitimate when every \(p_i\in[0,1]\) and \( \sum p_i=1 \). Bar height is probability.
- Discrete mean \( \mu_X=\sum x_ip_i \) and SD \( \sigma_X=\sqrt{\sum (x_i-\mu_X)^2p_i} \); both must be interpreted in one sentence.
- Calculator: x in L1, p in L2, then 1-Var Stats; take \( \bar x \) as the mean and σx (not Sx) as the SD.
- Continuous: probability is the area under the density; every point has probability 0, so \(<\) and \(\le\) agree and density height is not probability.
- Uniform \(U(a,b)\): \( \mu=\frac{a+b}{2} \), \( \sigma=\frac{b-a}{\sqrt{12}} \), and interval probability = length ÷ total length.
随机变量的变换与组合Transforming and Combining Random Variables
上一讲我们学会了给一个随机变量算均值与标准差。可现实中的问题往往是“换一个单位”“涨价 10%”“两个人一起玩”“两个零件拼成一件产品”——这就是线性变换把随机变量写成 \(Y=a+bX\) 的形式:先乘常数 b,再加常数 a。Writing a random variable as \(Y=a+bX\): multiply by a constant b, then add a constant a.与随机变量的组合把两个或更多随机变量相加或相减,得到一个新的随机变量。Adding or subtracting two or more random variables to form a new one.。这一讲只有三条规则,但 AP 每年都在这三条上设陷阱——尤其是“方差可以相加,标准差永远不能相加”。
Last lecture we computed the mean and SD of one random variable. Real problems, though, involve rescaling, marking up prices, two players, or two parts assembled into one product — that is, linear transformationsWriting \(Y=a+bX\): multiply by b, then add a.把随机变量写成 \(Y=a+bX\):先乘 b,再加 a。 and combinations of random variablesAdding or subtracting two or more random variables to get a new one.把两个或更多随机变量相加或相减得到新变量。. This lecture has only three rules, yet AP plants a trap in them every year — above all "variances add, standard deviations never do".
本讲学习目标Learning Objectives
- DESCRIBE 线性变换 \(Y=a+bX\) 对分布的影响:形状不变,中心按 \( \mu_Y=a+b\mu_X \) 平移缩放,离散程度按 \( \sigma_Y=|b|\sigma_X \) 缩放。
- 说清“加常数不改离散程度”“乘常数按 \(|b|\) 缩放”的理由,而不是背公式。
- 计算两个随机变量之和的均值 \( \mu_{X+Y}=\mu_X+\mu_Y \) 与差 \( \mu_{X-Y}=\mu_X-\mu_Y \),并强调减法顺序不能颠倒。
- 在独立的前提下用 \( \sigma^2_{X\pm Y}=\sigma_X^2+\sigma_Y^2 \) 求方差,再开根号;坚决不用 \( \sigma_X\pm\sigma_Y \)。
- 分辨 \( 2X \) 与 \( X+Y \):前者是把同一个结果放大两倍(\( \sigma=2\sigma_X \)),后者是两个独立结果相加(\( \sigma=\sqrt2\,\sigma_X \))。
- 对独立正态随机变量的和或差,先算新的 \( \mu \) 与 \( \sigma \),再标准化并用 normalcdf 求概率。
- DESCRIBE the effect of a linear transformation \(Y=a+bX\): the shape is unchanged, the center moves to \( \mu_Y=a+b\mu_X \), and the spread scales to \( \sigma_Y=|b|\sigma_X \).
- Explain why adding a constant leaves the spread alone and multiplying scales it by \(|b|\) — rather than memorising formulas.
- CALCULATE the mean of a sum \( \mu_{X+Y}=\mu_X+\mu_Y \) and of a difference \( \mu_{X-Y}=\mu_X-\mu_Y \), stressing that the order of subtraction matters.
- Given independence, use \( \sigma^2_{X\pm Y}=\sigma_X^2+\sigma_Y^2 \) and then take the square root; never use \( \sigma_X\pm\sigma_Y \).
- Distinguish \( 2X \) from \( X+Y \): doubling one outcome gives \( \sigma=2\sigma_X \), while adding two independent outcomes gives \( \sigma=\sqrt2\,\sigma_X \).
- For sums or differences of independent Normal variables, find the new \( \mu \) and \( \sigma \), standardise, and use normalcdf.
核心概念Core Concepts
6.2.1 线性变换:把整个分布“平移 + 拉伸”6.2.1 Linear transformations: shift and stretch the whole distribution
\(Y=a+bX\) 只做两件事:把每个取值乘 \(b\)、再加 \(a\)。所以形状一点不变,中心和离散程度按同样的比例搬家:\( \mu_Y=a+b\mu_X \),\( \sigma_Y=|b|\sigma_X \)。
\(Y=a+bX\) does exactly two things: multiply every value by \(b\), then add \(a\). The shape is untouched, and center and spread move by the same rule: \( \mu_Y=a+b\mu_X \) and \( \sigma_Y=|b|\sigma_X \).
第 2 讲讲描述数据时,我们已经用过同一套结论:给每个观测值加一个常数,所有位置一起平移,图的形状和“胖瘦”都不变;乘以一个常数,所有位置一起拉伸或压缩,图的胖瘦也跟着变。随机变量只是把“每个观测值”换成了“每个可能取值”,规则一模一样——因为概率并没有变,变的只是坐标轴上的数字。
In Lecture 2, when describing data, we already used these facts: adding a constant to every observation shifts everything together, leaving shape and spread unchanged; multiplying by a constant stretches or squeezes everything, spread included. A random variable simply replaces "every observation" with "every possible value", so the rules carry over — the probabilities are untouched, only the numbers on the axis change.
| 变换Transformation | 新的均值New mean | 新的标准差New SD | 形状Shape | 一句话In words |
|---|---|---|---|---|
| \(Y=X+10\) | \( \mu_X+10 \) | \( \sigma_X \) | 不变unchanged | 整体右移,离散程度不变shift right, same spread |
| \(Y=X-10\) | \( \mu_X-10 \) | \( \sigma_X \) | 不变unchanged | 整体左移,离散程度不变shift left, same spread |
| \(Y=2X\) | \( 2\mu_X \) | \( 2\sigma_X \) | 不变unchanged | 中心、离散程度都翻倍center and spread both double |
| \(Y=-3X\) | \( -3\mu_X \) | \( 3\sigma_X \) | 左右翻转,形状类别不变mirrored; same shape type | 负号只改方向,不改离散程度的大小the sign flips direction, not size |
6.2.2 为什么加常数不改 σ,乘常数要取绝对值6.2.2 Why adding leaves σ alone and multiplying uses |b|
标准差衡量的是“离均值多远”。整体平移时每个点到新均值的距离一点没变;整体乘以 \(b\) 时每个距离变成原来的 \( |b| \) 倍,所以\( \sigma \) 乘 \( |b| \),方差乘 \( b^2 \)。
An SD measures "distance from the mean". Shifting changes nothing about those distances; multiplying turns every distance into \( |b| \) times itself, so \( \sigma \) scales by \( |b| \) and the variance by \( b^2 \).
用距离来验证:原来某个取值到均值距离 \(d=x-\mu_X\)。变换后它到新均值的距离是 \( (a+bx)-(a+b\mu_X)=b(x-\mu_X)=bd \),加的那个 \(a\) 直接抵消了——这就是“加常数不影响离散程度”的全部秘密。取平方再按概率加权,就得到 \( b^2\sigma_X^2 \),开根号自然出现 \( |b| \)。
Verify with distances: a value sits \(d=x-\mu_X\) from the old mean. After transforming, its distance to the new mean is \( (a+bx)-(a+b\mu_X)=b(x-\mu_X)=bd \) — the added \(a\) cancels outright. That is the whole secret of "addition does not change spread". Squaring and weighting by probabilities gives \( b^2\sigma_X^2 \), whose square root carries \( |b| \).
标准差是“距离”,距离没有负的。乘负数只让分布照镜子,不会让离散程度变成负的。所以必须写 \( \sigma_{-3X}=|-3|\sigma_X=3\sigma_X \)。
An SD is a distance, and distances are not negative. Multiplying by a negative merely mirrors the distribution; it cannot make spread negative. So write \( \sigma_{-3X}=|-3|\sigma_X=3\sigma_X \).
线性变换后 \(P(Y\le 700)\) 与 \(P(X\le 318)\) 是同一件事。做概率题时,可以“先变换再算”,也可以“先算原变量再对应”,但不要两头都变一次——那等于变了两次。
After a linear transformation, \(P(Y\le 700)\) and \(P(X\le 318)\) are the same event. You may transform first and then compute, or compute in the original scale — but never transform twice, which double-counts.
6.2.3 组合的均值:和加、差减,顺序不能反6.2.3 Means of combinations: sums add, differences subtract, order matters
两个随机变量相加,均值相加;相减,均值相减。这条规则不需要独立性——它对任意两个随机变量都成立。
Means add when variables are added and subtract when they are subtracted. This rule needs no independence — it holds for any two random variables.
为什么不需要独立性?因为期望是“平均”,而平均数天生可以拆开加:\(n\) 个数的平均之和 = 各自平均之和。这一点和方差不同——方差要看两个变量是否一起波动,所以才需要独立性这个前提(下一小节讲)。
Why is independence unnecessary? Because a mean is an average, and averages split additively: the mean of a sum equals the sum of the means. Variances differ — they describe how two variables fluctuate together, which is why the next section needs independence.
6.2.4 方差相加,标准差绝对不相加6.2.4 Variances add; standard deviations never do
在独立的前提下,和与差的方差都等于两个方差之和:\( \sigma^2_{X\pm Y}=\sigma_X^2+\sigma_Y^2 \)。注意两件事:减法也是“加”方差;标准差不能直接相加。
Given independence, the variance of a sum and of a difference both equal the sum of the two variances: \( \sigma^2_{X\pm Y}=\sigma_X^2+\sigma_Y^2 \). Note two things: for a difference you still add variances, and standard deviations never add directly.
\( \sigma_{X-Y}\neq\sigma_X-\sigma_Y \)。如果 \(X\) 与 \(Y\) 独立且 \( \sigma_X=\sigma_Y=\sigma \),那么 \( \sigma_{X-Y}=\sqrt{2}\sigma \),比单个还大。直觉:两个都在抖动的量相减,结果可能更抖。相减为 0 的那种错觉,只有在两个变量完全同步时才出现——那正是不独立的情形。
\( \sigma_{X-Y}\neq\sigma_X-\sigma_Y \). If \(X\) and \(Y\) are independent with \( \sigma_X=\sigma_Y=\sigma \), then \( \sigma_{X-Y}=\sqrt{2}\sigma \), larger than either one. Intuition: subtracting two wobbly quantities can wobble even more. Getting zero requires perfect synchronisation — exactly the dependent case.
\(2X\) 是“同一个结果乘 2”,波动也被放大 2 倍:\( \sigma_{2X}=2\sigma_X \)。而 \(X+Y\)(两个独立的同分布变量)是两个结果相加,波动是 \( \sqrt2\sigma_X \)。AP 最爱的题:一个人玩两局 vs 两个人各玩一局。前者 \(2X\),后者 \(X+Y\),均值都是 \(2\mu\),但标准差一个是 \(2\sigma\)、一个是 \(1.414\sigma\)。
\(2X\) doubles one outcome, doubling the wobble: \( \sigma_{2X}=2\sigma_X \). But \(X+Y\) (two independent copies) adds two outcomes, so the wobble is \( \sqrt2\sigma_X \). The AP favourite: one person playing twice versus two people playing once. The first is \(2X\), the second \(X+Y\); both have mean \(2\mu\), but their SDs are \(2\sigma\) and \(1.414\sigma\).
最后补一句前提:不独立就不能加方差。如果两个变量同涨同落(比如同一批产品的长度与重量),它们的波动会叠加得更厉害,简单相加就低估了。AP 的题目要么明确告诉你“assume independent”,要么用“随机抽取 / 互不影响”来暗示;看到这类字眼才敢用 \( \sigma^2_X+\sigma^2_Y \)。
One caveat: without independence you may not add variances. If two variables rise and fall together (the length and weight of the same product), their fluctuations compound and simple addition understates the spread. AP problems either state "assume independent" or imply it with "randomly selected / do not affect each other". Only then use \( \sigma^2_X+\sigma^2_Y \).
6.2.5 正态的组合:和与差仍然是正态6.2.5 Combining Normals: sums and differences stay Normal
独立正态变量的和或差仍然服从正态分布。所以只要把新的 \( \mu \) 与 \( \sigma \) 算出来,就可以用上一讲的正态工具(标准化 + 查面积)。
Sums and differences of independent Normal variables are still Normal. Once the new \( \mu \) and \( \sigma \) are found, every Normal tool from Lecture 6 applies (standardise, then read areas).
这一条不是“近似”,是精确的定理:两个正态一组合,结果必是正态,不管样本量多少。注意区别——若不是正态,那么“和近似正态”要等 \(n\) 很大才成立(那是第 17 讲的中心极限定理,本讲不涉及)。所以本题型的第一步永远是:先说一句“T 是独立正态变量的和,故 T 服从正态分布。”
This is not an approximation but an exact theorem: combining two Normals always yields a Normal, for any sample size. Note the contrast — for non-Normal variables, "the sum is approximately Normal" requires large \(n\) (the Central Limit Theorem of Lecture 17, not this one). So the first line of every such solution is: "T is a sum of independent Normal variables, hence T is Normal."
① 定义变量(\(T=\) 总量);② 判断独立性并说明理由;③ 算 \( \mu_T \) 与 \( \sigma_T \)(方差相加再开根号);④ 写“T 服从正态分布”,再标准化求面积。这四步在 FRQ 上分别对应得分点,少一步就少一分。
(1) Define the variable (\(T=\) total). (2) State and justify independence. (3) Compute \( \mu_T \) and \( \sigma_T \) (add variances, then root). (4) State "T is Normal", standardise, and read the area. Each step is a separate FRQ scoring point — skip one and lose one.
例题精讲Worked Examples
例 1 线性变换:从加仑数到账单金额Example 1 Linear transformation: from gallons to a bill
- 确认这是线性变换:只有“乘 \(b=1.8\)”和“加 \(a=50\)”,没有别的运算。形状、概率结构都不变。 Confirm it is a linear transformation: only "multiply by \(b=1.8\)" and "add \(a=50\)". Shape and probability structure are unchanged.
- 均值跟着一起变:\( \mu_Y=50+1.8\mu_X \)。先乘后加,顺序与公式一致。 The mean follows the same map: \( \mu_Y=50+1.8\mu_X \) — multiply then add, exactly as the formula says. \[ \mu_Y=50+1.8(318)=50+572.4=\$622.40 \]
- 标准差只乘 \( |b| \),不动 \(a\)。$50 是固定费用,它把所有账单一起抬高,不会让账单之间更分散。 The SD is multiplied by \( |b| \) only; the \(a\) does nothing to it. The $50 is a flat fee that lifts every bill equally and cannot make bills more spread out. \[ \sigma_Y=1.8(42)=\$75.60 \]
- 把结论写完整:平均账单 $622.40;随机一单的金额与平均值平均相差约 $75.60。原来的 42 加仑波动被放大成 75.60 美元,因为每加仑 1.80 元。 State it fully: the average bill is $622.40, and a randomly chosen bill differs from that average by about $75.60. The original 42-gallon wobble became a $75.60 wobble because each gallon costs $1.80.
例 2 FRQ 实战:组合 + 线性变换(来自 6.1/6.2 工作表)Example 2 A real FRQ: combining and transforming (from the 6.1/6.2 worksheet)
- (a) 先算均值:\(0(0.4)+1(0.3)+2(0.2)+3(0.1)=1.0\)。 (a) Mean first: \(0(0.4)+1(0.3)+2(0.2)+3(0.1)=1.0\). \[ \mu_C=0+0.3+0.4+0.3=1.0 \]
- 再算方差:\( E(C^2)=0+0.3+0.8+0.9=2.0 \),所以 \( \sigma_C^2=2.0-1.0^2=1.0 \),\( \sigma_C=1.0 \)。这个例子里方差与标准差恰好都等于 1,评分说明特别提醒别把方差当标准差写。 Then the variance: \( E(C^2)=0+0.3+0.8+0.9=2.0 \), so \( \sigma_C^2=2.0-1.0^2=1.0 \) and \( \sigma_C=1.0 \). Here variance and SD are both exactly 1; the scoring guide warns against reporting the variance as the SD. \[ \sigma_C^2=2.0-1.0=1.0,\qquad \sigma_C=1.0 \]
- (b) 和的均值相加:\( \mu_T=1+2=3 \)。标准差用“方差相加再开根号”,不是 \(1+1.2\)。 (b) Means add: \( \mu_T=1+2=3 \). The SD comes from "add variances, then root" — not \(1+1.2\). \[ \sigma_T^2=1^2+1.2^2=1+1.44=2.44,\qquad \sigma_T=\sqrt{2.44}\approx 1.56 \]
- (c) 两项都要乘系数,方差乘的是系数的平方:\( 15^2\sigma_C^2+25^2\sigma_A^2 \)。这就是“先把每个变量线性变换,再加起来”的一般做法。 (c) Both terms are scaled, and variances scale by the square of the coefficient: \( 15^2\sigma_C^2+25^2\sigma_A^2 \). That is the general recipe: transform each variable, then combine. \[ \mu_M=15(1)+25(2)=\$65,\qquad \sigma_M^2=225(1)+625(1.44)=1125 \] \[ \sigma_M=\sqrt{1125}\approx \$33.54 \]
例 3 正态的组合:四包糖会不会太甜Example 3 Combining Normals: is the tea too sweet?
- 定义 \(T=X_1+X_2+X_3+X_4\),并先说分布:四个独立正态之和仍正态,所以 \(T\) 服从正态分布。 Define \(T=X_1+X_2+X_3+X_4\) and name the distribution first: a sum of four independent Normals is Normal, so \(T\) is Normal.
- 均值:四个均值相加。注意不是 \(4\times\) 某个“总量”,而是四个独立变量各自的均值。 Mean: add the four means. Note this is four separate variables, not \(4\times\) one total. \[ \mu_T=4(2.17)=8.68 \]
- 标准差:方差相加再开根号,\( \sigma_T=\sqrt{4(0.08)^2}=\sqrt4\times0.08 \)。 SD: add variances then root, \( \sigma_T=\sqrt{4(0.08)^2}=\sqrt4\times0.08 \). \[ \sigma_T^2=4(0.0064)=0.0256,\qquad \sigma_T=0.16 \]
- 标准化并求两个端点之间的面积:\( z_1=\frac{8.5-8.68}{0.16}=-1.125\approx-1.13\),\( z_2=\frac{9-8.68}{0.16}=2.00 \)。 Standardise and take the area between the endpoints: \( z_1=-1.125\approx-1.13\) and \( z_2=2.00\). \[ P(-1.13\le Z\le 2.00)=\Phi(2.00)-\Phi(-1.13)=0.9772-0.1292=0.8480 \]
normalcdf(8.5, 9, 8.68, 0.16) → 0.8470
随堂练习Check Your Understanding
先自己选,再点“查看解答”。这一讲的四道题分别打三个高频陷阱:\(2X\) 与 \(X+Y\)、σ 相加、差的顺序、正态组合的方差。 Choose first, then reveal. These four items target the three high-frequency traps: \(2X\) versus \(X+Y\), adding SDs, the order of subtraction, and the variance of a Normal combination.
设 \( \mu_X=20\)、\( \sigma_X=5 \),令 \(Y=10-2X\)。则 \( \mu_Y \) 与 \( \sigma_Y \) 分别为
Let \( \mu_X=20 \), \( \sigma_X=5 \), and \(Y=10-2X\). Then \( \mu_Y \) and \( \sigma_Y \) are
- a\( -30 \) 与 \( 10 \)\( -30 \) and \( 10 \)
- b\( -30 \) 与 \( -10 \)\( -30 \) and \( -10 \)
- c\( 30 \) 与 \( 10 \)\( 30 \) and \( 10 \)
- d\( -30 \) 与 \( 5 \)\( -30 \) and \( 5 \)
- 均值照公式代入Substitute into the mean rule \[ \mu_Y=10-2(20)=-30 \]
- 标准差取绝对值Take the absolute value 负号只表示“左右翻转”,不改变分散程度的大小。The minus sign only mirrors the distribution; it cannot change the size of the spread. \[ \sigma_Y=|-2|(5)=10 \]
| 选项Option | 判断与理由Verdict & reason |
|---|---|
| a | 对。\( \mu=-30 \),\( \sigma=10 \)。Correct: \( \mu=-30 \), \( \sigma=10 \). |
| b | 错。标准差为负,说明把 \(b=-2\) 直接乘进了 σ。Wrong: a negative SD means \(b=-2\) was used without the absolute value. |
| c | 错。均值算成了 \(2X+10=50\) 或丢掉负号,符号错了。Wrong: the mean lost its sign (as if computing \(2X+10\)). |
| d | 错。σ 完全没变,等于假设“乘常数不改离散程度”。Wrong: σ is unchanged, as if multiplying never affects spread. |
某游戏单局得分 \(X\) 满足 \( \mu_X=10 \)、\( \sigma_X=18 \)。(i) 同一人玩两局,总分 \(2X\);(ii) 两个互不影响的人各玩一局,总分 \(X+Y\)。下列关于标准差的说法正确的是
A game score \(X\) has \( \mu_X=10 \) and \( \sigma_X=18 \). (i) One person plays twice, total \(2X\); (ii) two independent people each play once, total \(X+Y\). Which statement about the SDs is correct?
- a两者都是 36,因为 \(2X\) 与 \(X+Y\) 是同一个变量both are 36, since \(2X\) and \(X+Y\) are the same variable
- b(i) 是 36,(ii) 是 \( \sqrt{2}\cdot18\approx25.5 \)(i) is 36, (ii) is \( \sqrt{2}\cdot18\approx25.5 \)
- c(i) 是 25.5,(ii) 是 36(i) is 25.5, (ii) is 36
- d两者都是 \( \sqrt{18^2+18^2}\approx25.5 \),因为方差要相加both are \( \sqrt{18^2+18^2}\approx25.5 \), because variances add
- 先看均值Check the means first \( \mu_{2X}=20 \),\( \mu_{X+Y}=10+10=20 \)。均值一样,所以题目一定在考标准差。\( \mu_{2X}=20 \) and \( \mu_{X+Y}=10+10=20 \). The means agree, so the question is really about the SD. 均值不能用来区分两者。The mean cannot tell them apart.
- \(2X\):整体放大\(2X\): everything scales 两局是同一次运气连续放大两倍,波动也随之翻倍。Both games ride the same luck, doubled, so the wobble doubles too. \[ \sigma_{2X}=2(18)=36 \]
- \(X+Y\):独立方差相加\(X+Y\): independent variances add \[ \sigma_{X+Y}=\sqrt{18^2+18^2}=18\sqrt2\approx25.5 \] 两个人各玩一局,总分的波动小于一个人玩两局——因为两个人的运气会互相抵消一部分。Two people playing once gives a smaller spread than one person playing twice, because independent luck partly cancels.
| 选项Option | 判断与理由Verdict & reason |
|---|---|
| a | 错。\(2X\) 与 \(X+Y\) 只有在两个变量完全同步时才相同,独立时不同。Wrong: \(2X\) equals \(X+Y\) only when the two variables are perfectly in sync, not when independent. |
| b | 对。36 与 25.5。Correct: 36 and 25.5. |
| c | 错。两者搞反了。Wrong: the two cases are swapped. |
| d | 错。\(2X\) 是同一个变量的线性变换,不能对它“加两次方差”。Wrong: \(2X\) is one variable transformed, so you may not add its variance to itself. |
某考试选择题得分 \(X\) 有 \( \mu_X=38\)、\( \sigma_X=6 \),自由作答题得分 \(Y\) 有 \( \mu_Y=30\)、\( \sigma_Y=7 \),两者独立。令 \(D=X-Y\)(选择题比自由作答题高多少)。则 \( \mu_D \) 与 \( \sigma_D \) 为
Multiple-choice score \(X\) has \( \mu_X=38 \), \( \sigma_X=6 \); free-response score \(Y\) has \( \mu_Y=30 \), \( \sigma_Y=7 \), independent. Let \(D=X-Y\). Then \( \mu_D \) and \( \sigma_D \) are
- a\( 8 \) 与 \( 1 \)\( 8 \) and \( 1 \)
- b\( 8 \) 与 \( \sqrt{13}\approx3.61 \)\( 8 \) and \( \sqrt{13}\approx3.61 \)
- c\( 8 \) 与 \( \sqrt{85}\approx9.22 \)\( 8 \) and \( \sqrt{85}\approx9.22 \)
- d\( -8 \) 与 \( \sqrt{85}\approx9.22 \)\( -8 \) and \( \sqrt{85}\approx9.22 \)
- 均值直接减Subtract the means \[ \mu_D=38-30=8 \]
- 方差相加(不是相减)Add the variances (do not subtract) 两个独立得分都在抖动,差值也会抖;“相减”只会让结果更抖,绝不会更稳。Both independent scores wobble, so their difference wobbles too; subtracting can only add wobble, never remove it. \[ \sigma_D^2=6^2+7^2=36+49=85,\qquad \sigma_D=\sqrt{85}\approx9.22 \]
| 选项Option | 判断与理由Verdict & reason |
|---|---|
| a | 错。把标准差相减了:\(6-7=-1\) 再取绝对值。Wrong: it subtracts the SDs, \(6-7=-1\), then takes the absolute value. |
| b | 错。把方差相减了:\(49-36=13\)。方差不许相减。Wrong: it subtracts variances, \(49-36=13\). Variances are never subtracted. |
| c | 对。\( \mu_D=8 \),\( \sigma_D=\sqrt{85}\approx9.22 \)。Correct: \( \mu_D=8 \), \( \sigma_D=\sqrt{85}\approx9.22 \). |
| d | 错。顺序反了:\( \mu_{X-Y}=8 \),而不是 \(30-38\)。Wrong: the order is reversed; \( \mu_{X-Y}=8 \), not \(30-38\). |
设 \(X\sim N(20,\,3)\)、\(Y\sim N(15,\,4)\),且相互独立,令 \(T=X+Y\)。则 \(P(T>40)\) 最接近
Let \(X\sim N(20,\,3)\) and \(Y\sim N(15,\,4)\) be independent, and let \(T=X+Y\). Then \(P(T>40)\) is closest to
- a\( 0.159 \)\( 0.159 \)
- b\( 0.309 \)\( 0.309 \)
- c\( 0.023 \)\( 0.023 \)
- d\( 0.098 \)\( 0.098 \)
- 求新分布的参数Find the new parameters \[ \mu_T=20+15=35,\qquad \sigma_T=\sqrt{9+16}=\sqrt{25}=5 \]
- 标准化并求右尾Standardise and take the right tail \[ z=\frac{40-35}{5}=1.00,\qquad P(T>40)=P(Z>1.00)\approx0.1587 \]
- 对照错误选项Check the distractors 若用 \( \sigma=3+4=7 \):\( z=\frac{40-35}{7}=0.714 \),得 0.238;若用 \( \sigma=\sqrt{9-16} \) 则算不下去;若忘了加均值会得别的值。Using \( \sigma=3+4=7 \) gives \( z=0.714 \) and 0.238; using \( \sigma=\sqrt{9-16} \) is impossible; forgetting to add the means gives yet another value. 正确值为 0.159。The correct value is 0.159.
| 选项Option | 判断与理由Verdict & reason |
|---|---|
| a | 对。\( \mu=35 \),\( \sigma=5 \),\( P(Z>1)=0.159 \)。Correct: \( \mu=35 \), \( \sigma=5 \), \( P(Z>1)=0.159 \). |
| b | 错。用 \( \sigma=\sqrt{9-16} \) 或 \( \sigma=4 \) 之类算出的偏大结果;通常来自“方差相减”的错误。Wrong: a too-large result, typically from subtracting variances or using \( \sigma=4 \). |
| c | 错。把 \( \sigma \) 当成了 7 或用了 \(z=2\) 的尾部,巧合接近 \(P(Z>2)\)。Wrong: this is close to \(P(Z>2)\), using \( \sigma=7 \) to get \(z\approx2\) (or a mistaken tail value). |
| d | 错。用 \( \sigma=7 \) 得 \(z\approx0.71\),某处插值出错。Wrong: with \( \sigma=7 \), \(z\approx0.71\), and the area was misread. |
本讲小结Summary
- 线性变换 \(Y=a+bX\):形状不变;\( \mu_Y=a+b\mu_X \);\( \sigma_Y=|b|\sigma_X \)(方差乘 \(b^2\))。
- 加常数只平移中心,不改离散程度;乘常数同时改变中心与离散程度,方向由符号、大小由 \( |b| \) 决定。
- 和的均值 \( \mu_{X+Y}=\mu_X+\mu_Y \),差的均值 \( \mu_{X-Y}=\mu_X-\mu_Y \)(顺序不能反),这两条不需要独立。
- 独立时 \( \sigma^2_{X\pm Y}=\sigma_X^2+\sigma_Y^2 \):和与差都是方差相加,再开根号。标准差永远不能直接相加或相减。
- \(2X\neq X+Y\):前者 \( \sigma=2\sigma_X \),后者 \( \sigma=\sqrt2\,\sigma_X \);\( \sigma_{X-Y}\neq\sigma_X-\sigma_Y \)。
- 独立正态的和或差仍正态:先算新 \( \mu,\sigma \),再标准化查面积;非正态时只在 \(n\) 大时才近似正态(留到中心极限定理)。
- Linear transformation \(Y=a+bX\): same shape; \( \mu_Y=a+b\mu_X \); \( \sigma_Y=|b|\sigma_X \) (variance scales by \(b^2\)).
- Adding a constant shifts the center only, never the spread; multiplying changes both, with direction from the sign and size from \( |b| \).
- Mean of a sum \( \mu_{X+Y}=\mu_X+\mu_Y \); mean of a difference \( \mu_{X-Y}=\mu_X-\mu_Y \) (order matters); neither needs independence.
- Under independence, \( \sigma^2_{X\pm Y}=\sigma_X^2+\sigma_Y^2 \): variances add for both sums and differences, then take the root. SDs never add or subtract.
- \(2X\neq X+Y\): the first has \( \sigma=2\sigma_X \), the second \( \sigma=\sqrt2\,\sigma_X \); and \( \sigma_{X-Y}\neq\sigma_X-\sigma_Y \).
- Sums and differences of independent Normals are still Normal: compute the new \( \mu,\sigma \), standardise, read the area. For non-Normal variables this holds only approximately and only for large \(n\) (Central Limit Theorem).
二项分布与几何分布Binomial and Geometric Distributions
上一讲我们“一个一个”地处理随机变量:列表、加权、求 μ 与 σ。可现实中很多变量有几千万种取值(抛 1000 次硬币的正面次数就有 1001 种),列表根本写不完。这一讲给出两个“公式型”的离散分布:二项管“固定次数里成功几次”,几何管“等到第一次成功要几次”。它们的共同地基是一模一样的四个条件,而它们最容易混淆的地方,是起点(从 0 数还是从 1 数)。
Last lecture handled random variables one value at a time: table, weights, mean and SD. But many variables have millions of possible values (the number of heads in 1000 tosses has 1001), so a table is hopeless. This lecture supplies two formula-based discrete models: the binomial for "how many successes in a fixed number of trials" and the geometric for "how many trials until the first success". They rest on exactly the same four conditions, and the place students trip is the starting point (counting from 0 or from 1).
本讲学习目标Learning Objectives
- CHECK 一个情境是否满足 Bernoulli 试验只有“成功/失败”两种结果、每次概率 p 相同、各次相互独立、试验次数固定(几何分布不要求次数固定)的一串试验。A sequence of trials with only two outcomes, constant success probability p, independence, and a fixed number of trials (the geometric model drops the fixed-number requirement).的四条件:两结果、p 不变、独立、n 固定。
- 用 \( P(X=k)=\binom{n}{k}p^k(1-p)^{n-k} \) 计算二项概率,并用 binompdf / binomcdf 在计算器上完成。
- 记住二项的均值与标准差:\( \mu=np \)、\( \sigma=\sqrt{np(1-p)} \),并能在情境中解释。
- 用 \( P(X=k)=(1-p)^{k-1}p \) 计算几何概率,用 geometpdf / geometcdf 求累计概率,并知道 \( \mu=1/p \)。
- 分辨二项与几何:二项从 \(k=0\) 开始、取值有限;几何从 \(k=1\) 开始、取值无限。
- 把 “at least one” 翻译成 \( 1-P(X=0) \),而不是 \(P(X=1)\)。
- 在 \(np\ge10\) 且 \(n(1-p)\ge10\) 时用正态近似二项分布,并用连续性修正 \( \pm0.5 \) 把结果校准。
- CHECK whether a setting satisfies the four Bernoulli trialA sequence of trials with two outcomes, constant p, independence and a fixed number of trials (dropped for the geometric model).只有两种结果、p 固定、相互独立、次数固定(几何分布不要求次数固定)的一串试验。 conditions: two outcomes, constant p, independence, fixed n.
- CALCULATE binomial probabilities with \( P(X=k)=\binom{n}{k}p^k(1-p)^{n-k} \) using binompdf / binomcdf.
- Use the binomial mean and SD, \( \mu=np \) and \( \sigma=\sqrt{np(1-p)} \), and interpret them in context.
- CALCULATE geometric probabilities \( P(X=k)=(1-p)^{k-1}p \), cumulative probabilities with geometcdf, and recall \( \mu=1/p \).
- DISTINGUISH the two models: binomial starts at \(k=0\) with finitely many values; geometric starts at \(k=1\) with infinitely many.
- Translate "at least one" into \( 1-P(X=0) \), never \(P(X=1)\).
- Use the Normal approximation to the binomial when \(np\ge10\) and \(n(1-p)\ge10\), applying the continuity correction \( \pm0.5 \).
核心概念Core Concepts
6.3.1 Bernoulli 试验:两个分布的共同地基6.3.1 Bernoulli trials: the shared foundation
只要一串试验满足四个条件——每次只有两种结果、每次成功的概率 \(p\) 相同、各次相互独立、次数 \(n\) 固定——我们就可以用公式算概率,不必列表。这四条合称 Bernoulli 试验。
Whenever a sequence of trials meets four conditions — two outcomes each time, a constant success probability \(p\), independence between trials, and a fixed number \(n\) — probabilities can be computed by formula instead of a table. Together these define Bernoulli trials.
四条,逐条检验Four checks, one at a time
B Binary:每次只有“成功/失败”两种结果。
I Independent:一次的结果不影响下一次。
N Number:试验次数 \(n\) 事先固定。
S Success probability:每次的 \(p\) 都一样。
B Binary: exactly two outcomes each trial.
I Independent: one outcome does not affect the next.
N Number: \(n\) is fixed in advance.
S Success probability: the same \(p\) every trial.
两个“反例”最常考The two favourite counterexamples
从一副牌里抽 10 张数红牌:抽走一张后,下一张是红牌的概率变了(\(26/52\to26/51\)),违反 S,不是二项。一对夫妇一直生到有儿子为止数孩子数:次数不固定,违反 N,这是几何,不是二项。
Deal 10 cards and count reds: after each card the probability changes (\(26/52\to26/51\)), violating S — not binomial. A couple has children until a son is born: \(n\) is not fixed, violating N — that is geometric, not binomial.
6.3.2 二项分布:\(n\) 次里成功几次6.3.2 The binomial model: how many successes in n trials
二项随机变量 \(X\) 数的是 \(n\) 次 Bernoulli 试验中的成功次数,取值 \(0,1,\ldots,n\);概率公式是“选位置 × 成功的概率 × 失败的概率”。
A binomial random variable \(X\) counts the number of successes in \(n\) Bernoulli trials, taking values \(0,1,\ldots,n\); the formula is "choose the positions × probability of the successes × probability of the failures".
先用抛三次硬币把公式“验算”一遍:\(P(X=2)=\binom32(0.5)^2(0.5)^1=3\times0.125=0.375\),与上一讲的 \(3/8\) 一致。再看 \(n=10\)、\(p=0.3\):把 \(k=0\) 到 \(10\) 的概率全算出来画成图,就得到下面的概率直方图。
Check the formula against three coin tosses: \(P(X=2)=\binom32(0.5)^2(0.5)^1=3\times0.125=0.375\), matching the \(3/8\) from the last lecture. Now take \(n=10\), \(p=0.3\): compute every probability from \(k=0\) to \(10\) and plot them to get the probability histogram below.
binompdf(10, 0.3, 3) → 0.2668
binomcdf(10, 0.3, 3) → 0.6496 (= P(X≤3))
把同一组概率柱“立起来”看更直观:柱子的高度还是概率,\(k=3\) 附近最高,两侧迅速变矮;右侧的尾巴比左侧长,所以整排柱子向右边拖——这正是 \(p<0.5\) 时二项分布右偏的样子。拖动旋转一圈,再想想为什么最高的柱不在 \(\mu=np\) 的“正中间”。
Standing the same bars up makes it obvious: heights are still probabilities, tallest near \(k=3\) and falling away fast; the right tail is longer, so the whole row drags rightward — the right skew of a binomial with \(p<0.5\). Drag to rotate, then ask why the tallest bar is not exactly at \(\mu=np\).
\(P(X\ge1)=1-P(X=0)=1-(1-p)^n\)。这是整章最省时间的一句:不问“至少几次”,先问“一次都没有”的反面。例:某种缺陷率 0.1,检查 4 件,至少发现 1 件缺陷的概率是 \(1-0.9^4=0.3439\),而不是 \(P(X=1)=0.2916\)——后者漏掉了 2 件、3 件、4 件缺陷的情况。
\(P(X\ge1)=1-P(X=0)=1-(1-p)^n\). This is the biggest time-saver in the chapter: whatever "at least" means, go through "none". Example: with defect rate 0.1 and 4 items inspected, the chance of at least one defect is \(1-0.9^4=0.3439\), not \(P(X=1)=0.2916\) — the latter omits 2, 3 and 4 defects.
6.3.3 二项的均值与标准差6.3.3 Mean and SD of the binomial
二项分布的均值是 \(np\)(“平均有 \(np\) 次成功”),标准差是 \( \sqrt{np(1-p)} \)。它们来自上一讲:把 \(n\) 个独立的 0/1 变量相加,均值相加、方差相加。
The binomial mean is \(np\) ("on average \(np\) successes") and the SD is \( \sqrt{np(1-p)} \). Both come from last lecture: adding \(n\) independent 0/1 variables adds their means and adds their variances.
用 \(B(10,\,0.3)\) 验算:\( \mu=10(0.3)=3\),与图形重心一致;\( \sigma=\sqrt{10(0.3)(0.7)}=\sqrt{2.1}\approx1.45\)。解读要有单位:“平均 10 位选民中有 3 位是共和党人,实际人数与 3 平均相差约 1.45 人。”
Check with \(B(10,\,0.3)\): \( \mu=10(0.3)=3\), matching the balance point; \( \sigma=\sqrt{10(0.3)(0.7)}=\sqrt{2.1}\approx1.45\). Interpret with units: "among 10 voters we expect 3 Republicans on average, with actual counts differing from 3 by about 1.45 voters."
标准差是 \( \sqrt{np(1-p)} \),不是 \( \sqrt{np} \),也不是 \( np(1-p) \)。方差才等于 \(np(1-p)\),标准差要开根号。写答案时先写方差、再开根号,中间过程清楚,阅卷不会扣分。
The SD is \( \sqrt{np(1-p)} \) — not \( \sqrt{np} \), and not \(np(1-p)\). The variance equals \(np(1-p)\); the SD needs the root. On paper, write the variance first, then root it: the work is visible and nothing is lost.
6.3.4 几何分布:等到第一次成功6.3.4 The geometric model: waiting for the first success
几何随机变量 \(X\) 数的是第一次成功发生在第几次试验,取值 \(1,2,3,\ldots\)(无限);概率公式是“前面 \(k-1\) 次全失败,第 \(k\) 次成功”。
A geometric random variable \(X\) counts which trial produces the first success, taking values \(1,2,3,\ldots\) (infinitely many); the formula is "the first \(k-1\) trials fail and the \(k\)-th succeeds".
geometpdf(0.2, 4) → 0.1024 (= 0.8³ × 0.2)
geometcdf(0.2, 4) → 0.5904 (= 1 − 0.8⁴)
抛 4 次硬币数正面,\(X\) 可以是 0(全是反面);但“等到第一个儿子”不可能“第 0 个孩子就是儿子”。所以 \(P(X=0)\) 对几何分布无意义;看到“从 0 数起”就是二项,看到“第几次才成功”就是几何。同样容易错的是:“不超过 4 次成功”用的是 binomcdf;而“第 4 次或更早成功”用的是 geometcdf。
Toss 4 coins and count heads: \(X=0\) is possible (all tails). But "wait for the first son" cannot succeed on child 0, so \(P(X=0)\) is meaningless for the geometric model. Counting from 0 means binomial; asking "which trial first succeeds" means geometric. The related slip: "at most 4 successes" uses binomcdf, while "success by trial 4" uses geometcdf.
6.3.5 二项 vs 几何:一张对照表6.3.5 Binomial vs geometric: a side-by-side table
两者的四条件几乎相同,唯一的区别是 \(n\) 固定还是不固定;由此衍生出三个差异:起点(0 或 1)、取值(有限或无限)、问法(几次成功或第几次成功)。
The four conditions are nearly identical; the only real difference is whether n is fixed. Three differences follow: the starting value (0 or 1), the number of values (finite or infinite), and the question asked (how many successes, or which trial succeeds first).
| 项目Feature | 二项分布 BinomialBinomial | 几何分布 GeometricGeometric |
|---|---|---|
| 数什么Counts | \(n\) 次中的成功次数successes in \(n\) trials | 到第一次成功所需的试验次数the trials until the first success |
| 取值Values | \(0,1,2,\ldots,n\)(有限finite) | \(1,2,3,\ldots\)(无限infinite) |
| 次数Number of trials | 固定,事先知道fixed in advance | 不固定,是随机变量本身not fixed — it is the variable |
| 概率公式Formula | \(\binom{n}{k}p^k(1-p)^{n-k}\) | \((1-p)^{k-1}p\) |
| 均值Mean | \(np\) | \(1/p\) |
| 标准差SD | \(\sqrt{np(1-p)}\) | \(\sqrt{1-p}\,/\,p\)(了解) (for reference) |
| 形状Shape | \(p<0.5\) 右偏,\(p=0.5\) 对称,\(p>0.5\) 左偏right-skewed for \(p<0.5\), symmetric at 0.5, left-skewed above | 永远右偏;\(p\) 越小偏得越厉害always right-skewed; more so as \(p\) shrinks |
| 典型问法Typical wording | “10 人里有几人…”“4 件里至少 1 件…”"how many of the 10…", "at least one of the 4…" | “第一次成功在第几次…”“需要试几次才…”"on which trial does it first succeed…", "how many tries until…" |
6.3.6 正态近似二项分布6.3.6 The Normal approximation to the binomial
当 \(n\) 很大、\(p\) 不极端时,二项的直方图几乎就是一条正态曲线:中心 \(np\)、标准差 \( \sqrt{np(1-p)} \)。判据是 \(np\ge10\) 且 \(n(1-p)\ge10\)。
For large \(n\) and moderate \(p\), the binomial histogram is almost a Normal curve centred at \(np\) with SD \( \sqrt{np(1-p)} \). The criterion is \(np\ge10\) and \(n(1-p)\ge10\).
算一遍比较差异:精确值 \(P(X\le25)=0.1631\)。加修正:\( z=\frac{25.5-30}{4.58}=-0.982\),得 \(0.1631\)。不加修正:\( z=\frac{25-30}{4.58}=-1.091\),得 \(0.138\)。差别不小,所以课本要求在条件允许时加修正,答案更接近。但只要能算精确值,就优先用 binomcdf——近似只是 n 太大(如 \(n=5000\))时的备用工具。
Compare: the exact value is \(P(X\le25)=0.1631\). With the correction, \( z=\frac{25.5-30}{4.58}=-0.982\) gives \(0.1631\). Without it, \( z=\frac{25-30}{4.58}=-1.091\) gives \(0.138\). That is a real gap, so the textbook applies the correction when the conditions hold. Still, whenever the exact value is computable, use binomcdf — the approximation is a fallback for huge \(n\) (say \(n=5000\)).
若 \(n=20,\ p=0.9\),则 \(np=18\ge10\) 但 \(n(1-p)=2<10\):左尾太短,正态曲线会把概率“漏”到负值那边去。此时必须用 binomcdf 的精确值。写 FRQ 时,这一步要明确写出两个乘积并判断,否则算“条件未检验”。
With \(n=20,\ p=0.9\), \(np=18\ge10\) but \(n(1-p)=2<10\): the left tail is too short and the Normal curve would spill probability below zero. Use exact binomcdf there. On an FRQ, state both products explicitly, or the response is judged to have skipped the condition check.
例题精讲Worked Examples
例 1 二项:次品检验(含“至少一次”)Example 1 Binomial: inspecting defective gauges (with "at least one")
- 先确认四条件:两结果(次品/正品)、\(p=0.1\) 固定、各件独立、\(n=4\) 固定。所以 \(X\sim B(4,\,0.1)\)。 Confirm the four conditions: two outcomes (defective/good), constant \(p=0.1\), independence, fixed \(n=4\). So \(X\sim B(4,\,0.1)\).
- (a) 代公式:\( \binom41=4 \) 表示“哪一件是次品”有 4 种位置。 (a) Use the formula: \( \binom41=4 \) counts which item is the defective one. \[ P(X=1)=\binom41(0.1)^1(0.9)^3=4(0.1)(0.729)=0.2916 \]
- (b) “多于 1”是 \(2,3,4\) 三个概率之和,用“\(1-\) 反面”最快。注意是 \(1-\)binomcdf(4,0.1,1)。 (b) "More than 1" sums \(k=2,3,4\); go through the complement — \(1-\)binomcdf(4,0.1,1). \[ P(X>1)=1-\big[P(0)+P(1)\big]=1-(0.6561+0.2916)=0.0523 \]
- (c) “至少 1 件”即 \(1-P(0)\),不要与 (a) 混淆——(a) 只是“恰好 1 件”。 (c) "At least one" is \(1-P(0)\) and must not be confused with (a), which is "exactly one". \[ P(X\ge1)=1-(0.9)^4=1-0.6561=0.3439 \]
例 2 二项 + 累计:遗传特征Example 2 Binomial with cumulation: a genetic trait
- 确认 \(Y\sim B(8,\,0.25)\)。这里 \(p=0.25<0.5\),所以分布右偏,右尾(5 个以上)概率很小。 \(Y\sim B(8,\,0.25)\). Since \(p=0.25<0.5\) the distribution is right-skewed, so the right tail (5 or more) is thin.
- (a) 代公式:\( \binom83=56 \)。 (a) Use the formula with \( \binom83=56 \). \[ P(Y=3)=56(0.25)^3(0.75)^5=56(0.015625)(0.2373)\approx0.2076 \]
- (b) “至少 5”用 \(1-\)binomcdf(8,0.25,4)。注意括号里是 4(累积到 4 的反面),不是 5。 (b) "At least 5" is \(1-\)binomcdf(8,0.25,4) — the argument is 4, not 5. \[ P(Y\ge5)=1-P(Y\le4)=1-0.9727=0.0273 \]
- (c) 均值与标准差用公式,不要用数据算。 (c) Use the formulas, not the data. \[ \mu_Y=8(0.25)=2,\qquad \sigma_Y=\sqrt{8(0.25)(0.75)}=\sqrt{1.5}\approx1.225 \]
例 3 几何:等到第一位买家Example 3 Geometric: waiting for the first buyer
- 几何模型三条件:两结果(成交/不成交)、\(p=0.35\) 固定、独立。次数不固定(带几位算几位),所以是几何,且 \(X\) 从 1 开始取值。 The geometric setup: two outcomes (buys/does not), constant \(p=0.35\), independence. The number of trials is not fixed, so this is geometric, and \(X\) starts at 1.
- (a) 前两位不成交、第三位成交。 (a) The first two do not buy and the third does. \[ P(X=3)=(0.65)^2(0.35)=0.4225\times0.35\approx0.1479 \]
- (b) “第 4 位或更早”是累计,用 geometcdf,或者用“前 4 位都没成交”的反面,两者结果相同。 (b) "By the fourth client" is cumulative: use geometcdf, or take the complement of "the first four all decline" — same answer. \[ P(X\le4)=1-(0.65)^4=1-0.1785=0.8215 \]
- (c) 几何均值 \(1/p\)。 (c) The geometric mean is \(1/p\). \[ \mu_X=\frac{1}{0.35}\approx2.857 \]
例 4 正态近似:算得快,还要说得清Example 4 Normal approximation: fast, but state the conditions
- 先检验近似条件:\(np=100(0.2)=20\ge10\),\(n(1-p)=80\ge10\),两个都满足,可以用正态近似。 Check the conditions: \(np=100(0.2)=20\ge10\) and \(n(1-p)=80\ge10\). Both hold, so the approximation is allowed.
- 求正态参数:\( \mu=np=20 \),\( \sigma=\sqrt{np(1-p)}=\sqrt{16}=4 \)。 Find the Normal parameters: \( \mu=np=20 \), \( \sigma=\sqrt{np(1-p)}=\sqrt{16}=4 \). \[ \mu=20,\qquad \sigma=\sqrt{100(0.2)(0.8)}=4 \]
- 加连续性修正:把“\(\le25\)”扩到 25.5,再标准化。 Apply the continuity correction: extend "\(\le25\)" to 25.5 and standardise. \[ z=\frac{25.5-20}{4}=1.375,\qquad P(Z\le1.375)\approx0.9154 \]
- 与精确值(binompdf 之和)比较:精确值 \(P(X\le25)\approx0.9125\)。近似只差 0.003,完全够用;若忘了修正,\( z=\frac{25-20}{4}=1.25\),得 0.8944,误差变大。 Compare with the exact sum: \(P(X\le25)\approx0.9125\). The approximation is off by only 0.003 — plenty good; forgetting the correction gives \( z=\frac{25-20}{4}=1.25\) and 0.8944, a bigger error.
binomcdf(100, 0.2, 25) → 0.9125
normalcdf(-1E99, 25.5, 20, 4) → 0.9154
normalcdf(-1E99, 25, 20, 4) → 0.8944
随堂练习Check Your Understanding
先自己选,再点“查看解答”。这一讲的四道题覆盖:条件判断、计算器命令、“至少/超过”的翻译、正态近似的条件。 Choose first, then reveal. These four cover condition checking, calculator commands, translating "at least/over", and the Normal approximation conditions.
下列哪一个情境不能用二项分布建模?
In which setting can a binomial distribution not be used?
- a抛 10 次均匀硬币,数正面次数toss a fair coin 10 times and count heads
- b从洗好的 52 张牌中不放回抽 10 张,数红牌张数deal 10 cards without replacement and count reds
- c某机器生产的零件次品率恒定 2%,抽检 50 件,数次品数a machine with a constant 2% defect rate; inspect 50 parts and count defectives
- d某人投篮命中率恒定 70%,投 8 次,数命中数a shooter with a constant 70% rate takes 8 shots and counts makes
- 逐个检查 \(p\) 是否恒定Check whether p is constant a、c、d 的每次试验概率都不变(0.5、0.02、0.70),且各次互不影响、次数固定。In a, c and d the probability is unchanged each time (0.5, 0.02, 0.70), trials are unaffected by each other, and \(n\) is fixed. a、c、d 都是二项。a, c, d are all binomial.
- b 的不放回抽样b samples without replacement 抽走第一张红牌后,剩下 51 张里红牌只剩 25 张,下一张是红牌的概率从 \(26/52\) 变成 \(25/51\)。\(p\) 变了,违反“\(p\) 固定”。After one red is removed, only 25 reds remain among 51 cards, so the next probability drops from \(26/52\) to \(25/51\). \(p\) changes, violating "constant p". b 不满足二项条件(应改用超几何分布,本课程不要求)。b fails the binomial conditions (the hypergeometric model applies — not required here).
| 选项Option | 判断与理由Verdict & reason |
|---|---|
| a | 可以。四条件全满足,\(X\sim B(10,0.5)\)。Works: all four conditions hold, \(X\sim B(10,0.5)\). |
| b | 不可以。不放回,\(p\) 逐次改变。Fails: without replacement, \(p\) changes from card to card. |
| c | 可以。只要批次数远大于 50,独立近似成立,\(X\sim B(50,0.02)\)。Works: with a batch far larger than 50, independence is fine, \(X\sim B(50,0.02)\). |
| d | 可以。命中率恒定、8 次固定,\(X\sim B(8,0.7)\)。Works: constant rate and fixed 8 shots, \(X\sim B(8,0.7)\). |
某县 30% 的选民是共和党人。随机选 10 位(可视为独立),数其中的共和党人数 \(X\)。要算 \(P(X\le6)\),应使用
In a county 30% of voters are Republicans. Choose 10 at random (treatable as independent) and let \(X\) count Republicans. To compute \(P(X\le6)\), use
- abinompdf(10, 0.3, 6)binompdf(10, 0.3, 6)
- bbinomcdf(10, 0.3, 6)binomcdf(10, 0.3, 6)
- c1 − binomcdf(10, 0.3, 6)1 − binomcdf(10, 0.3, 6)
- dbinomcdf(10, 0.3, 5)binomcdf(10, 0.3, 5)
- 关键词“不超过”The phrase "no more than" “不超过 6”就是 \(X\le6\),从 0 一路加到 6,正是 binomcdf 的定义。"No more than 6" is \(X\le6\), the sum from 0 through 6 — exactly the definition of binomcdf. \[ P(X\le6)=\text{binomcdf}(10,0.3,6)\approx0.9894 \]
- 若题目改成“超过 6”If the question said "more than 6" 那就是 \(X\ge7\),用 \(1-\)binomcdf(10,0.3,6),即选项 c 的算法。所以看清单词比会按计算器更重要。That is \(X\ge7\), computed as \(1-\)binomcdf(10,0.3,6) — option c. Reading the wording matters more than pressing buttons. \( \mu=3\) 位,\( \sigma=\sqrt{2.1}\approx1.45\) 位。\( \mu=3 \) Republicans, \( \sigma=\sqrt{2.1}\approx1.45 \).
| 选项Option | 判断与理由Verdict & reason |
|---|---|
| a | 错。pdf 只给 \(P(X=6)\approx0.200\),漏掉了 0–5。Wrong: pdf gives only \(P(X=6)\approx0.200\) and omits 0–5. |
| b | 对。cdf 从 0 累到 6,得 0.9894。Correct: cdf accumulates 0 through 6, giving 0.9894. |
| c | 错。这是 \(P(X\ge7)\),与所求互补。Wrong: this is \(P(X\ge7)\), the complement of what is asked. |
| d | 错。这是 \(P(X\le5)\),漏掉了 \(k=6\) 这一项。Wrong: this is \(P(X\le5)\), omitting the \(k=6\) term. |
一对夫妇打算一直生孩子,直到有儿子为止(每次生男生女概率各 0.5,相互独立)。设 \(X\) 为“第一个儿子是第几个孩子”。则 \(P(X>4)\) 等于
A couple keeps having children until a son is born (each child is a boy or girl with probability 0.5, independently). Let \(X\) be the number of the child who is the first son. Then \(P(X>4)\) equals
- a\( 0.0625 \)\( 0.0625 \)
- b\( 0.9375 \)\( 0.9375 \)
- c\( 0.125 \)\( 0.125 \)
- d\( 0.5 \)\( 0.5 \)
- 用捷径直接算Use the shortcut \[ P(X>4)=(0.5)^4=0.0625 \]
- 用 cdf 交叉验证Cross-check with the cdf \(P(X\le4)=1-(0.5)^4=0.9375\),所以 \(P(X>4)=1-0.9375=0.0625\),一致。(选项 b 正是 \(P(X\le4)\)。)\(P(X\le4)=1-(0.5)^4=0.9375\), so \(P(X>4)=0.0625\) — consistent. (Option b is exactly \(P(X\le4)\).) \[ P(X>4)=1-P(X\le4)=1-\text{geometcdf}(0.5,4)=0.0625 \]
- 加上解释Add the interpretation 约 6.25% 的概率要生 5 个以上才有儿子;平均需要 \(1/0.5=2\) 个孩子。About a 6.25% chance of needing more than four children; the mean is \(1/0.5=2\) children.
| 选项Option | 判断与理由Verdict & reason |
|---|---|
| a | 对。\( (0.5)^4=0.0625 \)。Correct: \( (0.5)^4=0.0625 \). |
| b | 错。这是 \(P(X\le4)\),把“超过”与“不超过”弄反了。Wrong: this is \(P(X\le4)\), i.e. "at most" instead of "more than". |
| c | 错。\(0.125=(0.5)^3\),把 4 次当成了 3 次。Wrong: \(0.125=(0.5)^3\) uses three failures instead of four. |
| d | 错。0.5 是单次生女概率,不是“连续 4 次都生女”的概率。Wrong: 0.5 is the chance of one girl, not four girls in a row. |
下列哪一个 \(B(n,p)\) 可以放心使用正态近似(按 \(np\ge10\) 且 \(n(1-p)\ge10\) 判断)?
For which \(B(n,p)\) may the Normal approximation be used safely (with \(np\ge10\) and \(n(1-p)\ge10\))?
- a\(n=20,\ p=0.90\)\(n=20,\ p=0.90\)
- b\(n=40,\ p=0.95\)\(n=40,\ p=0.95\)
- c\(n=200,\ p=0.08\)\(n=200,\ p=0.08\)
- d\(n=600,\ p=0.05\)\(n=600,\ p=0.05\)
- 把每个选项的两个乘积算出来Compute both products for each option a: \(np=18\),\(n(1-p)=2\) ✗;b: \(np=38\),\(n(1-p)=2\) ✗;c: \(np=16\),\(n(1-p)=184\) ✓;d: \(np=30\),\(n(1-p)=570\) ✓。a: \(np=18\), \(n(1-p)=2\) ✗; b: \(np=38\), \(n(1-p)=2\) ✗; c: \(np=16\), \(n(1-p)=184\) ✓; d: \(np=30\), \(n(1-p)=570\) ✓. c 与 d 都满足条件(两个都可近似)。Both c and d satisfy the conditions.
- 为什么单看一边会出错Why one-sided checking fails a、b 里 \(p\) 接近 1,分布严重左偏,右侧(失败数)只有 2 个“格子”,正态曲线会溢出到 \(X<0\) 的区域,概率变成负数。In a and b, \(p\) is near 1 and the distribution is heavily left-skewed: only 2 "cells" remain on the failure side, so the Normal curve spills below \(X=0\). 所以 b 虽然 \(n=40\) 看着“够大”,仍然不能用。So b, despite \(n=40\), still fails.
| 选项Option | 判断与理由Verdict & reason |
|---|---|
| a | 错。\(n(1-p)=2<10\)。Wrong: \(n(1-p)=2<10\). |
| b | 错。\(n(1-p)=2<10\),严重左偏。Wrong: \(n(1-p)=2<10\), badly skewed left. |
| c | 对。\(np=16\)、\(n(1-p)=184\),两边都够。Correct: \(np=16\) and \(n(1-p)=184\) — both fine. |
| d | 也对。\(np=30\)、\(n(1-p)=570\)。本题只有 c、d 合格(实际考题通常只设一个正确答案,这里两项都成立,说明“满足条件”这件事本身有多项可能)。Also correct: \(np=30\), \(n(1-p)=570\). Only c and d qualify — a reminder that "conditions satisfied" is not unique. |
本讲小结Summary
- Bernoulli 试验四条件:两结果、\(p\) 固定、独立、\(n\) 固定。缺一条就不能套二项公式。
- 二项 \(B(n,p)\):\(P(X=k)=\binom{n}{k}p^k(1-p)^{n-k}\),取值 \(0\) 到 \(n\);\( \mu=np \),\( \sigma=\sqrt{np(1-p)} \)。
- 几何 \(G(p)\):\(P(X=k)=(1-p)^{k-1}p\),取值从 1 开始、无限;\( \mu=1/p \);\(P(X>k)=(1-p)^k\)。
- 两者唯一的分水岭是 \(n\) 固定与否;由此决定起点(0 或 1)、取值范围(有限或无限)与问法。
- “至少一次”永远是 \(1-P(X=0)\);“不超过”用 cdf;“超过”用 \(1-\)cdf(参数减 1 的地方要小心)。
- 正态近似二项需要 \(np\ge10\) 且 \(n(1-p)\ge10\);用 \( \mu=np,\ \sigma=\sqrt{np(1-p)} \),加连续性修正 \( \pm0.5 \),且能算精确值就优先 binomcdf。
- Bernoulli trials: two outcomes, constant \(p\), independence, fixed \(n\). Miss one and the binomial formula is unavailable.
- Binomial \(B(n,p)\): \(P(X=k)=\binom{n}{k}p^k(1-p)^{n-k}\) for \(k=0,\ldots,n\); \( \mu=np \), \( \sigma=\sqrt{np(1-p)} \).
- Geometric \(G(p)\): \(P(X=k)=(1-p)^{k-1}p\) for \(k\ge1\), infinitely many values; \( \mu=1/p \); \(P(X>k)=(1-p)^k\).
- The single divide is whether n is fixed; that determines the starting value (0 or 1), the range (finite or infinite) and the wording.
- "At least one" is always \(1-P(X=0)\); "no more than" uses cdf; "more than" uses \(1-\)cdf (watch the off-by-one in the argument).
- The Normal approximation needs \(np\ge10\) and \(n(1-p)\ge10\); use \( \mu=np,\ \sigma=\sqrt{np(1-p)} \) with the \( \pm0.5 \) correction, and prefer exact binomcdf whenever it is computable.
抽样分布是什么What Is a Sampling Distribution?
从这一讲开始,我们正式跨过“概率论”与“统计学”的分界线:前四讲讲的是“已知分布 → 算概率”,现在反过来——只有一份样本,要猜背后的总体。要判断“这个样本结论靠不靠谱”,光看样本本身不够,必须知道抽样分布在同一个总体里,把样本量为 n 的样本全部抽一遍,所得统计量的取值构成的分布。The distribution of a statistic over all possible samples of size n from the same population.。它回答的是:“如果总体真是这样,我抽到这样的样本有多稀奇?”
Here we cross the line between probability and statistics: the last four lectures went "distribution known → compute a probability"; now we reverse it — one sample in hand, guess the population behind it. To judge whether a sample conclusion is trustworthy you need more than the sample: you need its sampling distributionThe distribution of a statistic across all samples of size n drawn from the same population.在同一个总体中抽取所有样本量为 n 的样本,所得统计量取值构成的分布。, which answers "if the population really were like this, how surprising would my sample be?"
本讲学习目标Learning Objectives
- DISTINGUISH 参数与统计量:参数描述总体、固定而未知(\(\mu,p,\sigma\));统计量描述样本、随样本变化(\( \bar x,\hat p,s \))。
- 说清 抽样变异性反复随机抽样时,同一个统计量的取值会发生波动的现象。The fact that a statistic takes different values in repeated random samples.:为什么每次抽样的 \( \bar x \) 都不一样,从而统计量本身就是一个随机变量。
- DISTINGUISH 三种分布:总体分布(个体的分布)、样本数据的分布(一次样本里 n 个观测的分布)、抽样分布(统计量的分布)。
- DETERMINE 一个统计量是否无偏若统计量抽样分布的均值等于被估计的参数,则称它无偏:不系统性地高估也不系统性低估。A statistic is unbiased if the mean of its sampling distribution equals the parameter: it neither systematically over- nor under-estimates.——并明白无偏不等于“每次都准”。
- DESCRIBE 样本量与变异性的关系:n 越大,抽样分布越窄;而总体大小几乎无关(只要总体至少是样本的 10 倍)。
- 用“偏差 × 变异性”的四象限(打靶图)评价一个估计量,并说清降低两者的手段完全不同。
- 用 形状 / 中心 / 离散程度 三把尺子描述一个抽样分布,并据此评价关于总体的断言。
- DISTINGUISH a parameter from a statistic: parameters describe populations and are fixed but unknown (\(\mu,p,\sigma\)); statistics describe samples and vary (\( \bar x,\hat p,s \)).
- Explain sampling variabilityA statistic takes different values in repeated random samples.反复随机抽样时同一个统计量的取值会波动。: why every sample gives a different \( \bar x \), making a statistic itself a random variable.
- DISTINGUISH three distributions: the population distribution (of individuals), the distribution of sample data (the n observations in one sample), and the sampling distribution (of a statistic).
- DETERMINE whether a statistic is unbiasedThe mean of its sampling distribution equals the parameter.抽样分布的均值等于参数。 — and see that unbiased is not "correct every time".
- DESCRIBE how sample size drives variability: larger n gives a narrower sampling distribution; population size barely matters (as long as it is at least 10 times the sample).
- Evaluate an estimator with the bias × variability four-quadrant picture, and explain that the two are reduced by completely different actions.
- Describe a sampling distribution with shape, center and spread, and use it to evaluate a claim about a parameter.
核心概念Core Concepts
7.1.1 参数与统计量:两个词,两条边7.1.1 Parameter and statistic: two words, two sides
参数是总体的数字,固定但通常算不出来;统计量是样本的数字,能直接算出但会随样本变。参数是“靶心”,统计量是“箭”。
A parameter is a number about the population: fixed but usually unknowable. A statistic is a number about a sample: computable, but it changes with the sample. The parameter is the bull's-eye; the statistic is the arrow.
第 1 讲已经引过这一对概念,现在要把符号钉死。AP 的选择题极爱在符号上做文章:同一个问题问“这句 78% 是什么”,答案取决于它是“全校的真实比例”还是“样本里算出的比例”。记住英文里的小机关:statistics come from samples, parameters come from populations。
Lecture 1 introduced this pair; now nail down the notation. AP multiple choice loves to test it: the same "78%" is a parameter or a statistic depending on whether it describes the whole school or just the sample. Remember the English mnemonic: statistics come from samples, parameters come from populations.
| 量Quantity | 总体参数(固定、未知)Population parameter (fixed, unknown) | 样本统计量(随样本变化)Sample statistic (varies) | 典型问法Typical wording |
|---|---|---|---|
| 比例Proportion | \(p\) | \(\hat p\) | “真实的比例是…”“样本中占…”"the true proportion is…", "in the sample, …% were" |
| 均值Mean | \(\mu\) | \(\bar x\) | “全校平均…”“抽到的 40 人平均…”"the population mean…", "the 40 sampled averaged…" |
| 标准差Standard deviation | \(\sigma\) | \(s\) | “总体的波动…”“样本的波动…”"the population SD…", "the sample SD…" |
| 样本量Sample size | \(n\)(既不是参数也不是统计量,它是设计决定的一个数neither a parameter nor a statistic — a design choice) | “抽取 100 人”"an SRS of 100" | |
7.1.2 抽样变异性:统计量自己也是随机变量7.1.2 Sampling variability: a statistic is itself a random variable
同一个总体、同样的抽样方法、同样的样本量,抽两次会得到不同的 \(\bar x\)。这种“统计量在反复抽样中会变”的事实叫抽样变异性,它说明统计量本身是一个随机变量。
Same population, same sampling method, same sample size — two samples give different \(\bar x\). This built-in wobble is sampling variability, and it means a statistic is itself a random variable.
这件事听起来平淡,却是整个推断的地基:既然 \(\bar x\) 是随机变量,它就有分布、有均值、有标准差——于是第 13–15 讲讲过的全部工具立刻可用。接下来的问题只剩两个:这个分布的中心在哪里(无偏吗?),有多宽(变异性多大?)。
This sounds mundane but it is the foundation of inference: if \(\bar x\) is a random variable, it has a distribution, a mean and a standard deviation — so every tool from Lectures 13–15 applies immediately. Two questions remain: where is the center (is it unbiased?) and how wide is it (how variable?).
这是本章唯一需要培养的想象力:手上有一份样本,但你要在脑子里把“抽 1000 次样本、每次算一个统计量、把它们摞起来”演一遍。图上摞起来的那堆点,就是抽样分布的来源。
This is the one act of imagination the chapter demands: you hold one sample, yet you must picture taking 1000 samples, computing a statistic each time, and stacking the results. That stack of dots is where a sampling distribution comes from.
7.1.3 三种分布:别把“样本的分布”当成“抽样分布”7.1.3 Three distributions: do not confuse sample data with the sampling distribution
总体分布讲个体,样本数据的分布讲一次抽样里的 n 个观测,抽样分布讲统计量。第三种的“样本单位”已经不是人,而是“一个样本算出的一个数”。
The population distribution is about individuals; the distribution of sample data is about the n observations in one sample; the sampling distribution is about the statistic. In the third case the "unit" is no longer a person but one number computed from one sample.
| 名称Name | 每一个“点”是什么What one dot is | 怎样得到How it is obtained | 中心与宽度Center and width |
|---|---|---|---|
| 总体分布Population distribution | 总体里的一个人(的身高)one individual (their height) | 理论上全部量一遍(通常做不到)measure everyone (usually impossible) | \(\mu\) 与 \(\sigma\) |
| 样本数据的分布Distribution of sample data | 被抽中的一个人one sampled individual | 手上这一次抽样的 \(n\) 个值,画直方图the n values you actually have — histogram them | \(\bar x\) 与 \(s\) |
| 抽样分布Sampling distribution | 一次抽样算出的一个 \(\bar x\)one \(\bar x\) from one sample | 把“所有可能的同样大小的样本”都抽一遍(或用模拟)all possible samples of size n (or simulate) | \( \mu_{\bar x} \) 与 \( \sigma_{\bar x} \) |
前者是一次抽样内 \(n\) 个数的分布(横轴是身高),后者是很多次抽样各自算出的统计量的分布(横轴是 \(\bar x\))。一个 \(\bar x\) 在抽样分布里只贡献一个点;而你手上那份样本,在抽样分布里连影子都没有——它只是其中一个点。AP 的 FRQ 一旦写错这两个词,后面的解释很难得分。
The first is the distribution of \(n\) numbers within one sample (axis: height); the second is the distribution of statistics computed from many samples (axis: \(\bar x\)). One \(\bar x\) contributes a single dot to the sampling distribution, and your sample is just one of those dots. On an FRQ, mixing the two labels undermines every later sentence.
把三条鱼池式的数据放在一起看最清楚:假设池塘里只有 5 条鱼,体长分别是 2、7、10、11、14 英寸。下面三张图分别是“总体的 5 条鱼”“n=2 时的 10 个可能样本各算一个 \(\bar x\)”“n=3 时的 10 个 \(\bar x\)”——注意后两张的横轴变了,点也换了含义。
Three pictures make it concrete. A pond holds just 5 fish of lengths 2, 7, 10, 11 and 14 inches. The panels below show "the 5 fish in the population", "the 10 possible \(\bar x\) values for \(n=2\)" and "the 10 possible \(\bar x\) values for \(n=3\)" — notice the axis has changed and the dots mean something else.
再换一个角度:把每一个小方块想成“一次抽样得到的统计量”,按取值分组、一层层堆起来,就得到抽样分布的形状。中间堆得最高、两侧越来越矮——这个“堆出来的钟形”正是下一讲中心极限定理要解释的东西。
Another view: treat each small block as "the statistic from one sample", group by value, and stack them. The tallest column sits in the middle and the edges thin out — a "stacked bell" that the Central Limit Theorem will explain next lecture.
7.1.4 无偏:中心对准靶心7.1.4 Unbiased: the center sits on the bull's-eye
若一个统计量抽样分布的均值等于被估计的参数,就称它无偏。但无偏只说“平均不偏”,不保证每一次都准。
A statistic is unbiased when the mean of its sampling distribution equals the parameter. But unbiased describes the average only — it does not promise a correct value each time.
上图的鱼池就是范例:\( \mu_{\bar x}=8.8=\mu \),所以样本均值是总体均值的无偏估计量——无论 \(n=2\) 还是 \(n=3\)。而且这跟样本量无关:任何样本量的 \( \bar x \) 都无偏。样本量改变的是变异性(宽度),不是中心。
The pond is the example: \( \mu_{\bar x}=8.8=\mu \), so the sample mean is an unbiased estimator of the population mean — for \(n=2\) and \(n=3\) alike. This does not depend on sample size: \( \bar x \) is unbiased at every n. Sample size changes the width, not the center.
“无偏”意味着不系统性地高估、也不系统性地低估——打靶时弹孔的中心在靶心上,可每一发都可能离靶心很远。要“离得近”,还需要变异性小。样本中位数也是总体中位数的无偏估计量,但它的变异性比 \(\bar x\) 大得多,所以在估计均值时我们更爱用 \(\bar x\)。
"Unbiased" means no systematic over- or under-estimation: the centre of the bullet holes sits on the bull's-eye, though any single shot may land far away. Being "close" additionally requires small variability. The sample median is also unbiased for the population median, but it is far more variable than \(\bar x\), which is why we prefer \(\bar x\) when estimating a mean.
7.1.5 变异性:样本量决定宽度,总体大小无关7.1.5 Variability: sample size sets the width, population size does not
抽样分布的宽度主要由样本量 \(n\) 决定:n 越大,越窄。而总体有多大几乎不影响它——只要总体至少是样本的 10 倍。
The width of a sampling distribution is driven mainly by the sample size n: larger n, narrower distribution. Population size barely matters — provided the population is at least 10 times the sample.
下面的图用同一个总体 \(N(50,\,10)\) 展示 \(n\) 从 1 变到 30 的过程。阴影是 \(P(45\le\bar x\le55)\):\(n=1\) 时只有约 38%(因为那就是个体本身的分布),\(n=30\) 时高达 99% 以上。这就是“样本越大,估计越可信”的量化版本。
The figure below holds the population fixed at \(N(50,\,10)\) and grows \(n\) from 1 to 30. The shaded area is \(P(45\le\bar x\le55)\): about 38% when \(n=1\) (that is just the individual distribution) and over 99% when \(n=30\). This is the quantitative version of "bigger samples estimate better".
n = 25 时 σx̄ = 10/√25 = 2 → normalcdf(48, 52, 50, 2) → 0.6827
增大样本量只能把抽样分布“捏窄”,不能把它的中心挪到靶心上。抽样方法有偏(例如只调查最容易联系到的人)时,样本再大也只是“更精确地估错”。这是第 1 讲那句话的正式版本:样本量治变异性,随机抽样治偏差。
A larger sample squeezes the sampling distribution narrower; it cannot slide the centre onto the bull's-eye. With a biased design (say, only the easiest people to reach), a bigger sample just estimates the wrong number more precisely. This is the formal version of Lecture 1's warning: sample size treats variability, random sampling treats bias.
只要总体至少是样本的 10 倍(\(N\ge10n\)),抽样分布的宽度就与总体大小无关:从 10 万人的城市抽 100 人,和从 100 万人的城市抽 100 人,精度几乎一样。只有当样本占总体比例不小(如上例 5 条鱼里抽 2 条)时,总体大小才起作用——那时需要有限总体修正不放回抽样时,统计量的标准差要乘上 \(\sqrt{(N-n)/(N-1)}\),即扣掉“已经知道的那部分”。For sampling without replacement, the SD is multiplied by \(\sqrt{(N-n)/(N-1)}\), removing the part already known.。
As long as the population is at least 10 times the sample (\(N\ge10n\)), the width is independent of population size: 100 people from a city of 100 000 are essentially as precise as 100 from a city of 1 000 000. Population size matters only when the sample is a large fraction of it (2 fish out of 5 above) — then the finite-population correctionFor sampling without replacement the SD is multiplied by \(\sqrt{(N-n)/(N-1)}\).不放回抽样时,统计量的标准差要乘 \(\sqrt{(N-n)/(N-1)}\)。 applies.
7.1.6 偏差 × 变异性:四象限与靶心7.1.6 Bias × variability: four quadrants and a target
评价一个估计量只看两件事:中心对不对准(偏差)与散不散(变异性)。四个组合里,只有“低偏差 + 低变异性”才值得用。
Two questions evaluate any estimator: is the centre on target (bias) and how scattered is it (variability)? Of the four combinations, only "low bias + low variability" is worth using.
| 象限Quadrant | 偏差Bias | 变异性Variability | 怎么救How to fix it |
|---|---|---|---|
| 最好Ideal | 低low | 低low | 随机抽样 + 大样本random sampling + large n |
| 方向对、太散Right aim, scattered | 低low | 高high | 只加大样本量(有效)raise n only (works) |
| 精确地错Precisely wrong | 高high | 低low | 必须换抽样机制,加样本量没用change the sampling method; larger n is useless |
| 最差Worst | 高high | 高high | 两步都要做both fixes needed |
看到“估计得好不好”,先问中心(无偏吗),再问宽度(样本量够吗)。答案永远是两个独立的判断,不要合成一个。
To judge an estimator: ask about the centre (unbiased?), then about the width (large enough n?). Two separate verdicts — never merge them into one.
例题精讲Worked Examples
例 1 把抽样分布“真的做出来”:5 条鱼的池塘Example 1 Building a sampling distribution by hand: the 5-fish pond
- (a) 总体:\(\mu=\frac{2+7+10+11+14}{5}=8.8\);标准差按总体公式 \( \sigma=\sqrt{\frac{\sum(x-\mu)^2}{5}}\approx4.069\)(这是参数,用 \(N\) 做分母)。 (a) Population: \(\mu=\frac{2+7+10+11+14}{5}=8.8\); the SD uses the population formula \( \sigma=\sqrt{\frac{\sum(x-\mu)^2}{5}}\approx4.069\) (a parameter, dividing by \(N\)). \[ \sigma=\sqrt{\frac{(2-8.8)^2+(7-8.8)^2+(10-8.8)^2+(11-8.8)^2+(14-8.8)^2}{5}}\approx4.069 \]
- (b) 从 5 条里取 2 条,共有 \(\binom52=10\) 种组合。逐个求平均: (b) Choosing 2 of 5 gives \(\binom52=10\) combinations. Average each:
| 样本Sample | 2,7 | 2,10 | 2,11 | 2,14 | 7,10 | 7,11 | 7,14 | 10,11 | 10,14 | 11,14 |
|---|---|---|---|---|---|---|---|---|---|---|
| \(\bar x\) | 4.5 | 6.0 | 6.5 | 8.0 | 8.5 | 9.0 | 10.5 | 10.5 | 12.0 | 12.5 |
- (c) 这 10 个 \(\bar x\) 就是 \(n=2\) 时抽样分布的全部取值(每个样本概率都是 \(1/10\))。它们的均值:\( \frac{4.5+6.0+\cdots+12.5}{10}=8.8 \),正好等于 \(\mu\)。 (c) These 10 values are the entire sampling distribution for \(n=2\) (each sample has probability \(1/10\)). Their mean is \( \frac{4.5+6.0+\cdots+12.5}{10}=8.8 \), exactly \(\mu\). \[ \mu_{\bar x}=8.8=\mu \]
- 这些 \(\bar x\) 的标准差是 2.4919。注意它比总体的 4.069 小得多:平均之后波动被压掉了。 The SD of these \(\bar x\) values is 2.4919 — far below the population's 4.069: averaging squeezed the wobble. \[ \sigma_{\bar x}=2.4919 \]
- (d) \(n=2\) 时 2.4919,\(n=3\) 时 1.6613:样本量越大,抽样分布越窄,而中心仍是 8.8(无偏)。顺便注意:这里不能用 \( \sigma/\sqrt n \) 直接算(\(4.069/\sqrt2=2.877\)),因为总体只有 5 个、样本占了 40%——必须乘上有限总体修正 \( \sqrt{\frac{5-2}{5-1}}=0.866 \),得 2.492。下一讲的公式 \( \sigma/\sqrt n \) 成立的前提正是 \(N\ge10n\)。 (d) 2.4919 at \(n=2\) versus 1.6613 at \(n=3\): larger samples give narrower sampling distributions, while the centre stays 8.8 (unbiased). Note that \( \sigma/\sqrt n \) cannot be used directly here (\(4.069/\sqrt2=2.877\)) because the population has only 5 fish and the sample is 40% of it — the finite-population correction \( \sqrt{\frac{5-2}{5-1}}=0.866 \) is needed, giving 2.492. Next lecture's \( \sigma/\sqrt n \) presumes \(N\ge10n\).
例 2 用抽样分布评价一个断言Example 2 Evaluating a claim with a sampling distribution
- 第一句永远先把分布讲清楚:“若 \(p=0.6\),则 \(n=100\) 时 \(\hat p\) 的抽样分布中心在 0.6、大致对称、取值约在 0.47–0.74。”这是把模拟结果翻译成抽样分布的语言。 Begin by naming the distribution: "if \(p=0.6\), the sampling distribution of \(\hat p\) for \(n=100\) is centred at 0.6, roughly symmetric, with values about 0.47–0.74." That translates the simulation into sampling-distribution language.
- 再把观测值放进去比较:\(\hat p=0.45\) 落在整个模拟分布之外——也就是说“若 \(p=0.6\),抽到 0.45 这么低的值几乎不可能”。 Then locate the observed value: \(\hat p=0.45\) falls outside the simulated distribution — i.e. "if \(p=0.6\), a value as low as 0.45 is essentially unheard of".
- 最后给结论,注意措辞:说“证据表明校报高估了比例”,不要说“证明了 \(p=0.45\)”,也不能说“校报一定错”——抽样总有偶然。 Conclude with careful wording: "the evidence suggests the paper overstates the proportion" — not "this proves p = 0.45" and not "the paper is certainly wrong"; chance always exists. 这是一次完整的“用抽样分布判断断言”的推理:假设为真 → 描述抽样分布 → 看观测值的位置 → 下结论。That is the full inference pattern: assume the claim → describe the sampling distribution → locate the observation → conclude.
例 3 FRQ:该选哪个估计量?Example 3 FRQ: which estimator should we use?
- 按“先中心、后宽度”的顺序评价。甲:无偏但很散(象限二);乙:略偏但较窄(象限三)。两者都不完美。 Evaluate centre first, then width. A: unbiased but very scattered (quadrant 2). B: slightly biased but narrower (quadrant 3). Neither is perfect.
- 决策规则是“低偏差优先”。中位数估计的题目里,若估计量偏了,再准也没用——所以这里应推荐甲(样本中位数),再通过加大样本量把它变窄。 The decision rule is "low bias first". When estimating a median, a biased statistic is precise but wrong — so recommend A (the sample median) and narrow it by increasing n.
- 改善偏差只能靠抽样机制:确保是简单随机样本、覆盖全体住户(避免只访问到容易接触的高收入小区)。改善变异性只能靠样本量。两件事不能互相替代。 Bias is fixed only by the sampling mechanism: ensure an SRS that covers all households (do not reach only the easily accessible high-income blocks). Variability is fixed only by sample size. The two are not interchangeable.
随堂练习Check Your Understanding
先自己选,再点“查看解答”。四道题分别考:参数/统计量的辨认、四象限判断、样本量与变异性、三种分布的区分。 Choose first, then reveal. These four test parameter/statistic identification, the four quadrants, sample size and variability, and the three kinds of distribution.
某大学 78% 的在校生获得某种资助。校报随机抽取 100 名学生,其中 72% 表示获得了资助。下列哪项正确?
At a college, 78% of all students receive some financial aid. A newspaper takes an SRS of 100 students and 72% report receiving aid. Which is correct?
- a78% 是总体,72% 是样本78% is a population and 72% is a sample
- b72% 是参数,78% 是统计量72% is a parameter and 78% is a statistic
- c78% 是参数 \(p\),72% 是统计量 \(\hat p\)78% is the parameter \(p\) and 72% is the statistic \(\hat p\)
- d78% 是参数 \(p\),100 是统计量78% is the parameter \(p\) and 100 is a statistic
- 看每个数字描述的是谁Ask whom each number describes 78% 描述“该大学在校生”这一整体——这是总体比例 \(p\);72% 只描述这 100 人——这是样本比例 \(\hat p\)。78% describes all students at the college — the population proportion \(p\); 72% describes only the 100 sampled — the sample proportion \(\hat p\). c 正确。c is correct.
- 排除“总体/样本”这种说法Reject wording "a population / a sample" 总体和样本是人或对象的集合,不是数字。78% 不能“是总体”,只能说它“是总体的参数”。A population or sample is a collection of individuals, not a number. 78% cannot "be a population"; it is the population's parameter. a、b 在措辞上已错。a and b are already wrong by wording.
| 选项Option | 判断与理由Verdict & reason |
|---|---|
| a | 错。“总体”“样本”指人或对象的集合,不是数字。Wrong: "population"/"sample" name collections of individuals, not numbers. |
| b | 错。两个都反了:78% 是参数,72% 是统计量。Wrong: both are reversed — 78% is the parameter and 72% the statistic. |
| c | 对。\(p=0.78\)(参数),\(\hat p=0.72\)(统计量)。Correct: \(p=0.78\) (parameter) and \(\hat p=0.72\) (statistic). |
| d | 错。\(n=100\) 是样本量,既不是参数也不是统计量。Wrong: \(n=100\) is the sample size — neither parameter nor statistic. |
下图(示意)给出四个统计量估计同一参数时的抽样分布:i 中心偏右且很窄;ii 中心正好在参数上且很窄;iii 中心在参数上但很宽;iv 中心偏右且很宽。最好的估计量是
Four statistics estimate the same parameter. Their sampling distributions are: i shifted right and narrow; ii centred on the parameter and narrow; iii centred on the parameter but wide; iv shifted right and wide. The best estimator is
- ai,因为最精确i, because it is the most precise
- bii,因为无偏且变异性最小ii, because it is unbiased with the least variability
- ciii,因为无偏iii, because it is unbiased
- div,因为覆盖范围最广iv, because it covers the widest range
- 用中心筛掉一半Filter by centre ii 与 iii 的中心在参数上 ⇒ 无偏;i 与 iv 偏右 ⇒ 有偏,无论多准都先淘汰。ii and iii are centred on the parameter → unbiased; i and iv are shifted right → biased, whatever their precision. 候选集 = {ii, iii}。Candidates: ii and iii.
- 用宽度分出胜负Break the tie by width ii 比 iii 窄,说明单次估计更容易接近参数。两者都无偏,所以选窄的。ii is narrower than iii, so a single estimate is more likely to land near the parameter. Both are unbiased, so take the narrow one. ii 最好(象限一)。ii wins (quadrant 1).
| 选项Option | 判断与理由Verdict & reason |
|---|---|
| a | 错。窄但偏右:精确地错,样本量再大也救不回来。Wrong: narrow but shifted — precisely wrong, and no sample size can fix it. |
| b | 对。无偏且变异性最小,两个标准都满足。Correct: unbiased with the least variability — both criteria satisfied. |
| c | 错。无偏但太宽,单次估计容易离参数很远。Wrong: unbiased but too wide, so a single estimate may land far away. |
| d | 错。又偏又宽,最差的两个缺点都占了。Wrong: biased and wide — both faults at once. |
某小区房屋价值的中位数是 $200 000。若样本中位数是无偏的,下列哪个样本量下,“样本中位数高于 $250 000”最可能发生?
The median home value in a neighbourhood is $200 000. If the sample median is unbiased, for which sample size is "the sample median exceeds $250 000" most likely?
- a\(n=10\)\(n=10\)
- b\(n=50\)\(n=50\)
- c\(n=100\)\(n=100\)
- d\(n=1000\)\(n=1000\)
- 把问题翻译成“离中心多远”Translate into "distance from centre" $250 000 比中位数高 $50 000。要问“这有多可能”,就是问抽样分布的尾巴有多厚。$250 000 is $50 000 above the median. "How likely" is a question about the thickness of the sampling distribution's tail.
- 比较四个分布的宽度Compare the four widths \(n\) 越小分布越宽,尾巴越靠外,$250 000 越容易落进“常见区”。\(n=1000\) 时抽样分布非常窄,几乎不可能偏出 $50 000。Smaller \(n\) means a wider tail, so $250 000 is more likely to fall in the "common" region. At \(n=1000\) the distribution is so narrow that a $50 000 miss is essentially impossible. \(n=10\) 最可能。\(n=10\) is most likely.
| 选项Option | 判断与理由Verdict & reason |
|---|---|
| a | 对。\(n\) 最小 ⇒ 抽样分布最宽 ⇒ 最容易偏出这么远。Correct: smallest \(n\) → widest sampling distribution → most likely to stray this far. |
| b | 错。n 变大后偏差范围已经明显收窄。Wrong: at this n the spread has already narrowed noticeably. |
| c | 错。更宽不了,反而更窄。Wrong: this is narrower, not wider. |
| d | 错。\(n=1000\) 的抽样分布极窄,几乎不会偏出 $50 000——但注意它仍然无偏,无偏与宽度是两件事。Wrong: at \(n=1000\) the distribution is very narrow, so a $50 000 miss is very unlikely — yet it is still unbiased; bias and width are separate matters. |
“某同学反复抽取 \(n=40\) 的简单随机样本,每次都算出平均每周运动时间,把这些平均值画成一张直方图。” 他画的是
"A student repeatedly takes SRSs of size 40, computes the mean weekly exercise time each time, and histograms those means." He has drawn
- a总体分布the population distribution
- b某一次样本的样本数据分布the distribution of sample data from one sample
- c\( \bar x \) 的抽样分布(近似版)the sampling distribution of \( \bar x \) (approximated)
- d参数 \(\mu\) 的分布the distribution of the parameter \(\mu\)
- 看横轴的单位Look at the axis unit 横轴是一个个样本均值(同一水平可能出现多次),每个点代表 40 个人的一次汇总,而不是一个人。The axis holds sample means (the same value may repeat), and each dot summarises 40 people, not one person. 这是抽样分布:\( \bar x \) 的分布。It is a sampling distribution: the distribution of \( \bar x \).
- 为什么说“近似版”Why "approximated" 真正的抽样分布需要抽所有可能的 \(n=40\) 样本;实际只能模拟很多次,所以得到的是它的近似。样本数越多越接近。The true sampling distribution uses all possible samples of size 40; in practice we simulate many, so we get an approximation that improves with the number of simulated samples. c 正确;d 荒谬,参数没有分布。c is correct; d is nonsense — a parameter has no distribution.
| 选项Option | 判断与理由Verdict & reason |
|---|---|
| a | 错。总体分布的每个点是“一个人”。Wrong: each dot in a population distribution is one individual. |
| b | 错。那是把某一次抽样里 40 个人的值画成直方图。Wrong: that histograms the 40 individuals from one sample. |
| c | 对。每个点是“一次抽样的 \(\bar x\)”。Correct: each dot is the \( \bar x \) of one sample. |
| d | 错。\(\mu\) 是固定的未知常数,没有分布——只有统计量才有分布。Wrong: \(\mu\) is a fixed unknown constant with no distribution; only statistics have distributions. |
本讲小结Summary
- 参数描述总体(\(\mu,p,\sigma\),固定未知);统计量描述样本(\( \bar x,\hat p,s \),随样本变化)。\(n\) 两者都不是。
- 抽样变异性:反复抽样会得到不同的统计量值,所以统计量是随机变量,有分布、均值与标准差。
- 抽样分布是同规模所有可能样本的统计量的分布;它与总体分布、样本数据的分布是三件不同的事。
- 无偏:抽样分布的均值 = 参数。无偏不保证单次准确,也不保证变异性小。
- 变异性由样本量决定:n 越大越窄;与总体大小无关(只要 \(N\ge10n\))。增大 \(n\) 不能消除偏差。
- 评价估计量:先看中心(偏差)再看宽度(变异性);随机抽样治偏差,大样本治变异性。
- A parameter describes the population (\(\mu,p,\sigma\); fixed, unknown); a statistic describes a sample (\( \bar x,\hat p,s \); it varies). \(n\) is neither.
- Sampling variability: repeated samples give different values, so a statistic is a random variable with a distribution, mean and SD.
- The sampling distribution is the distribution of a statistic over all samples of the same size; it differs from the population distribution and from the distribution of sample data.
- Unbiased: the mean of the sampling distribution equals the parameter. Unbiasedness promises neither a correct single estimate nor small variability.
- Variability is set by sample size: larger n, narrower distribution, independent of population size (\(N\ge10n\)). Larger n never removes bias.
- Judge an estimator by centre (bias) then width (variability); random sampling treats bias, large samples treat variability.
样本比例的抽样分布Sampling Distributions of Sample Proportions
上一讲说清了“统计量本身是随机变量”。这一讲把这句话落到最常用的一个统计量上:样本比例 \(\hat p\)。我们会给它的抽样分布配齐三样东西——中心、离散程度、形状(用正态近似),学会在动手算之前先过三道条件,最后把结论推广到“两个比例之差”。注意这一讲的 p 是已知的;从第 19 讲起 p 只能靠 \(\hat p\) 猜,那时同一个公式会换上“标准误”的名字。
The previous lecture established that a statistic is itself a random variable. This one makes that concrete for the most common statistic of all, the sample proportion \(\hat p\): we specify the center, spread and shape of its sampling distribution (Normal approximation), learn the three conditions to check before computing, and extend everything to the difference of two proportions. Here p is known; from Lecture 19 onward p must be guessed from \(\hat p\), and the same formula reappears under the name standard error.
本讲学习目标Learning Objectives
- DESCRIBE(描述)用一句话讲清 \(\hat p\) 的抽样分布:形状近似正态、中心在 p、离散程度是 \( \sqrt{p(1-p)/n} \)。
- EXPLAIN(解释)为什么 \(\hat p\) 的中心恰好等于 p,以及为什么样本量变大时分布会收窄。
- CHECK(检查)三个条件:Random(随机)、10%(独立)、Large Counts(大计数),并能说出每个条件被违反时公式会怎么坏掉。
- COMPUTE(计算)用 \( z=\dfrac{\hat p-p}{\sqrt{p(1-p)/n}} \) 配合正态表或计算器,求 \(\hat p\) 落在某区间内的概率,并按 STATE / PLAN / DO / CONCLUDE 写出完整四步。
- DISTINGUISH(区分)\(\sigma_{\hat p}\)(公式里用真实 p,用于算概率)与 \(SE_{\hat p}\)(公式里用 \(\hat p\),用于做推断)。
- DESCRIBE(描述)两个独立样本比例之差 \(\hat p_1-\hat p_2\) 的抽样分布,并用它判断“样本里 A 领先”可不可靠。
- DESCRIBE the sampling distribution of \(\hat p\) in one sentence: shape approximately Normal, center at p, spread \( \sqrt{p(1-p)/n} \).
- EXPLAIN why the center is exactly p, and why the distribution narrows as n grows.
- CHECK the three conditions — Random, 10% (independence) and Large Counts — and say what breaks when one fails.
- COMPUTE probabilities for \(\hat p\) with \( z=\dfrac{\hat p-p}{\sqrt{p(1-p)/n}} \), using the table or a calculator, and write the full STATE / PLAN / DO / CONCLUDE four-step response.
- DISTINGUISH \(\sigma_{\hat p}\) (true p in the formula, used for probabilities) from \(SE_{\hat p}\) (\(\hat p\) in the formula, used for inference).
- DESCRIBE the sampling distribution of the difference \(\hat p_1-\hat p_2\) from two independent samples, and use it to judge whether "A leads in the sample" is trustworthy.
核心概念Core Concepts
17.1 比例不再只是一个数,而是一个随机变量17.1 A Proportion Is No Longer Just a Number
算出一个 \(\hat p=0.42\) 并不等于“真相是 0.42”。换一组样本,这个数就会变——所以 \(\hat p\) 本身是一个随机变量,它有自己的分布,而这个分布我们永远只能“想象”或“模拟”,看不到真身。
Computing \(\hat p = 0.42\) does not mean "the truth is 0.42". Draw another sample and the number moves — so \(\hat p\) is itself a random variable with its own distribution, one we can only imagine or simulate, never observe directly.
回想第 16 讲:抽样分布从同一个总体、用同样大小的样本反复抽样,把统计量的所有可能取值及其出现可能性合起来形成的分布。现实中我们不会真的抽一千次,只想象或模拟它。The distribution of all values a statistic takes over all possible samples of the same size from the same population. In practice we imagine or simulate it rather than repeat the sampling.不是某一次抽样的结果,而是“把抽样这件事重复无数次”之后,统计量取值的整体规律。这一讲的对象是比例:
Recall Lecture 16: a sampling distribution is not the outcome of one sample, but the overall pattern a statistic follows when the same sampling is repeated endlessly. This lecture studies that pattern for a proportion:
设总体中具有某特征的比例为 \(p\)(这是参数,固定但未知);从总体中抽 \(n\) 个个体,其中有 \(X\) 个具备该特征,那么样本比例
Let \(p\) be the population proportion with some characteristic — a parameter, fixed but unknown. Draw \(n\) individuals and let \(X\) of them have the characteristic; then the sample proportion is
| 你面对的东西What you are looking at | 符号Symbol | 身份Its nature | 会变吗Does it vary? |
|---|---|---|---|
| 总体的真实比例Population proportion | \(p\) | 参数(parameter)parameter | 固定,但我们不知道fixed, but unknown |
| 一次抽样得到的比例Proportion from one sample | \(\hat p\) | 统计量(statistic)statistic | 每抽一次就变一次changes with every sample |
| \(\hat p\) 的抽样分布Sampling distribution of \(\hat p\) | — | 概率模型(model)a probability model | 不变:只要 n 与 p 定了,它就定了fixed once n and p are fixed |
因为要回答“这个样本结果有多可信”,唯一的语言就是“如果重复抽样,结果会怎样分布”。第 19 讲的置信区间、第 21 讲的假设检验,全部建立在这一讲的模型上。抽样分布是整门课承重的那根梁。
Because the only way to answer "how trustworthy is this sample result?" is to ask "how would results distribute over repeated sampling?" Confidence intervals (Lec 19) and significance tests (Lec 21) both stand on this model. The sampling distribution is the load-bearing beam of the course.
17.2 中心与离散程度:三个数字定住一个分布17.2 Center and Spread: Three Numbers Fix the Distribution
\(\hat p\) 的抽样分布中心恰好是 p(无偏),标准差是 \( \sqrt{p(1-p)/n} \)。样本量 n 出现在分母的根号里——所以 n 变成 4 倍,散布只剩一半。
The sampling distribution of \(\hat p\) is centered exactly at p (unbiased) with standard deviation \( \sqrt{p(1-p)/n} \). The sample size sits inside a square root in the denominator, so quadrupling n halves the spread.
这两个公式不是天上掉下来的,用第 15 讲二项分布的均值和标准差一除就得到:\(E(X)=np\),所以 \(E(\hat p)=np/n=p\);\(SD(X)=\sqrt{np(1-p)}\),所以 \(SD(\hat p)=\sqrt{np(1-p)}/n=\sqrt{p(1-p)/n}\)。记住推导比记住公式更划算——AP 有时会问你“如果 n 变成 4 倍,标准差怎么变”,会推的人不会答错。
These are not formulas to memorise blindly: divide the binomial mean and SD from Lecture 15 by n. \(E(X)=np\) gives \(E(\hat p)=p\); \(SD(X)=\sqrt{np(1-p)}\) gives \(SD(\hat p)=\sqrt{p(1-p)/n}\). Knowing the derivation beats knowing the formula — AP sometimes asks how the SD changes when n quadruples.
下面这张图把“n 决定散布”演示成可切换的三档。三张图的中心都锁在 0.45,变的是胖瘦:n = 10 时分布又矮又胖,样本比例经常偏离 0.45 一大截;n = 200 时它瘦得像一根针,几乎每次抽样都落在 0.45 附近。这正是“大样本更可靠”的数学含义。
The figure lets you switch between three sample sizes. All three are centred on 0.45; only the width changes. At n = 10 the distribution is short and fat, and \(\hat p\) often lands far from 0.45; at n = 200 it is a narrow spike, so almost every sample lands near 0.45. That is the mathematical meaning of "larger samples are more reliable".
| 样本量 nSample size n | \( \sigma_{\hat p}=\sqrt{0.45\cdot0.55/n} \)\( \sigma_{\hat p} \) | 大致含义(“典型偏离”)Typical distance from p |
|---|---|---|
| 10 | 0.157 | 一次抽样偏离 0.45 十几到二十个百分点很常见being 15+ points off is routine |
| 50 | 0.070 | 误差大约压缩到 7 个百分点errors of about 7 points |
| 200 | 0.035 | 多数样本落在 0.415–0.485 之间most samples land in 0.415–0.485 |
| 800 | 0.0176 | n 是 200 的 4 倍,标准差正好减半n is 4× the 200 case, so the SD is halved |
那 p 本身呢?它也影响胖瘦。p 越接近 0.5,分布越胖,因为 \(p(1-p)\) 在 \(p=0.5\) 时取到最大值 0.25;p 越靠近 0 或 1,分布越瘦。但注意——中心随 p 移动,胖瘦随 p 变化,只有形状的正态性不因 p 而改变(在 Large Counts 满足的前提下)。
What about p itself? It also controls the width. The closer p is to 0.5, the fatter the curve, because \(p(1-p)\) peaks at 0.25 when \(p=0.5\); p near 0 or 1 gives a narrow curve. Note what stays fixed: the Normal shape itself, as long as Large Counts holds.
17.3 先过三道关:Random、10%、Large Counts17.3 Three Gates: Random, 10%, Large Counts
正态近似不是无条件可用的。动笔之前先检查:样本是随机的、n 不超过总体的 10%、成功与失败的期望计数都不少于 10。三道关过不了,后面的 z 值一分不值。
The Normal approximation is not free. Before computing, verify: the sample is random, n is at most 10% of the population, and expected successes and failures are each at least 10. Fail a gate and the z-value earns nothing.
| 条件Condition | 怎么查How to check it | 它保护的是哪句话What it protects | 违反了会怎样If it fails |
|---|---|---|---|
| Random 随机random |
题目自述“随机抽样 / SRS / 随机分配”,或抽样机制确实随机the stem says random sample / SRS, or the mechanism really is random | 中心 \(\mu_{\hat p}=p\) 成立the centre really is p | 样本有偏,分布中心已经不在 p 上,算得再准也是错的the sample is biased, so the centre is not p at all |
| 10% 独立independence |
不放回抽样时,要求 \(n\le \frac{1}{10}N\)when sampling without replacement, \(n\le \frac{1}{10}N\) | 标准差公式 \( \sqrt{p(1-p)/n} \) 成立the SD formula \( \sqrt{p(1-p)/n} \) | 个体之间不再独立,真实标准差比公式给的小,区间会算得偏宽observations are not independent; the true SD is smaller than the formula says |
| Large Counts 大计数large counts |
\(np\ge 10\) 且 \(n(1-p)\ge 10\)\(np\ge 10\) and \(n(1-p)\ge 10\) | 形状近似正态the approximately Normal shape | 分布偏斜,正态算出的概率会明显偏离真实值the distribution is skewed; Normal probabilities are off |
① 10% 条件的方向。它说的是“样本不超过总体的 10%”(\(n\le N/10\)),不是“样本要大于总体的 10%”。写反了整题条件检查全废。② Large Counts 用的是 期望计数。\(np\) 和 \(n(1-p)\) 是“如果 p 为真,我们期望看到多少成功/失败”,不是实际观察到的个数。③ 这一讲 p 已知,就用 p。只有当 p 未知(第 19 讲开始)才换成用 \(\hat p\) 检查,并且要写明“用 \(\hat p\) 代替 p”。
(1) Direction of 10%. It says the sample is no more than 10% of the population (\(n\le N/10\)), not that it must exceed 10%. (2) Large Counts uses expected counts \(np\) and \(n(1-p)\) — what we would expect if p were true, not the counts you happened to observe. (3) Here p is known, so use p. Only when p is unknown (from Lecture 19 on) do you substitute \(\hat p\), and you must say so.
17.4 把概率翻成 z:四步走的标准流程17.4 Turning a Probability into a z: the Four-Step Routine
只要三道关通过,\(\hat p\) 就近似服从 \(N\!\left(p,\sqrt{p(1-p)/n}\right)\)。于是任何关于 \(\hat p\) 的概率问题,都能标准化成标准正态问题——和第 6 讲学的那套一模一样。
Once the three gates pass, \(\hat p\) is approximately \(N\!\left(p,\sqrt{p(1-p)/n}\right)\). Every probability question about \(\hat p\) then standardises into a standard Normal question — exactly the technique from Lecture 6.
举个短例子把流程走完:某总体中 \(p=0.50\),抽 \(n=400\) 人。问“样本比例超过 0.55 的概率”。先检查:随机抽样、总体远大于 4000 人、\(400\times0.5=200\ge10\) 且失败数同样 200,全部通过。于是 \(\sigma_{\hat p}=\sqrt{0.5\cdot0.5/400}=0.025\),\(z=(0.55-0.50)/0.025=2.00\),\(P(\hat p>0.55)=P(Z>2)=0.0228\)。也就是说,如果真实的是一半一半,只有约 2.3% 的样本会偏到 0.55 以上——这正是后面“结果显著吗”的直觉来源。
A short walk-through: let \(p=0.50\) and \(n=400\). What is the chance that \(\hat p\) exceeds 0.55? Conditions: random sample, population far larger than 4000, and \(400(0.5)=200\ge10\) for both successes and failures. So \(\sigma_{\hat p}=\sqrt{0.5\cdot0.5/400}=0.025\), \(z=(0.55-0.50)/0.025=2.00\), and \(P(\hat p>0.55)=P(Z>2)=0.0228\). If the truth really were 50–50, only about 2.3% of samples would stray above 0.55 — the seed of the idea of "statistical significance".
normalcdf(0.55, 1E99, 0.5, 0.025) → 0.02275
AP 官方要求的书写骨架就是这四步,写进答题卡才拿得到全部过程分:
The four-step frame below is the official AP writing skeleton — the full process credit lives there:
17.5 两个比例之差:均值是差,方差相加17.5 Difference of Two Proportions: Means Subtract, Variances Add
要比较两个总体,就研究 \(\hat p_1-\hat p_2\)。它的中心是 \(p_1-p_2\),标准差是 两个方差相加再开根号。注意:差的标准差绝不会是两个标准差直接相减。
To compare two populations, study \(\hat p_1-\hat p_2\). Its centre is \(p_1-p_2\) and its SD is the square root of the sum of the two variances. The SD of a difference is never the difference of the SDs.
为什么方差相加?因为两个独立随机变量的方差可以直接相加,而标准差不行(标准差是方差开根号,不是线性量)。这条规则第 17、19、22 讲会反复用到,属于 AP 的“基本功硬伤区”:一旦写成 \(\sigma_1-\sigma_2\),即使后面数字凑巧对,也拿不到分。
Why add variances? Because variances of independent random variables add, while standard deviations do not (an SD is a square root — not a linear quantity). The rule recurs in Lectures 17, 19 and 22 and is a classic AP hard-error zone: writing \(\sigma_1-\sigma_2\) forfeits the credit even if the arithmetic downstream happens to work.
如果两个比例来自同一批人(例如同一个人既回答“支持 A”又回答“支持 B”),两个样本就不独立,上面的方差相加公式失效。AP 会特意用“同一天、同一家医院、同一批受试者”这样的措辞来钓你。看到“同一批”,先停手。
If both proportions come from the same individuals (the same person answering for A and for B), the samples are not independent and the variance-sum formula fails. AP baits this with wording like "the same day, the same hospital, the same subjects". Spot "the same" and stop.
17.6 \(\sigma\) 与 SE:同一个公式的两种身份17.6 \(\sigma\) versus SE: One Formula, Two Identities
公式里写 p,叫标准差,用于回答“如果 p 已知,抽样会怎样波动”;把 p 换成 \(\hat p\),叫标准误(standard error),用于“p 未知,只能用数据估”。这一字之差就是第 7 章与第 8 章的分界线。
With p in the formula it is a standard deviation, answering "how would sampling vary if p were known". Replace p by \(\hat p\) and it becomes the standard error, used when p is unknown and must be estimated. That single substitution is the border between Chapter 7 and Chapter 8.
| 阶段Stage | 公式Formula | 名字Name | 用来干什么Used for |
|---|---|---|---|
| 第 7 章 · 概率Ch 7 · probability | \( \sqrt{p(1-p)/n} \) | 标准差 \(\sigma_{\hat p}\)standard deviation | p 已知,算 \(\hat p\) 落在某区间的概率p known; compute probabilities for \(\hat p\) |
| 第 8–9 章 · 推断Ch 8–9 · inference | \( \sqrt{\hat p(1-\hat p)/n} \) | 标准误 \(SE_{\hat p}\)standard error | p 未知,用样本估计它并构造区间 / 检验p unknown; estimate it for intervals and tests |
“有 p 用 p,没 p 用 \(\hat p\)”——有 p 的时候你在算概率,没 p 的时候你在做推断。第 19 讲的置信区间就是这句话的直接产物。
"Have p, use p; no p, use \(\hat p\)" — with p you compute probabilities; without p you infer. Lecture 19's confidence interval is the direct product of this sentence.
例题精讲Worked Examples
例 1 “误差在两个百分点以内”到底是多大概率?Example 1 How likely is "within two percentage points"?
- State:把“2 个百分点以内”翻成符号。2 个百分点 = 0.02,所以要求 \(P(0.33\le \hat p\le 0.37)\)。参数 \(p=0.35\),样本量 \(n=1500\)。 State: translate "within 2 percentage points" into symbols — that is 0.02, so we want \(P(0.33\le \hat p\le 0.37)\), with \(p=0.35\) and \(n=1500\).
- Plan:模型取 \(N\!\left(0.35,\sqrt{0.35\cdot0.65/1500}\right)\)。检查三条件——Random:题目明说 SRS;10%:全体大一学生远多于 \(10\times1500=15000\) 人;Large Counts:\(np=1500(0.35)=525\ge10\),\(n(1-p)=1500(0.65)=975\ge10\)。三条全过,才可以用正态。 Plan: the model is \(N\!\left(0.35,\sqrt{0.35\cdot0.65/1500}\right)\). Conditions — Random: the stem states an SRS; 10%: there are far more than \(10\times1500=15000\) first-year students; Large Counts: \(np=525\ge10\) and \(n(1-p)=975\ge10\). All three pass, so the Normal model is licensed. \[ \sigma_{\hat p}=\sqrt{\frac{0.35\times0.65}{1500}}=\sqrt{0.00015167}=0.01232 \]
- Do:两端都标准化。分子分别是 \(-0.02\) 与 \(+0.02\),除以 0.01232 得到 \(\mp1.624\)。 Do: standardise both ends. The numerators are \(-0.02\) and \(+0.02\); dividing by 0.01232 gives \(\mp1.624\). \[ z=\frac{0.33-0.35}{0.01232}=-1.624,\qquad z=\frac{0.37-0.35}{0.01232}=+1.624 \] \[ P(-1.624\le Z\le 1.624)=0.9478-0.0522=0.8956 \]
- Conclude:约 90% 的 1500 人样本会给出与真实值相差不超过 2 个百分点的结果。注意说法——概率是关于“方法”的,不是关于某一次调查的。 Conclude: about 90% of all SRSs of size 1500 will land within 2 percentage points of the truth. Note the wording: the probability describes the method, not one particular survey.
normalcdf(0.33, 0.37, 0.35, 0.01232) → 0.89562
例 2 “样本里 A 领先”能信吗?Example 2 Can we trust "A leads in the sample"?
- 中心:\(\mu=p_A-p_B=0.52-0.46=0.06\)。也就是说,长期来看 A 城会领先 6 个百分点。 Centre: \(\mu=p_A-p_B=0.52-0.46=0.06\) — in the long run city A leads by 6 points. \[ \mu_{\hat p_A-\hat p_B}=0.52-0.46=0.060 \]
- 离散程度:两个方差相加再开根号。这一步千万别写成两个标准差相减。 Spread: add the two variances, then take the root. Do not subtract the two SDs. \[ \sigma=\sqrt{\frac{0.52(0.48)}{400}+\frac{0.46(0.54)}{500}}=\sqrt{0.000624+0.000497}=0.03348 \]
- 形状与条件:两样本独立(题目明说),各自随机、各自不超过各自总体的 10%,四组计数 \(400(0.52)=208\)、\(400(0.48)=192\)、\(500(0.46)=230\)、\(500(0.54)=270\) 全部 ≥ 10,所以近似正态。 Shape and conditions: the samples are independent (stated), each is random and under 10% of its population, and the four expected counts 208, 192, 230, 270 are all ≥ 10, so the difference is approximately Normal.
- 算概率:“A 反而低于 B”就是 \(\hat p_A-\hat p_B<0\)。标准化:\(z=(0-0.06)/0.03348=-1.792\)。 Probability: "A below B" means \(\hat p_A-\hat p_B<0\), so \(z=(0-0.06)/0.03348=-1.792\). \[ P(\hat p_A-\hat p_B<0)=P(Z<-1.792)=0.0366 \]
随堂练习Check Your Understanding
先自己选,再点“查看解答”。每题都给出考点、逐步推理与错误选项诊断——错也要错得明白。 Choose first, then reveal. Every question comes with the tested idea, step-by-step reasoning and a diagnosis of each wrong option.
某总体中具备某特征的比例为 p。今从该总体抽取 SRS,样本量由 100 增加到 400。样本比例 \(\hat p\) 的抽样分布的中心与标准差将如何变化?
A population has proportion p. An SRS is taken, then the sample size is increased from 100 to 400. How do the centre and standard deviation of the sampling distribution of \(\hat p\) change?
- a中心不变,标准差变为原来的一半centre unchanged, SD halved
- b中心不变,标准差变为原来的四分之一centre unchanged, SD quartered
- c中心变为 p/4,标准差变为原来的一半centre becomes p/4, SD halved
- d两者都变为原来的四分之一both quartered
- 先看中心Start with the centre \(\hat p\) 是无偏估计:无论 n 是 10 还是 10000,抽样分布的中心都在 p。\(\hat p\) is unbiased: whatever n is, the sampling distribution is centred at p. 中心不动,c、d 直接排除。The centre does not move, so (c) and (d) are out.
- 再看标准差Then the SD \(\sigma_{\hat p}=\sqrt{p(1-p)/n}\)。n 由 100 变 400,根号里的分母变 4 倍,整个根号变 \(1/\sqrt4=1/2\)。\(\sigma_{\hat p}=\sqrt{p(1-p)/n}\). Going from 100 to 400 multiplies the denominator inside the root by 4, so the root shrinks by \(1/\sqrt4=1/2\). \[ \frac{\sigma_{400}}{\sigma_{100}}=\sqrt{\frac{100}{400}}=\frac12 \] 标准差减半,但不是减到四分之一——那是方差减到四分之一。The SD halves — it is the variance that falls to a quarter.
| 选项Option | 判断与理由Verdict & reason |
|---|---|
| a | 对。中心不变,标准差按 \(1/\sqrt n\) 缩小。Correct: same centre, SD shrinks like \(1/\sqrt n\). |
| b | 错。把“方差变四分之一”误当成“标准差变四分之一”。Wrong: confuses "variance quartered" with "SD quartered". |
| c | 错。中心永远是 p,不会随 n 改变。Wrong: the centre is always p, never a function of n. |
| d | 错。中心是固定参数,不存在“变成四分之一”。Wrong: the centre is a fixed parameter. |
某市想知道“有某手机型号故障的居民比例”。该型号在本市共有 20 万人使用。研究者用 SRS 抽了 60 人,发现有 5 人出现故障。若想用正态近似求 \(\hat p\) 的分布,下列哪一条条件不满足?
A city wants the proportion of residents whose phone of a certain model is defective. 200 000 people use that model. An SRS of 60 is taken; 5 report the defect. Which condition for using the Normal approximation fails?
- aRandom 条件:样本不是随机抽取的Random: the sample is not random
- b10% 条件:样本超过总体的 10%10%: the sample exceeds 10% of the population
- cLarge Counts 条件:\(n\hat p\) 与 \(n(1-\hat p)\) 中有一项不足 10Large Counts: one of \(n\hat p\), \(n(1-\hat p)\) is below 10
- d三条条件都满足,可以放心使用正态All three conditions hold
- RandomRandom 题干写明“用 SRS 抽了 60 人”,随机性满足。The stem says an SRS of 60 was taken, so randomness holds. a 排除。(a) is out.
- 10%10% \(60\le \frac{1}{10}(200000)=20000\),远远满足。\(60\le \frac{1}{10}(200000)=20000\) — easily satisfied. b 排除。(b) is out.
- Large Counts:用 \(\hat p\) 还是 p?Large Counts — \(\hat p\) or p? 这里 p 未知,只能用 \(\hat p=5/60=0.0833\) 代入检查:成功数 \(n\hat p=5<10\),失败数 \(n(1-\hat p)=55\ge10\)。一项不足 10。Here p is unknown, so check with \(\hat p=5/60=0.0833\): successes \(n\hat p=5<10\), failures 55 ≥ 10. One count falls short. \[ n\hat p=5<10,\qquad n(1-\hat p)=55\ge 10 \] Large Counts 不满足,\(\hat p\) 的分布明显右偏,正态近似不可用。Large Counts fails; the distribution is strongly right-skewed and the Normal model is unusable.
| 选项Option | 判断与理由Verdict & reason |
|---|---|
| a | 错。题干明确是 SRS。Wrong: the stem specifies an SRS. |
| b | 错。样本只占总体的万分之三。Wrong: the sample is 0.03% of the population. |
| c | 对。成功数只有 5,小于 10。Correct: only 5 successes, fewer than 10. |
| d | 错。忽略了大计数条件,本题正是在考它。Wrong: ignores Large Counts, which is exactly what this item tests. |
某总体中 \(p=0.40\)。抽取 \(n=200\) 的 SRS,求 \(P(0.37\le \hat p\le 0.43)\) 最接近的值。
For a population with \(p=0.40\), an SRS of \(n=200\) is taken. Which value is closest to \(P(0.37\le \hat p\le 0.43)\)?
- a约 0.31about 0.31
- b约 0.61about 0.61
- c约 0.79about 0.79
- d约 0.95about 0.95
- 条件与标准差Conditions and SD 随机抽样;总体足够大;\(200(0.4)=80\ge10\)、\(200(0.6)=120\ge10\)。于是Random; population large; \(200(0.4)=80\ge10\) and \(200(0.6)=120\ge10\). Hence \[ \sigma_{\hat p}=\sqrt{\frac{0.4\times0.6}{200}}=\sqrt{0.0012}=0.03464 \] 0.03 的偏差大约相当于 0.87 个标准差。A 0.03 gap is about 0.87 standard deviations.
- 标准化Standardise 两个边界关于 0.40 对称,所以只需算一侧的 z,取绝对值。The two endpoints are symmetric about 0.40, so compute |z| once. \[ z=\frac{0.43-0.40}{0.03464}=0.866,\qquad P(-0.866\le Z\le 0.866)=0.6136 \]
- 用常识验算Sanity-check 0.87 个标准差还不到 1,经验法则说 ±1σ 约 68%,所以答案应当略小于 0.68。0.61 正好落在这个区间里。0.87 SD is under 1, and ±1σ captures about 68%, so the answer should be a bit below 0.68. 0.61 fits. 选 b。0.95 对应 ±2σ,0.31 对应单侧,0.79 对应 ±1.26σ,都不对。Choose b. 0.95 would need ±2σ, 0.31 is one tail, 0.79 needs ±1.26σ.
| 选项Option | 判断与理由Verdict & reason |
|---|---|
| a | 错。这是单侧尾部概率 \(P(Z>0.866)\),漏了另一半。Wrong: this is the one-tail area, missing the other half. |
| b | 对。\(2\times0.8068-1=0.6136\)。Correct: \(2(0.8068)-1=0.6136\). |
| c | 错。0.79 大约要 z = 1.26,相当于把标准差算小了。Wrong: 0.79 needs z ≈ 1.26, i.e. an SD that is too small. |
| d | 错。0.95 要 ±1.96σ ≈ ±0.068,明显宽于本题的 ±0.03。Wrong: 0.95 needs ±1.96σ ≈ ±0.068, wider than ±0.03. |
两所学校的独立 SRS:甲校 \(n_1=200\),真实比例 \(p_1=0.50\);乙校 \(n_2=300\),真实比例 \(p_2=0.50\)。\(\hat p_1-\hat p_2\) 的抽样分布的标准差最接近
Independent SRSs from two schools: \(n_1=200\) with \(p_1=0.50\); \(n_2=300\) with \(p_2=0.50\). The standard deviation of \(\hat p_1-\hat p_2\) is closest to
- a0(因为两个真实比例相同,差应为 0)0, since the two population proportions are equal
- b0.04560.0456
- c0.03540.0354
- d0.07070.0707
- 分别算两个方差Both variances \(p=0.5\) 时 \(p(1-p)=0.25\),所以两个方差分别是 \(0.25/200\) 与 \(0.25/300\)。With \(p=0.5\), \(p(1-p)=0.25\), so the variances are \(0.25/200\) and \(0.25/300\). \[ \frac{0.25}{200}=0.00125,\qquad \frac{0.25}{300}=0.000833 \]
- 相加再开根号Add, then root 独立才可相加;题目说两个样本独立。Adding is legal because the samples are independent, as stated. \[ \sigma=\sqrt{0.00125+0.000833}=\sqrt{0.002083}=0.0456 \] 差值通常会在 0 附近上下摆动约 0.046,因此单次调查里 \(\hat p_1-\hat p_2\) 不等于 0 完全正常。The difference typically swings about 0.046 around 0, so a nonzero sample difference is perfectly ordinary.
| 选项Option | 判断与理由Verdict & reason |
|---|---|
| a | 错。把“均值”与“标准差”混为一谈;两个样本仍在随机波动。Wrong: confuses mean with SD; both samples still vary. |
| b | 对。\(\sqrt{0.00125+0.000833}=0.0456\)。Correct: \(\sqrt{0.00125+0.000833}=0.0456\). |
| c | 错。这是把两个标准差直接相减(0.0354−0.0289),典型硬伤。Wrong: this subtracts the two SDs (0.0354−0.0289) — the classic hard error. |
| d | 错。这是把两个标准差直接相加,同样不对。Wrong: this adds the two SDs, also invalid. |
本讲小结Summary
- \(\hat p\) 不是常数而是随机变量;它的抽样分布描述“重复抽样时它会怎样分布”。
- 中心 \(\mu_{\hat p}=p\)(无偏);离散程度 \(\sigma_{\hat p}=\sqrt{p(1-p)/n}\),只由 n 与 p 决定。
- n 变 4 倍,标准差减半;样本量决定精度,总体大小几乎不影响。
- 正态近似要过三关:Random、10%(\(n\le N/10\))、Large Counts(\(np\) 与 \(n(1-p)\) 均 ≥10)。
- 标准化 \(z=\dfrac{\hat p-p}{\sqrt{p(1-p)/n}}\) 之后按 State / Plan / Do / Conclude 四步书写。
- 两个比例之差:\(\mu=p_1-p_2\),\(\sigma=\sqrt{\frac{p_1(1-p_1)}{n_1}+\frac{p_2(1-p_2)}{n_2}}\),并需两组各自满足条件且样本独立;p 未知时把 p 换成 \(\hat p\),名字改叫标准误。
- \(\hat p\) is a random variable, not a constant; its sampling distribution describes how it behaves over repeated samples.
- Centre \(\mu_{\hat p}=p\) (unbiased); spread \(\sigma_{\hat p}=\sqrt{p(1-p)/n}\), fixed by n and p alone.
- Quadrupling n halves the SD; precision is bought with sample size and is almost independent of population size.
- The Normal model needs three gates: Random, 10% (\(n\le N/10\)), Large Counts (\(np\) and \(n(1-p)\) both ≥ 10).
- Standardise with \(z=\dfrac{\hat p-p}{\sqrt{p(1-p)/n}}\) and write the answer in the State / Plan / Do / Conclude frame.
- For a difference: \(\mu=p_1-p_2\), \(\sigma=\sqrt{\frac{p_1(1-p_1)}{n_1}+\frac{p_2(1-p_2)}{n_2}}\), with conditions met in both samples and the samples independent; when p is unknown, replace it by \(\hat p\) and call the result the standard error.
用置信区间估计:基础与总体比例Estimating with Confidence: The Basics and a Proportion
第 17 讲告诉我们“\(\hat p\) 会抖”。既然会抖,只报一个数就是不负责任的——这一讲把它换成一个范围,并且诚实地说明这个范围有多可靠。核心是三个词:estimate ± margin of error、critical value \(z^*\)、confidence level。我们会把最容易被误读的那句“95% 置信”讲透,再落到 p 的单样本 z 区间、宽度三因素与样本量规划。
Lecture 17 established that \(\hat p\) wobbles. If it wobbles, reporting a single number is irresponsible — so this lecture replaces it with a range plus an honest statement of how reliable that range is. Three ideas carry the whole lecture: estimate ± margin of error, the critical value \(z^*\), and the confidence level. We pin down the most misread sentence in statistics ("95% confident"), then apply everything to the one-sample z interval for p, the three levers on width, and sample-size planning.
本讲学习目标Learning Objectives
- INTERPRET(解释)置信水平:它是“这套方法长期的成功率”,不是“这一个区间含有参数的概率”。
- INTERPRET(解释)置信区间:能套用标准句式“我们有 C% 的把握,区间 ___ 到 ___ 覆盖了【情境中的参数】”。
- DESCRIBE(描述)置信区间如何给出参数的一组可信取值,以及它为什么必然伴随不确定性。
- DESCRIBE / CHECK(检查)三个推断条件:Random、10%、Large Counts,并写清用 \(\hat p\) 检查大计数。
- CONSTRUCT(构造)p 的单样本 z 区间:\(\hat p\pm z^*\sqrt{\hat p(1-\hat p)/n}\),会用 Table A 或
invNorm求 \(z^*\)。 - EXPLAIN(解释)影响区间宽度的三个因素,并按 \(n=\hat p(1-\hat p)(z^*/ME)^2\) 规划样本量(无先验时用 0.5)。
- INTERPRET a confidence level: it is the long-run success rate of the method, not the probability that this particular interval contains the parameter.
- INTERPRET a confidence interval with the standard sentence: "We are C% confident that the interval from ___ to ___ captures the [parameter in context]."
- DESCRIBE how an interval gives a range of plausible values for a parameter, and why uncertainty cannot be removed.
- DESCRIBE and CHECK the three inference conditions — Random, 10%, Large Counts — stating the counts used with \(\hat p\).
- CONSTRUCT the one-sample z interval for p, \(\hat p\pm z^*\sqrt{\hat p(1-\hat p)/n}\), finding \(z^*\) from Table A or
invNorm. - EXPLAIN the three levers on the width of an interval and plan a sample size with \(n=\hat p(1-\hat p)(z^*/ME)^2\), using 0.5 when no prior guess exists.
核心概念Core Concepts
19.1 从点估计到区间:为什么必须说“范围”19.1 From a Point Estimate to an Interval
样本算出来的那个数叫点估计用样本统计量的一个数值去估计总体参数。它是最佳猜测,但几乎不可能恰好等于参数。A single statistic value used to estimate a parameter. It is our best guess, yet almost never exactly right.,它是“最好的猜测”,但它几乎不可能正好等于真值。置信区间做的事,就是把“猜一个点”换成“划一段合理范围”,并给出这段范围的命中率。
The single number from a sample is a point estimateA single statistic value used to estimate a parameter; the best guess, yet almost never exactly right.用样本统计量的一个数值去估计总体参数;是最佳猜测,但几乎不可能恰好等于参数。 — the best guess, but almost never exactly the truth. A confidence interval replaces "guess a point" with "mark off a plausible range", and states that range's hit rate.
课本里有一个很妙的课堂活动,叫“猜神秘均值”:老师在计算器里存了一个未知的 \(M\),然后执行 mean(randNorm(M,20,16)),屏幕上出现 240.79。意思是:从均值 \(M\)、标准差 20 的正态总体里抽了 16 个观测,样本均值是 240.79。请你据此给 \(M\) 一个“合理范围”。
A lovely classroom activity called "the mystery mean": your teacher stores an unknown \(M\) in the calculator and runs mean(randNorm(M,20,16)), which displays 240.79. Translation: an SRS of 16 observations was drawn from a Normal population with mean \(M\) and SD 20, giving a sample mean of 240.79. Now give a plausible range for \(M\).
怎么下手?第 16、17 讲已经给了全部工具:\(\bar x\) 的抽样分布中心在 \(M\),标准差是 \(20/\sqrt{16}=5\),形状正态。于是 240.79 距离 \(M\) 一个标准差的概率约 68%,两个标准差约 95%。反过来推:\(M\) 有 95% 的把握落在 \(240.79\pm2(5)\),也就是 230.79 到 250.79 之间。这就是置信区间的全部思想——把“样本统计量离参数多远”翻个方向。
The tools are already in hand: \(\bar x\) is centred at \(M\), has SD \(20/\sqrt{16}=5\), and is Normal. So 240.79 sits within one SD of \(M\) about 68% of the time and within two SDs about 95% of the time. Flip it around: we can be about 95% confident that \(M\) lies within \(240.79\pm2(5)\), i.e. between 230.79 and 250.79. That is the entire idea of a confidence interval — reversing "how far is the statistic from the parameter?"
下面这张图是 AP 最经典的直觉图:让电脑重复抽样 100 次,每次都画一段区间。绿色的 95 条盖住了真值 μ,红色的 5 条没盖住。注意红条出现的位置毫无规律——它们不是“算错了”,而是抽样本来就允许的失误率。这张图解释了“95%”到底在数什么:数的不是概率,是长期的比例。
The figure below is AP's classic intuition pump: repeat the sampling 100 times and draw an interval each time. 95 intervals (green) capture the true μ; the 5 red ones miss. Note that the reds appear at random — they are not arithmetic errors, but the failure rate the method permits. This figure explains what "95%" counts: not a probability for one interval, but a long-run proportion.
所有置信区间都是同一个模子:统计量 ± (临界值) × (统计量的标准差)。估计值负责“中心”,临界值负责“几倍标准差”,标准差负责“一个标准差有多长”。第 20 讲换成 t 分布时,只换临界值,模子不变。
Every confidence interval has one shape: statistic ± (critical value) × (standard deviation of the statistic). The estimate sets the centre, the critical value sets how many SDs, and the SD sets the length of one SD. Lecture 20 swaps \(z^*\) for \(t^*\); the mould never changes.
19.2 解剖一个区间:estimate ± margin of error19.2 Anatomy of an Interval: estimate ± margin of error
区间由两半组成:中心是估计值,两侧各伸出“误差范围”。误差范围 = 临界值 × 标准误;临界值 \(z^*\) 就是“为了盖住中间 C% 的面积,需要走几个标准差”。
An interval has two halves: the estimate at the centre, and a margin of error stretched to each side. Margin of error = critical value × standard error, and \(z^*\) answers "how many SDs must I walk to capture the middle C% of the area?"
临界值 \(z^*\) 的求法只有一句话:让它左右各留 \((1-C)/2\) 的尾巴。例如 95% 置信,两侧各留 2.5%,所以 \(z^*\) 是标准正态曲线上“左侧面积 0.975”的那个点,即 1.960。95% 之所以常被记成“两个标准差”,是因为 1.96 约等于 2;而 90% 只有 1.645,99% 要 2.576。置信越高,要走得越远,区间自然越宽。
Finding \(z^*\) is one sentence: leave \((1-C)/2\) in each tail. For 95% confidence each tail holds 2.5%, so \(z^*\) is the point with 0.975 of the standard Normal area to its left: 1.960. The folklore "two standard deviations" is just 1.96 rounded. At 90% you only need 1.645; at 99% you need 2.576. Greater confidence means walking farther, hence a wider interval.
invNorm(0.95) → 1.6449 invNorm(0.975) → 1.9600 invNorm(0.995) → 2.5758
| 置信水平 CConfidence level C | 两侧尾巴各留Each tail | 查表用的左侧面积Left-tail area for the table | 临界值 \(z^*\)Critical value \(z^*\) |
|---|---|---|---|
| 90% | 0.05 | 0.950 | 1.645 |
| 95% | 0.025 | 0.975 | 1.960 |
| 98% | 0.01 | 0.990 | 2.326 |
| 99% | 0.005 | 0.995 | 2.576 |
19.3 “95% 置信”到底在说什么:本讲最重要的一句话19.3 What "95% confident" really means
置信水平描述方法,不描述这一个区间。正确说法是“用这套方法反复抽样,约 95% 的区间会盖住真值”;错误说法是“这个区间有 95% 的概率包含 μ”——参数是固定的,它要么在里面,要么不在。
The confidence level describes the method, not this particular interval. Correct: "about 95% of intervals produced by this method capture the true value." Wrong: "there is a 95% chance that μ lies in this interval" — the parameter is fixed and either is or is not inside.
为什么错的那句这么诱人?因为它听起来和我们真正想要的答案一模一样。但把逻辑拆开就清楚了:方法是随机的(样本随机),参数是固定的。随机的东西才有概率。一旦你抽完样、算出 0.375 到 0.478,这条区间已经是历史事实,不再随机;此时只剩两种可能——它盖住了 p,或者没盖住。95% 说的是“在抽之前,这套方法有 95% 的机会成功”。
Why is the wrong sentence so tempting? Because it sounds exactly like what we want to know. Unpack the logic: the method is random (the sample is random) while the parameter is fixed. Only random things carry probabilities. Once you have drawn the sample and computed 0.375 to 0.478, that interval is a fait accompli; it either captures p or it does not. The 95% was the method's chance of success before you sampled.
| 说法Statement | 判决Verdict | 理由Why |
|---|---|---|
| “我们有 95% 的把握,区间 0.375 到 0.478 覆盖了容器中红珠的真实比例。”"We are 95% confident that the interval 0.375 to 0.478 captures the true proportion of red beads." | 正确 | 标准句式,参数在情境里说清,置信度说明“方法的把握”。The template sentence: parameter in context, confidence attached to the method. |
| “这个区间有 95% 的概率包含 p。”"This interval has a 95% probability of containing p." | 错误 | 区间已定、p 也固定,没有随机性可谈。The interval is fixed and so is p; nothing is random any more. |
| “总体中有 95% 的个体落在这个区间里。”"95% of the population falls inside this interval." | 错误 | 把“参数的区间”误读成“个体的区间”;这是预测区间想说的事,完全另一回事。Confuses an interval for a parameter with an interval for individuals — that is a prediction interval, a different object. |
| “如果重复抽样很多次,约 95% 的这类区间会盖住 p。”"If we took many samples, about 95% of such intervals would capture p." | 正确 | 这是对置信水平的解释,正是 AP 想要的表述。This interprets the level, exactly what AP asks for. |
AP 的评分标准把“解释区间”单列为一个得分点。写“有 95% 概率包含”直接判错,因为它在概念上把参数当成了随机变量。安全的写法永远是:“We are C% confident that the interval from ___ to ___ captures the true [parameter in context].” 加一句“这是方法的长期成功率”更稳。
AP's rubric scores "interpret the interval" as its own point. Writing "95% probability of containing" is scored wrong because it treats the parameter as random. The safe sentence is always: "We are C% confident that the interval from ___ to ___ captures the true [parameter in context]." Adding "that is the method's long-run success rate" makes it bullet-proof.
19.4 动手之前:三个推断条件19.4 Before You Compute: the Three Inference Conditions
置信区间的公式只在三条件下才有意义:Random(随机来源)、10%(独立)、Large Counts(近似正态)。这三条不是形式主义——每一条对应公式里的一个部件,坏一条,公式就少一块地基。
The formula is meaningful only under three conditions: Random (a random source), 10% (independence), Large Counts (approximate Normality). They are not ceremony: each one underwrites one piece of the formula, and losing one removes a foundation stone.
Random 随机Random
数据来自设计良好的随机抽样或随机分配。它保证区间中心无偏——没有随机性,\(\hat p\) 的分布根本不存在,“95% 的方法成功率”无从谈起。
Data come from a well-designed random sample or randomised experiment. It makes the interval's centre unbiased; without randomness there is no sampling distribution at all.
写法“Random: 题目说明是 SRS,随机性满足。”
Write"Random: the stem states an SRS, so the condition is met."
10% 独立10%
不放回抽样时要求 \(n\le \frac{1}{10}N\)。它保证个体之间近似独立,从而标准误公式 \(\sqrt{\hat p(1-\hat p)/n}\) 成立。
When sampling without replacement, require \(n\le \frac{1}{10}N\). It buys approximate independence, which is what licenses the standard error \(\sqrt{\hat p(1-\hat p)/n}\).
写法“10%: 3000 ≥ 10×251 = 2510,满足。”
Write"10%: 3000 ≥ 10(251) = 2510, satisfied."
Large Counts 大计数Large Counts
\(n\hat p\ge 10\) 且 \(n(1-\hat p)\ge 10\)。p 未知,所以用 \(\hat p\) 检查。它保证抽样分布近似正态,\(z^*\) 才有意义。
\(n\hat p\ge 10\) and \(n(1-\hat p)\ge 10\). Since p is unknown, check with \(\hat p\). It licenses approximate Normality, without which \(z^*\) means nothing.
写法“Large Counts: 107 ≥ 10 且 144 ≥ 10。”
Write"Large Counts: 107 ≥ 10 and 144 ≥ 10."
若 Random 被违反(例如自愿回应样本),再宽的区间也救不回来——置信区间只能处理抽样误差,处理不了偏差。若 Large Counts 不足(成功或失败少于 10),正态近似不成立,此时应加大样本或用精确二项方法,而不是假装条件满足。AP 常设一小题专门问“哪个条件不满足,会带来什么后果”,答案要落到“中心有偏 / 标准误不准 / 形状不正态”。
If Random fails (say, a voluntary-response sample), no interval can rescue you — confidence intervals handle sampling error, never bias. If Large Counts fail (fewer than 10 successes or failures), the Normal approximation is unjustified: enlarge the sample or use exact binomial methods rather than pretending. AP often adds a part asking which condition fails and what the consequence is; the answer must name "biased centre / wrong SE / non-Normal shape".
19.5 p 的单样本 z 区间19.5 The One-Sample z Interval for p
把 \(\hat p\) 与标准误塞进模子,就得到 p 的置信区间:\(\hat p\pm z^*\sqrt{\hat p(1-\hat p)/n}\)。公式里出现 \(\hat p\) 的地方都写 \(\hat p\),不要混入 p——这里的 p 恰恰是我们不知道的东西。
Drop \(\hat p\) and its standard error into the mould and you have the interval for p: \(\hat p\pm z^*\sqrt{\hat p(1-\hat p)/n}\). Every occurrence uses \(\hat p\) — never p, because p is precisely what is unknown.
公式只有三个零件:中心是 \(\hat p\),一格的宽度是标准误 \(\sqrt{\hat p(1-\hat p)/n}\),走几格由 \(z^*\) 决定。三个零件填对,区间就对了。
The formula has just three parts: the centre \(\hat p\), the width of one step (the standard error \(\sqrt{\hat p(1-\hat p)/n}\)), and how many steps to walk (\(z^*\)).
19.6 宽度三因素与样本量规划19.6 Three Levers on Width, and Planning a Sample Size
区间宽度只被三样东西控制:置信水平越高越宽、样本量越大越窄、\(\hat p\) 越接近 0.5 越宽。想让区间变窄又不想降低置信度,唯一的办法是多抽样本。
Width is governed by exactly three things: higher confidence widens it, a larger sample narrows it, and \(\hat p\) nearer 0.5 widens it. If you want a narrower interval without lowering confidence, the only lever is a bigger sample.
| 改动Change | 宽度Width | 为什么Mechanism |
|---|---|---|
| 置信水平从 90% 升到 99%confidence 90% → 99% | 变宽 | \(z^*\) 从 1.645 变 2.576,误差范围按比例放大\(z^*\) rises 1.645 → 2.576, scaling the margin |
| 样本量从 251 增到 1004(4 倍)n 251 → 1004 (4×) | 变窄 | 标准误按 \(1/\sqrt n\) 缩小,正好减半the standard error shrinks like \(1/\sqrt n\) — halved |
| \(\hat p\) 从 0.90 移到 0.50\(\hat p\) 0.90 → 0.50 | 变宽 | \(\hat p(1-\hat p)\) 在 0.5 处取最大值 0.25\(\hat p(1-\hat p)\) peaks at 0.25 when \(\hat p=0.5\) |
| 总体从 3000 颗增到 30000 颗(n 不变)population 3000 → 30 000 (same n) | 基本不变 | 公式里没有 N;只有 10% 条件与它有关N is not in the formula; only the 10% condition involves it |
为什么可以用 0.5?因为 \(0.5\times0.5=0.25\) 是 \(p(1-p)\) 可能取到的最大值,代入它会得到最大的 n。宁可多抽几个,也不要让误差超标——这与“向上取整”是同一种保守心态。下图把“误差范围 vs 样本量”画成一条下降曲线:想从 0.05 压到 0.03,n 要从约 385 涨到约 1068,涨了将近三倍。这就是“精度很贵”的样子。
Why 0.5? Because \(0.5\times0.5=0.25\) is the largest possible \(p(1-p)\), so substituting it yields the largest n. Better to sample a few extra people than to exceed the required margin — the same conservatism as rounding up. The figure plots margin of error against sample size: squeezing 0.05 down to 0.03 pushes n from about 384 to about 1068, nearly a threefold increase. That is what "precision is expensive" looks like.
例题精讲Worked Examples
下面三题都按 AP 的四步骨架写:State 说清参数与置信水平,Plan 点名方法与条件,Do 算数,Conclude 用情境里的语言解释。建议先遮住答案自己写一遍。 All three follow the AP four-step frame: State the parameter and level, Plan the method and conditions, Do the arithmetic, Conclude in context. Cover the answers and write your own first.
1-PropZInt → (0.37491, 0.47768) p̂ = 0.426295 n = 251
- 错误一:把概率加到参数身上。参数 p 是固定的,区间也已算出,两者关系只有“覆盖 / 不覆盖”。95% 属于方法,正确说法是“重复抽样时约 95% 的这类区间会盖住 p”。 Error 1: probability attached to the parameter. p is fixed and the interval is already computed, so the relation is capture or no capture. The 95% belongs to the method: "about 95% of such intervals capture p in repeated sampling".
- 错误二:把“参数的区间”当成“未来观测的区间”。下一次的 \(\hat p\) 会围绕 p 波动,它落在 (0.42, 0.51) 的概率由 \(\sigma_{\hat p}\) 决定,与 95% 没有关系;描述单个未来取值的区间是另一类工具。 Error 2: treating an interval for a parameter as an interval for a future observation. The next \(\hat p\) wobbles around p; its chance of landing in (0.42, 0.51) is governed by \(\sigma_{\hat p}\), not by 95%. Intervals for individual values are a different tool.
- 顺带一提,(0.42, 0.51) 宽 0.09,中点 0.465。若想知道“这个区间是在什么样本量下算出来的”,可以反推:\(ME=0.045=1.96\sqrt{0.465(0.535)/n}\) 给出 \(n\approx 472\)。AP 有时会这样反向出题。 By the way, (0.42, 0.51) has width 0.09 and midpoint 0.465. To recover the sample size behind it: \(ME=0.045=1.96\sqrt{0.465(0.535)/n}\) gives \(n\approx473\). AP sometimes asks this in reverse.
随堂练习Check Your Understanding
先自己选,再点“查看解答”。每题都给出考点、逐步推理与错误选项诊断。 Choose first, then reveal. Each item comes with the tested idea, step-by-step reasoning and a diagnosis of every wrong option.
研究者从某总体抽取 SRS 并算出 95% 置信区间。下列哪一种表述是正确的?
A researcher takes an SRS and computes a 95% confidence interval. Which statement is correct?
- a这个区间有 95% 的概率包含真实参数this interval has a 95% chance of containing the true parameter
- b重复抽样很多次,约 95% 的这类区间会包含真实参数in repeated sampling, about 95% of such intervals would contain the true parameter
- c总体中有 95% 的个体取值落在这个区间内95% of the population's values lie in this interval
- d下一次抽样的样本统计量有 95% 的概率落在其中the next sample's statistic has a 95% chance of falling inside it
- 问自己“谁是随机的”Ask what is random 随机的是“抽样 → 算区间”这一整套动作,参数 p 是固定的未知数。What varies is the whole procedure (sample, then compute); p is a fixed unknown. 概率只能挂在方法上,不能挂在参数或已算出的区间上 → a 错。Probability attaches to the method, not to the parameter or a finished interval → (a) fails.
- 排除“个体”与“未来”的读法Rule out "individuals" and "next sample" c 把参数区间当成个体取值范围;d 把参数区间当成预测区间。两者都是把工具用错了对象。(c) confuses a parameter interval with a range of individuals; (d) treats it as a prediction interval. 只剩 b:它把 95% 精确地挂在“重复抽样”的方法上。Only (b) remains: it pins 95% on the repeated-sampling method.
| 选项Option | 判断与理由Verdict & reason |
|---|---|
| a | 错。经典误解:把概率加到固定的参数上。Wrong: the classic error of putting probability on a fixed parameter. |
| b | 对。这是置信水平的标准解释。Correct: the standard interpretation of a confidence level. |
| c | 错。区间是给参数的,不是给分布的中间 95%。Wrong: the interval is for a parameter, not the middle 95% of a distribution. |
| d | 错。下一次统计量往往比区间宽得多,这是另一种区间。Wrong: a future statistic spreads much wider — that is a different interval. |
其余条件不变,下列哪一项会让 p 的置信区间变窄?
All else equal, which change would make a confidence interval for p narrower?
- a把置信水平从 90% 提高到 95%raise the confidence level from 90% to 95%
- b保持 n 不变,但总体规模从 1 万增到 100 万keep n but enlarge the population from 10 000 to 1 000 000
- c把样本量从 400 增到 1600increase the sample size from 400 to 1600
- d让 \(\hat p\) 从 0.20 变成 0.50(n 不变)let \(\hat p\) move from 0.20 to 0.50 with n fixed
- 逐个旋钮看Check each knob a 把 \(z^*\) 从 1.645 抬到 1.960 → 变宽;b 公式里没有 N → 几乎不变;d 把 \(\hat p(1-\hat p)\) 从 0.16 抬到 0.25 → 变宽;c 把 n 变 4 倍 → 标准误减半 → 变窄。(a) lifts \(z^*\) 1.645 → 1.960: wider. (b) N is not in the formula: essentially unchanged. (d) raises \(\hat p(1-\hat p)\) from 0.16 to 0.25: wider. (c) quadruples n, halving the SE: narrower. \[ \sqrt{\frac{0.25}{1600}}\ \Big/\ \sqrt{\frac{0.25}{400}}=\sqrt{\frac{400}{1600}}=\frac12 \] 只有 c 变窄,宽度正好减半。Only (c) narrows it, exactly halving the width.
- 为什么 b 值得单独记住Why (b) deserves its own note 很多同学以为“总体越大越难估”。其实精度来自 n 与总体的比例,只要 n 不超过总体 10%,总体多大都一样。全国民调抽 1000 人与一个县抽 1000 人,误差范围相同。Many students believe a bigger population is harder to estimate. Precision depends on n relative to the population; as long as n stays under 10%, population size is irrelevant. A national poll of 1000 and a county poll of 1000 have the same margin. b 不改变宽度,是典型的干扰项。(b) leaves the width unchanged — a classic distractor.
| 选项Option | 判断与理由Verdict & reason |
|---|---|
| a | 错。置信越高,\(z^*\) 越大,区间越宽。Wrong: higher confidence means a larger \(z^*\) and a wider interval. |
| b | 错。N 不出现在宽度公式里。Wrong: N does not appear in the width formula. |
| c | 对。n 变 4 倍,标准误减半。Correct: quadrupling n halves the standard error. |
| d | 错。\(\hat p\) 接近 0.5 时 \(p(1-p)\) 最大,区间最宽。Wrong: \(\hat p\) near 0.5 maximises \(\hat p(1-\hat p)\) and widens the interval. |
某校从 8000 名学生中随机抽取 500 人,其中 180 人每天步行上学。求步行上学比例的 95% 置信区间,最接近的是
A school randomly selects 500 of its 8000 students; 180 walk to school daily. The 95% confidence interval for the proportion who walk is closest to
- a(0.318, 0.402)(0.318, 0.402)
- b(0.325, 0.395)(0.325, 0.395)
- c(0.290, 0.430)(0.290, 0.430)
- d(0.360, 0.402)(0.360, 0.402)
- 条件Conditions 随机抽样有;\(500\le \frac{1}{10}(8000)=800\) 有;成功 180 与失败 320 都 ≥10。Random sampling: yes. \(500\le \frac{1}{10}(8000)=800\): yes. 180 successes and 320 failures, both ≥ 10. 三条全过,可用 z 区间。All three pass, so the z interval is valid.
- 标准误与误差范围SE and margin \(\hat p=0.36\),所以 \(\hat p(1-\hat p)=0.2304\)。\(\hat p=0.36\), so \(\hat p(1-\hat p)=0.2304\). \[ SE=\sqrt{\frac{0.2304}{500}}=0.02147,\qquad ME=1.96(0.02147)=0.0421 \]
- 合成区间Assemble 两端分别是 \(0.36\mp0.0421\)。The ends are \(0.36\mp0.0421\). \[ (0.3179,\ 0.4021)\ \approx\ (0.318,\ 0.402) \] 区间宽约 0.084,包含 0.36 两侧,形状对称。Width ≈ 0.084, symmetric about 0.36.
| 选项Option | 判断与理由Verdict & reason |
|---|---|
| a | 对。\(0.36\pm0.0421\)。Correct: \(0.36\pm0.0421\). |
| b | 错。这用了 \(z^*=1.645\)(90% 的临界值)。Wrong: this uses \(z^*=1.645\), the 90% value. |
| c | 错。这用了 \(z^*\approx2.6\)(99% 的临界值)。Wrong: this uses \(z^*\approx2.6\), the 99% value. |
| d | 错。只取了右半边(把误差范围当成全宽),是典型的手滑。Wrong: only the right half — treats the margin as the whole width. |
某小镇共有 180 户人家。研究者不放回地随机走访了 25 户,问是否装了太阳能板,算出比例的区间。若不考虑修改设计,哪条条件最可能被违反?
A town has 180 households. A researcher randomly visits 25 households without replacement and builds an interval for the proportion with solar panels. Which condition is most likely violated if the design is unchanged?
- aRandom:走访不是随机抽样Random: the visits are not random
- b10%:25 户超过了 180 户的 10%10%: 25 households exceed 10% of 180
- cLarge Counts:观察到的成功与失败都少于 10Large Counts: both successes and failures fall below 10
- d三条都满足,没有违反all three hold
- 算一算阈值Compute the threshold \(\frac{1}{10}(180)=18\),而实际抽了 25 户。\(\frac{1}{10}(180)=18\), but 25 were sampled. \[ n=25\ >\ \frac{1}{10}(180)=18 \] 10% 条件被违反——不放回抽得太多,个体之间不再近似独立。The 10% condition fails: too large a fraction sampled without replacement, so observations are not independent.
- 后果是什么What the failure costs 真实标准差会比 \(\sqrt{\hat p(1-\hat p)/n}\) 更小,因为样本已经“用掉”了总体的一大块。于是我们算出的区间偏宽、结论偏保守。The true SD is smaller than \(\sqrt{\hat p(1-\hat p)/n}\) because the sample consumed a large share of the population, so the computed interval is too wide and the conclusion overly cautious. 典型补救:改用有限总体校正,或把 n 压到 18 以内。Fixes: a finite-population correction, or shrink n to 18 or fewer.
- 顺带检查另两条Check the other two Random 有(题目说随机走访);Large Counts 取决于数据,若观察到 6 户装、19 户没装,则成功数 6 < 10,也会违反。但题干没有给计数,最确定的违反是 10%。Random holds (random visits). Large Counts depends on the data: 6 installed and 19 not would also fail. But no counts are given, so the certain violation is 10%. 选“最确定的那个”,这是 AP 选择题的重要习惯。Choose the violation that is certain — an important MCQ habit.
| 选项Option | 判断与理由Verdict & reason |
|---|---|
| a | 错。题干说明是随机走访。Wrong: the visits are stated to be random. |
| b | 对。25 > 18,超过总体的 10%。Correct: 25 > 18, more than 10% of the population. |
| c | 可能,但题目没给计数,无法确定;b 是必然违反的。Possible but undetermined without counts; (b) is certain. |
| d | 错。10% 已经违反。Wrong: 10% already fails. |
某机构要做 99% 置信、误差范围不超过 0.02 的比例调查,且没有任何先验比例信息。至少需要多少样本?(答案取最近的正整数)
A firm wants a 99% confidence interval for a proportion with margin at most 0.02, with no prior information. About how many observations are needed?
- a约 1068about 1068
- b约 2401about 2401
- c约 4148about 4148
- d约 16587about 16 587
- 选对 z*Pick the right z* 99% → 两侧各留 0.005 → 左侧面积 0.995 → \(z^*=2.576\)。用 1.96 会把样本量算小一半。99% → 0.005 in each tail → left area 0.995 → \(z^*=2.576\). Using 1.96 would understate n badly. \[ \text{invNorm}(0.995)=2.576 \]
- 代入公式Substitute 没有先验,取 \(\hat p=0.5\),于是 \(\hat p(1-\hat p)=0.25\)。No prior, so take \(\hat p=0.5\) and \(\hat p(1-\hat p)=0.25\). \[ n=0.25\left(\frac{2.576}{0.02}\right)^{2}=0.25(16589.4)=4147.4\ \longrightarrow\ 4148 \] 向上取整得 4148。若向下取 4147,误差就会略超 0.02。Round up to 4148; rounding down to 4147 would push the margin just above 0.02.
| 选项Option | 判断与理由Verdict & reason |
|---|---|
| a | 错。这是 95% 置信、ME=0.03 的答案。Wrong: that is the 95% answer for ME = 0.03. |
| b | 错。这是用了 \(z^*=1.96\) 但 ME=0.02 的答案(\(0.25(98)^2\))。Wrong: this is \(z^*=1.96\) with ME = 0.02. |
| c | 对。\(0.25(128.8)^2=4147.4\to4148\)。Correct: \(0.25(128.8)^2=4147.4\to4148\). |
| d | 错。这是忘了乘 \(\hat p(1-\hat p)=0.25\)(直接算了 \((2.576/0.02)^2\))。Wrong: forgets the factor 0.25. |
本讲小结Summary
- 点估计是“最好的猜测”,但几乎不会正好命中;置信区间用 estimate ± margin of error 给出可信取值。
- 一般形式:统计量 ± 临界值 × 统计量的标准差;比例的区间是 \(\hat p\pm z^*\sqrt{\hat p(1-\hat p)/n}\)。
- \(z^*\) 由“中间要盖住 C% 的面积”决定:90% → 1.645,95% → 1.960,99% → 2.576;用
invNorm((1+C)/2)求。 - 置信水平是方法的长期成功率;标准句式是“We are C% confident that the interval from ___ to ___ captures the true [parameter]”。
- 三条件:Random、10%、Large Counts(用 \(\hat p\) 检查);条件不合格时不能硬算,偏差无法用区间修正。
- 宽度三因素:置信水平↑宽、n↑窄、\(\hat p\) 接近 0.5 宽;规划样本量用 \(n=\hat p(1-\hat p)(z^*/ME)^2\),无先验取 0.5 并向上取整。
- A point estimate is the best guess and almost never exact; a confidence interval gives plausible values via estimate ± margin of error.
- General form: statistic ± critical value × SD of the statistic; for a proportion, \(\hat p\pm z^*\sqrt{\hat p(1-\hat p)/n}\).
- \(z^*\) is set by the central C% of area: 90% → 1.645, 95% → 1.960, 99% → 2.576, via
invNorm((1+C)/2). - The level is the method's long-run success rate; the template is "We are C% confident that the interval from ___ to ___ captures the true [parameter]".
- Conditions: Random, 10%, Large Counts (checked with \(\hat p\)); never compute through a failed condition, and no interval repairs bias.
- Width: higher confidence widens, larger n narrows, \(\hat p\) near 0.5 widens; plan with \(n=\hat p(1-\hat p)(z^*/ME)^2\), using 0.5 and rounding up.
估计总体均值:t 分布与均值区间Estimating a Population Mean: the t Distributions
上一讲给比例造了区间,这一讲把同一套模子搬到均值上。唯一的障碍是:总体标准差 σ 几乎从来不知道,只能用样本标准差 s 顶上。这一“顶”让统计量的分布从正态变成一族更厚尾的 t 分布,也让临界值从 \(z^*\) 变成 \(t^*\)。本讲会把 t 与正态的差别、自由度、Table B 与 invT、均值的四步区间、以及小样本必须“看图说话”的条件检查全部走一遍。
The previous lecture built an interval for a proportion; this one moves the same mould to a mean. The obstacle is that σ is almost never known, so the sample standard deviation s must stand in for it — and that substitution turns the standard Normal into a family of heavier-tailed t distributions, replacing \(z^*\) with \(t^*\). This lecture covers how t differs from Normal, degrees of freedom, Table B versus invT, the four-step interval for a mean, and the graph-based condition check that small samples demand.
本讲学习目标Learning Objectives
- STATE and CHECK(陈述并检查)构造均值区间所需的三条件:Random、10%、Normal/Large Sample。
- EXPLAIN(解释)t 分布与标准正态的差别,以及为什么 σ 未知时必须用 t 而不能用 z。
- DETERMINE(确定)C% 置信下的临界值 \(t^*\):用 Table B 或计算器
invT,并知道 df 不在表里时取更保守的较小 df。 - CONSTRUCT and INTERPRET(构造并解释)均值的单样本 t 区间 \(\bar x\pm t^*\dfrac{s}{\sqrt n}\),按四步法书写。
- DETERMINE(确定)达到指定误差范围所需的样本量:\(n=\left(\dfrac{z^* s}{ME}\right)^2\) 并向上取整。
- DISTINGUISH(区分)什么时候可以用 z(σ 已知)、什么时候必须用 t(σ 未知),以及大样本下两者为何几乎一致。
- STATE and CHECK the three conditions for a confidence interval about a mean: Random, 10%, Normal/Large Sample.
- EXPLAIN how t distributions differ from the standard Normal, and why t is required when σ is unknown.
- DETERMINE \(t^*\) for a C% interval from Table B or
invT, using a more conservative smaller df when the exact one is not tabulated. - CONSTRUCT and INTERPRET the one-sample t interval \(\bar x\pm t^*\dfrac{s}{\sqrt n}\) in the four-step frame.
- DETERMINE the sample size for a specified margin of error: \(n=\left(\dfrac{z^* s}{ME}\right)^2\), rounded up.
- DISTINGUISH when z is legitimate (σ known) from when t is mandatory (σ unknown), and see why they nearly coincide for large n.
核心概念Core Concepts
20.1 σ 未知:为什么不能再用 z20.1 When σ Is Unknown, z Is a Fiction
要估均值,公式本该是 \(\bar x\pm z^*\dfrac{\sigma}{\sqrt n}\)——可现实里 σ 从来不知道。用样本的 s 顶上去之后,\(\dfrac{\bar x-\mu}{s/\sqrt n}\) 不再服从正态,而是服从 t 分布:因为分母本身也在抖。
The formula should be \(\bar x\pm z^*\dfrac{\sigma}{\sqrt n}\) — but in practice σ is never known. Once s stands in for it, \(\dfrac{\bar x-\mu}{s/\sqrt n}\) is no longer Normal; it follows a t distribution, because the denominator now wobbles too.
想象两件事同时在随机:\(\bar x\) 会随样本变动,s 也会。样本很小时,s 是一个“平庸”的估计——它可能偏小,于是分母偏小,比值 \(t\) 就容易被放大成很极端的数。极端值变多,曲线两侧的尾巴就变厚。这正是 t 分布的来历,也是 1908 年 Guinness 啤酒厂的 William Gosset 用笔名 “Student” 发表它的原因(公司不许员工用真名发表论文)。
Two things vary at once: \(\bar x\) moves from sample to sample, and so does s. With a small sample, s is a mediocre estimate — it may come out too small, shrinking the denominator and inflating the ratio into extreme values. More extreme values mean fatter tails. That is the origin of the t distribution, published in 1908 by William Gosset of the Guinness brewery under the pen name "Student" (employees were not allowed to publish under their own names).
下面的三维模型把 t 密度曲面画出来(df = 3),阴影是区间 \([-2,2]\)。把它与第 6 讲的标准正态曲面对照看:同样一段区间,正态能盖住 95.4% 的面积,t 只盖住约 86%。少掉的那部分被搬到了两侧尾巴里——这正是“厚尾”的可视化含义。形状上它们仍是同一种“中间高、两边低”,只是 t 的肩更矮、尾巴更长。
The 3D model renders a t density surface with df = 3; the slab is the interval \([-2,2]\). Compare it with the standard Normal surface from Lecture 6: the same interval captures 95.4% of the area under Normal but only about 86% under t. The missing area has moved into the tails — that is what "heavy tails" means visually. The overall shape is still "tall centre, low ends"; t simply has lower shoulders and longer tails.
20.2 t 分布家族:单峰、对称、厚尾,df = n − 120.2 The t Family: Symmetric, Heavier-Tailed, df = n − 1
t 不是一条曲线,而是一族曲线:每个样本量对应一条,用自由度 df = n − 1 标号。df 越大,t 越接近正态;df 很小时尾巴厚得明显,所以临界值 \(t^*\) 必须比 \(z^*\) 大。
t is not one curve but a family: one curve per sample size, labelled by df = n − 1. The larger the df, the closer t comes to Normal; at small df the tails are visibly thick, so \(t^*\) must exceed \(z^*\).
| 性质Property | 标准正态 zStandard Normal z | t 分布t distribution |
|---|---|---|
| 形状Shape | 钟形、对称bell-shaped, symmetric | 钟形、对称,但中间略矮、两尾更厚bell-shaped and symmetric, but lower centre, fatter tails |
| 参数Parameter | 没有(固定一条)none — a single curve | 自由度 df = n − 1(一族)degrees of freedom df = n − 1 (a family) |
| 中心Centre | 0 | 0 |
| 95% 临界值95% critical value | 1.960 | df = 19 → 2.093;df = 4 → 2.776df = 19 → 2.093; df = 4 → 2.776 |
| 何时使用When used | σ 已知,或 n 很大时近似σ known, or as a large-n approximation | σ 未知,用 s 估均值σ unknown; a mean estimated with s |
20.3 找 t*:Table B 与 invT20.3 Finding t*: Table B and invT
查 \(t^*\) 需要两个坐标:自由度 df 与置信水平 C。表太短、df 不在表里时,取更小的 df(更保守,t* 更大,区间更宽);用计算器则没有这个问题。
Finding \(t^*\) needs two coordinates: df and C. When the table lacks your df, use the next smaller df (more conservative: bigger \(t^*\), wider interval). A calculator sidesteps this entirely.
| df | 上尾 0.05 → 90%tail .05 → 90% | 上尾 0.025 → 95%tail .025 → 95% | 上尾 0.005 → 99%tail .005 → 99% |
|---|---|---|---|
| 18 | 1.734 | 2.101 | 2.878 |
| 19 | 1.729 | 2.093 | 2.861 |
| 20 | 1.725 | 2.086 | 2.845 |
| 30 | 1.697 | 2.042 | 2.750 |
| 40 | 1.684 | 2.021 | 2.704 |
| 50 | 1.676 | 2.009 | 2.678 |
| z*(df = ∞) | 1.645 | 1.960 | 2.576 |
三个教材级的小练习,正好覆盖三种情况:(a) 95% 置信、n = 12 → df = 11 → \(t^*=2.201\);(b) 90% 置信、n = 48 → df = 47,表里没有 47,退到 df = 40 → \(t^*=1.684\);(c) 90% 置信、n = 5 → df = 4 → \(t^*=2.132\)。注意 (b) 的“退让”:我们不能假装样本更大去用 df = 50,只能往更保守的方向退。
Three textbook drills covering the three cases: (a) 95% with n = 12 → df = 11 → \(t^*=2.201\); (b) 90% with n = 48 → df = 47, not tabulated, so fall back to df = 40 → \(t^*=1.684\); (c) 90% with n = 5 → df = 4 → \(t^*=2.132\). Note the direction of the fallback in (b): you may not pretend the sample is larger and use df = 50; you move to the conservative side.
invT(0.975, 19) → 2.0930 invT(0.975, 11) → 2.2010
invT(0.95, 4) → 2.1318 invT(0.95, 47) → 1.6779(Table B 只能退到 df = 40 的 1.684)
20.4 三个条件:Random、10%、Normal/Large Sample20.4 Three Conditions: Random, 10%, Normal/Large Sample
均值区间的三条件里,第三条最需要动脑:总体正态,或者样本够大(n ≥ 30)。若 n < 30 且总体形状未知,就必须画图看样本——单峰、大致对称、无强离群值,才可以用 t。
Of the three conditions, the third needs thought: the population is Normal, or the sample is large (n ≥ 30). If n < 30 and the shape is unknown, you must plot the data — roughly unimodal, roughly symmetric, no strong outliers — before using t.
Random 随机Random
数据来自随机样本或随机化实验。它是“\(\bar x\) 以 μ 为中心”的唯一保证。
Data come from a random sample or a randomised experiment; it is the only guarantee that \(\bar x\) is centred at μ.
写法“Random: 题目说明随机抽取 40 台发动机。”
Write"Random: the stem states a random sample of 40 engines."
10% 独立10%
不放回时 \(n\le\frac{1}{10}N\)。均值区间里它常写作“至少有 \(10n\) 个个体”。
Without replacement, \(n\le\frac{1}{10}N\); in practice "at least \(10n\) individuals exist".
写法“10%: 需假设该型号发动机不少于 400 台。”
Write"10%: assume at least 400 engines of this type exist."
Normal / Large SampleNormal / Large Sample
总体正态 → 任意 n 都行;否则 n ≥ 30 靠中心极限定理。n < 30 要画直方图、点图或正态概率图;强偏斜或离群值 → 不能用 t 程序。
Normal population → any n works; otherwise n ≥ 30 via the CLT. For n < 30, plot the data (histogram, dotplot or Normal probability plot); strong skew or outliers → do not use t procedures.
写法“n = 40 > 30,大样本条件满足。”
Write"n = 40 > 30, so the large-sample condition is met."
下面这张图就是“n < 30 时该做的事”。某厂 20 块屏幕的张力(mV)读数:直方图大致单峰、对称,最右边一个 374.6 偏高但只有一个,没有强偏斜、没有成群的离群值,所以虽然 n = 20 < 30,仍然有理由相信总体近似正态,可以用 t。若图上出现长尾拖着几个孤立的高值,正确做法是换方法或说明局限,而不是把点删掉。
The figure shows what "n < 30" demands. Tension readings (mV) from 20 screens: the histogram is roughly unimodal and symmetric; one reading of 374.6 sits high but alone. With no strong skew and no cluster of outliers, Normality is credible even at n = 20, so t is allowed. If the plot showed a long tail with several isolated highs, the right move is another method or an honest caveat — never deleting the points.
① 用 \(z^*\) 代替 \(t^*\)。σ 未知时写 1.96(甚至写 \(z^*\))是概念错误,小样本尤其明显。公式里的符号也必须配套:\(\bar x\)、\(s\)、\(t^*\)、\(n-1\),不能出现 σ。② 把“n ≥ 30”当免死金牌。若题目给出一个明显偏斜的图或若干离群值,即使 n = 35 也不能理直气壮用 t;反之,若总体已声明正态,n = 8 也完全可以。③ 删掉离群值让图变好看。离群值要报告、要讨论,不能悄悄删除;AP 的评分标准会专门看这一点。
(1) Substituting \(z^*\) for \(t^*\). Writing 1.96 when σ is unknown (or writing \(z^*\) at all) is a conceptual error, glaring at small n. The notation must match: \(\bar x\), \(s\), \(t^*\), \(n-1\) — never σ. (2) Treating "n ≥ 30" as a free pass. A clearly skewed plot or several outliers rules out t even at n = 35; conversely, a stated Normal population licenses t at n = 8. (3) Deleting outliers to beautify the plot. Outliers must be reported and discussed; AP's rubric watches for exactly this.
20.5 均值的单样本 t 区间20.5 The One-Sample t Interval for a Mean
把临界值换成 \(t^*\)、把 σ 换成 s,区间就是 \(\bar x\pm t^*\dfrac{s}{\sqrt n}\),df = n − 1。整条逻辑与第 19 讲的比例区间完全同构——只是“一个标准差有多长”改由 s 来估计。
Swap \(z^*\) for \(t^*\) and σ for s and the interval is \(\bar x\pm t^*\dfrac{s}{\sqrt n}\) with df = n − 1. The logic is isomorphic to the proportion interval of Lecture 19; only "how long is one standard deviation" is now estimated by s.
拿到一道题,先读三件事:数据是原始的还是一组汇总(\(\bar x,\ s,\ n\))、置信水平 C、样本量 n。前两件填进公式的字面量,第三件决定“Normal/Large Sample”这一关怎么过——n ≥ 30 直接放行,n < 30 就得画图。题目只给汇总数字时直接代入;给的是原始数据时,先用计算器求 \(\bar x\) 与 s,顺手画个直方图或点图备用。
Faced with a problem, read three things first: raw data or summary statistics (\(\bar x\), s, n), the confidence level, and the sample size. The first two fill in the numbers; the third decides how the “Normal/Large Sample” gate is cleared — n ≥ 30 passes automatically, n < 30 needs a plot. With summary statistics, substitute directly; with raw data, compute \(\bar x\) and s on the calculator and sketch a histogram or dotplot as evidence.
20.6 样本量规划:精度要花钱买20.6 Planning a Sample Size: Precision Costs Money
想要误差范围不超过 ME,就把误差范围公式反解出 n:\(n=\left(\dfrac{z^* s}{ME}\right)^2\)。σ 未知时用试点研究的 s 代替,结果一律向上取整。
To guarantee a margin no larger than ME, invert the margin formula: \(n=\left(\dfrac{z^* s}{ME}\right)^2\). With σ unknown, use s from a pilot study, and always round up.
例题精讲Worked Examples
三题覆盖了本讲的三种情形:大样本(n > 30)、小样本(要看图)、以及样本量规划。每题都按 State / Plan / Do / Conclude 写全,这正是 AP 的评分骨架。 These three cover the lecture's three regimes: a large sample (n > 30), a small sample (needs a plot), and sample-size planning. Each is written in full State / Plan / Do / Conclude form — the AP scoring skeleton.
TInterval → (1.16095, 1.37405) x̄ = 1.2675 Sx = 0.3332 n = 40 df = 39
随堂练习Check Your Understanding
先自己选,再点“查看解答”。每题都给出考点、逐步推理与错误选项诊断。 Choose first, then reveal. Each item comes with the tested idea, step-by-step reasoning and a diagnosis of every wrong option.
某研究者从近似正态的总体中随机抽取 12 个观测,总体的 σ 未知,想估计均值。最合适的方法是
A researcher draws 12 observations from an approximately Normal population; σ is unknown and the mean is to be estimated. The most appropriate procedure is
- a用 \(z^*=1.96\) 的单样本 z 区间a one-sample z interval using \(z^*=1.96\)
- bdf = 12 的单样本 t 区间a one-sample t interval with df = 12
- cdf = 11 的单样本 t 区间a one-sample t interval with df = 11
- d样本太小,任何区间都不能构造the sample is too small for any interval
- 先看 σ 是否已知Is σ known? 题目明确说 σ 未知,所以必须用 s 估,统计量进入 t 家族。The stem says σ is unknown, so s must be used and the statistic joins the t family. a 直接排除——写 1.96 是概念错误。(a) is out: using 1.96 is a conceptual error.
- 再算 dfThen df df = n − 1 = 12 − 1 = 11。写成 12 是最常见的粗心错。df = n − 1 = 11. Writing 12 is the classic slip. \[ \text{df}=12-1=11,\qquad t^*=2.201\ (95\%) \] b 的 df 错了;c 正确。(b) has the wrong df; (c) is correct.
- 小样本能算吗Can a small sample be used? 可以,只要总体近似正态(题目已给)。若总体形状未知且 n < 30,则要画图检查。Yes, provided the population is approximately Normal, which the stem states. If shape were unknown and n < 30, a plot would be required. d 错误:n = 12 完全可以用 t,只要条件站得住。(d) is wrong: n = 12 is fine for t as long as conditions hold.
| 选项Option | 判断与理由Verdict & reason |
|---|---|
| a | 错。σ 未知却用 z,且小样本时误差不可忽略。Wrong: uses z with unknown σ; the error is not negligible at n = 12. |
| b | 错。df 应为 n − 1 = 11。Wrong: df must be n − 1 = 11. |
| c | 对。σ 未知 + 总体近似正态 → df = 11 的 t 区间。Correct: unknown σ with an approximately Normal population → t with df = 11. |
| d | 错。t 程序正是为小样本设计的(Gosset 的初衷)。Wrong: t procedures were invented for exactly this situation. |
下列关于 t 分布的说法,哪一项正确?
Which statement about t distributions is correct?
- at 分布的均值随 df 改变the mean of a t distribution changes with df
- bdf 越大,t 曲线的尾部越厚larger df means heavier tails
- ct 曲线与正态一样对称,中心为 0,但中间更矮、两尾更厚t is symmetric about 0 like Normal, but with a lower centre and thicker tails
- dt 分布只适用于 n > 30 的样本t applies only to samples with n > 30
- 中心与对称性Centre and symmetry 所有 t 分布都以 0 为中心且对称,均值恒为 0(df > 1 时),不随 df 移动。All t distributions are centred at 0 and symmetric with mean 0 (for df > 1); it never shifts. a 错——中心不随 df 变化。(a) fails: the centre never moves.
- df 与尾部df and tails df 增大时 s 越来越接近 σ,t 就越来越像正态,尾部变薄而不是变厚。As df grows, s closes in on σ, so t approaches Normal and the tails get thinner. \[ t^*_{95}:\ \text{df}=3\to3.182,\quad \text{df}=30\to2.042,\quad \text{df}=\infty\to1.960 \] b 错、c 对、d 错(t 与样本大小无关,只与 σ 是否已知有关)。(b) fails, (c) holds, (d) fails — t depends on σ being unknown, not on n.
| 选项Option | 判断与理由Verdict & reason |
|---|---|
| a | 错。中心恒为 0。Wrong: the centre is always 0. |
| b | 错。方向反了:df 越大尾部越薄。Wrong: reversed — larger df gives thinner tails. |
| c | 对。这正是 t 与正态的唯一形状差别。Correct: exactly the shape difference. |
| d | 错。小样本正是 t 的主场。Wrong: small samples are precisely t's home turf. |
某 SRS 共 15 个观测,\(\bar x=48.6\),\(s=5.2\),总体近似正态。其 95% 置信区间最接近
An SRS of 15 observations has \(\bar x=48.6\) and \(s=5.2\); the population is approximately Normal. The 95% confidence interval is closest to
- a(45.97, 51.23)(45.97, 51.23)
- b(45.72, 51.48)(45.72, 51.48)
- c(46.17, 51.03)(46.17, 51.03)
- d(45.32, 51.88)(45.32, 51.88)
- 定 df 与 t*df and t* df = 15 − 1 = 14;Table B 的 df = 14 行、95% 列给 2.145。df = 14; the df = 14 row under 95% in Table B gives 2.145. \[ \text{df}=14,\qquad t^*=2.145 \] 若误用 z* = 1.96,区间会明显偏窄(选项 a)。Using \(z^*=1.96\) would give a visibly narrower interval — option (a).
- 算标准误与误差范围SE and margin \(\sqrt{15}=3.873\)。\(\sqrt{15}=3.873\). \[ SE=\frac{5.2}{3.873}=1.3426,\qquad ME=2.145(1.3426)=2.8799 \]
- 合成区间Assemble 两端为 \(48.6\mp2.8799\)。The ends are \(48.6\mp2.8799\). \[ (48.6-2.880,\ 48.6+2.880)=(45.72,\ 51.48) \] 区间宽约 5.76,明显宽于用 z 的结果 5.26。Width ≈ 5.76, clearly wider than the 5.26 obtained with z.
| 选项Option | 判断与理由Verdict & reason |
|---|---|
| a | 错。这是用 z* = 1.96 的结果——σ 未知时不该用 z。Wrong: this used \(z^*=1.96\); z is illegal here. |
| b | 对。\(48.6\pm2.880\)。Correct: \(48.6\pm2.880\). |
| c | 错。这是用了 df 更大的 t*(如 2.0 左右),把 df 算错了。Wrong: uses a smaller \(t^*\) from a wrong, larger df. |
| d | 错。这是用了 99% 的 \(t^*=2.977\)。Wrong: this is the 99% value \(t^*=2.977\). |
某 SRS 的样本量 n = 12,样本直方图显示:右侧拖出一条很长的尾巴,另有两个远离主体的高值。研究者想构造均值的 95% 置信区间。最恰当的做法是
An SRS of size 12 yields a histogram with a long right tail and two isolated high values. The researcher wants a 95% interval for the mean. The most appropriate action is
- a直接用 t 区间,因为 n ≥ 10 就足够use the t interval, since n ≥ 10 suffices
- b改用 z 区间,z 更稳健switch to the z interval, which is more robust
- c删掉那两个高值,使图形近似正态后再用 tdelete the two high values, then use t
- d不宜使用 t 程序:应报告强偏斜与离群值,考虑其他方法或数据变换do not use t procedures; report the skew and outliers and consider other methods or a transformation
- 第三关没过The third gate fails n = 12 < 30,所以不能靠大样本定理;而图上有长尾与孤立高值,正是教材明说“不要用 t 程序”的情形。n = 12 < 30, so the CLT does not apply, and the long tail with isolated highs is exactly the case where textbooks say "do not use t". a 错:n ≥ 10 是比例的大计数条件,不是均值的正态条件。(a) fails: n ≥ 10 is a counts condition for proportions, not a Normality condition for means.
- 换成 z 会更糟z would be worse z 依赖正态性,而且 σ 未知;偏斜分布下 z 区间的实际覆盖率偏离 95% 更严重。z also assumes Normality, still needs σ, and its actual coverage strays further from 95% under skew. b 错。(b) fails.
- 离群值不能删Outliers are not deletable 删点会人为制造“正态”,掩盖真实变异,还会使标准误偏小、区间偏窄。正确做法是保留并讨论,或改用对偏斜稳健的方法(如变换后分析、或用中位数的区间)。Deleting points manufactures Normality, hides real variability and shrinks the SE. Report them, discuss them, or use a method robust to skew (a transformation, or an interval for the median). c 错,d 正确。(c) fails; (d) is correct.
| 选项Option | 判断与理由Verdict & reason |
|---|---|
| a | 错。混淆了“大计数”与“正态/大样本”两个条件。Wrong: confuses Large Counts with Normal/Large Sample. |
| b | 错。z 同样要求正态,且 σ 未知。Wrong: z also needs Normality and still needs σ. |
| c | 错。擅自删除数据是统计伦理与评分双重问题。Wrong: deleting data is both an ethics and a scoring problem. |
| d | 对。条件不满足时应改方法,而不是改数据。Correct: change the method, not the data. |
要用 Table B 构造 90% 置信区间,样本量 n = 48。应采用的临界值是
A 90% confidence interval is to be built from Table B with n = 48. The critical value to use is
- a1.645(用 z*,因为 n 已接近 50)1.645 (use \(z^*\), since n is nearly 50)
- b1.676(df = 50)1.676 (df = 50)
- c1.684(退到 df = 40)1.684 (fall back to df = 40)
- d2.021(df = 40 的 95% 值)2.021 (the 95% entry at df = 40)
- 算 df、定方向df and direction df = 48 − 1 = 47。表里没有 47,最近的两行是 40 与 50。df 越小 \(t^*\) 越大、区间越宽,属于“保守”方向;df 越大则相反。df = 47; the table offers 40 and 50. Smaller df gives a larger \(t^*\) and a wider, conservative interval; larger df does the opposite. 90% 这一列:df = 40 → 1.684,df = 50 → 1.676。取较大者 1.684。In the 90% column: df = 40 → 1.684 and df = 50 → 1.676. Take the larger, 1.684.
- 计算器可以更准A calculator is exact
用计算器不受表格限制:
invT(0.95, 47)=1.6779,与 1.684 相差约 0.006,对区间影响很小。A calculator is not limited by the table:invT(0.95, 47)=1.6779, about 0.006 from 1.684 — a negligible effect on the interval. \[ \text{invT}(0.95,47)=1.6779\quad\text{vs}\quad t^*_{40}=1.684 \] 考试中若只给表格,写 1.684 并注明“退到 df = 40”;若可用计算器,写 1.678 也行。With a table only, write 1.684 and state "fell back to df = 40"; with a calculator, 1.678 is also acceptable.
| 选项Option | 判断与理由Verdict & reason |
|---|---|
| a | 错。σ 未知时必须用 t*,n = 48 也不足以“合法”换成 z。Wrong: σ unknown means \(t^*\), and n = 48 does not legalise z. |
| b | 错。df = 50 比实际自由度大,方向反了(不保守)。Wrong: df = 50 exceeds the true df — the wrong, non-conservative direction. |
| c | 对。退到 df = 40,取 1.684。Correct: fall back to df = 40, giving 1.684. |
| d | 错。2.021 是 95% 的值,置信水平看错了行。Wrong: 2.021 is the 95% entry — wrong column. |
本讲小结Summary
- σ 未知时用 s 代替,标准化后的统计量 \(t=\dfrac{\bar x-\mu}{s/\sqrt n}\) 服从 df = n − 1 的 t 分布。
- t 与正态同样单峰对称(中心 0),但中间更矮、两尾更厚;df 越大越接近正态。
- 均值区间:\(\bar x\pm t^*\dfrac{s}{\sqrt n}\);\(t^*\) 用 Table B(df 不在表里向更小的 df 退)或
invT((1+C)/2, df)。 - 三条件:Random、10%、Normal/Large Sample;n ≥ 30 可依赖 CLT,n < 30 必须看图,强偏斜或离群值则不用 t。
- t 与 z 的差别只在“σ 是否已知”;σ 未知时用 z 是概念错误,小样本时后果尤其明显。
- 样本量规划:\(n=\left(\dfrac{z^* s}{ME}\right)^2\),向上取整;配对数据对“差值”做单样本 t 分析。
- With σ unknown, s stands in, and \(t=\dfrac{\bar x-\mu}{s/\sqrt n}\) follows a t distribution with df = n − 1.
- t is unimodal and symmetric about 0 like Normal, but with a lower centre and heavier tails; it approaches Normal as df grows.
- Interval: \(\bar x\pm t^*\dfrac{s}{\sqrt n}\), with \(t^*\) from Table B (fall back to a smaller df) or
invT((1+C)/2, df). - Conditions: Random, 10%, Normal/Large Sample; n ≥ 30 may lean on the CLT, n < 30 needs a plot, and strong skew or outliers forbid t.
- The only difference between t and z is whether σ is known; using z with unknown σ is a conceptual error, worst at small n.
- Sample size: \(n=\left(\dfrac{z^* s}{ME}\right)^2\), rounded up; paired data means a one-sample t analysis of the differences.
显著性检验:从“证据”到“结论”Significance Tests: From Evidence to a Decision
前面两讲我们用置信区间回答“这个参数大概是多少”。这一讲换一个问题:手头的数据,能不能推翻某个具体的主张?为此要建立一套固定的语言——H0 与 Ha、P 值、显著性水平 α、拒绝还是不拒绝;还要分清“误报”与“漏报”两种错误,以及它们背后的 power。这套语言是第 22–24 讲(t 检验、卡方、回归)全部推理的地基。
The previous lectures used confidence intervals to answer "roughly how large is this parameter?" This lecture asks a different question: do these data give convincing evidence against a specific claim? Answering it needs a fixed vocabulary — H0 and Ha, the P-value, the significance level α, reject or fail to reject — plus the two ways a test can be wrong (false alarm and missed detection) and the power that ties them together. Lectures 22–24 (t tests, chi-square, regression) all rest on this language.
本讲学习目标Learning Objectives
- 为总体参数写出 H0 与 Ha,并正确选择 >、<、≠ 三种方向;说明假设永远是关于参数而不是统计量的。
- 准确解释 P 值:“在 H0 为真的前提下,得到与观测一样极端或更极端结果的概率”,并说清它不是“H0 为真的概率”。
- 在给定 α 下判断结果是否统计显著当 P 值小于事先选定的显著性水平 α 时,我们说数据在 α 水平上统计显著,此时拒绝 H0。When the P-value is smaller than the chosen significance level α, the data are statistically significant at level α, and we reject H0.,并用规范措辞写出 reject / fail to reject 的结论。
- 手工与用计算器完成单比例 z 检验(1-PropZTest),在标准误里正确使用 p0 而不是 \(\hat p\)。
- 在具体情境中解释 Type I 与 Type II 错误并各给一个后果;说清 α 就是 P(Type I),power = 1 − β。
- 说明显著性水平、效应大小、总体分散程度与样本量如何影响 power,并解释双侧检验与 100(1 − α)% 置信区间的一致性。
- 完成两个总体比例之差的 z 检验(2-PropZTest),理解合并比例 \(\hat p_c\) 的作用与适用条件。
- STATE H0 and Ha for a population parameter, choosing correctly among >, < and ≠; explain that hypotheses are always about a parameter, never a statistic.
- INTERPRET a P-value correctly — "the probability, assuming H0 is true, of getting a result at least as extreme as the one observed" — and explain that it is not the probability that H0 is true.
- DETERMINE whether results are statistically significantWhen P-value < α, the data are statistically significant at level α and we reject H0.当 P 值小于事先选定的显著性水平 α 时,数据在 α 水平上统计显著,此时拒绝 H0。 at a given α, and write a conclusion using reject / fail to reject.
- CARRY OUT a one-sample z test for a proportion by hand and with 1-PropZTest, using p0 — not \(\hat p\) — in the standard error.
- INTERPRET Type I and Type II errors in context, give a consequence of each, and state that α = P(Type I) while power = 1 − β.
- DESCRIBE how the significance level, the size of the effect, the population spread and the sample size each affect power, and explain the link between a two-sided test and a 100(1 − α)% confidence interval.
- PERFORM a two-sample z test for the difference of two proportions (2-PropZTest), including the role of the pooled proportion \(\hat p_c\).
核心概念Core Concepts
2.1 假设检验在做什么:一场“反证”2.1 What a Significance Test Does: Proof by Contradiction
显著性检验从不证明 H0 是对的,它只问:如果 H0 是真的,我们看到的这份数据有多罕见?越罕见,反对 H0 的证据越强。
A significance test never proves H0. It asks one question: if H0 were true, how unusual would data like ours be? The rarer the data, the stronger the evidence against H0.
这套逻辑和法庭几乎一样。法庭先假定被告无罪(这就是 H0),然后检察官摆出证据;只有当证据在无罪假设下几乎不可能出现时,法庭才判有罪(拒绝 H0)。但“证据不足、无罪释放”不等于“已经证明他无罪”——这正是后面“永远不说 accept H0”的根源。
The logic is that of a courtroom. The court presumes the defendant innocent (that is H0); the prosecutor presents evidence; only if the evidence would be very unlikely under innocence does the court convict (reject H0). "Not enough evidence, acquitted" does not mean "proved innocent" — which is exactly why we never say "accept H0".
H0:被检验的那一个H0: the claim on trial
通常写“没有差异”“没有变化”“等于历史值”。检验的设计目的就是找证据反对它。形式永远是 \(H_0:\text{参数}=\) 某个值。
Usually "no difference", "no change", or "equal to the historical value". The test is built to gather evidence against it. Always written \(H_0:\text{parameter}=\) value.
Ha:我们想证明的那一个Ha: the claim we hope to support
研究者的主张,只能在拒绝 H0 时才被支持。方向由题目决定:变大、变小、还是“与原来不同”。
The researcher's claim; it is supported only when we reject H0. Its direction comes from the wording: larger, smaller, or simply "different".
| 题目的线索Wording in the problem | Ha 的形式Form of Ha | P 值在哪里Where the P-value sits | 例子(p = 不合格率)Example (p = defect rate) |
|---|---|---|---|
| “超过”“更高”“大于” | \(p>p_0\) | 右尾单侧right tail, one-sided | \(H_a:p>0.08\) |
| “低于”“更少”“小于” | \(p<p_0\) | 左尾单侧left tail, one-sided | \(H_a:p<0.80\) |
| “不同”“是否改变”“有差异” | \(p\neq p_0\) | 两尾各一半,P 值加倍both tails, P-value doubled | \(H_a:p\neq 0.50\) |
假设里只能出现总体参数(\(p,\ \mu,\ \beta\)),不能写 \(\hat p\) 或 \(\bar x\)。写 \(H_0:\hat p=0.8\) 是严重错误——\(\hat p\) 是样本算出来的,它本来就会波动,谈不上“假设它等于某个值”。另外,\(H_0\) 里永远用等号,把 \(\le\) 或 \(\ge\) 写进 \(H_0\) 在 AP 评分里会被扣分。
Hypotheses contain population parameters only (\(p,\ \mu,\ \beta\)) — never \(\hat p\) or \(\bar x\). Writing \(H_0:\hat p=0.8\) is a serious error: \(\hat p\) is computed from the sample and fluctuates by design. Also, \(H_0\) always uses an equals sign; putting \(\le\) or \(\ge\) into \(H_0\) loses points on the AP rubric.
2.2 检验统计量与 P 值:把“罕见”变成一个概率2.2 Test Statistic and P-value: Turning "Rare" into a Number
P 值 = 假设 H0 为真时,得到与观测结果一样极端或更极端结果的概率。它衡量的是数据与 H0 的“不兼容程度”,越小越不支持 H0。
The P-value is the probability, computed assuming H0 is true, of getting a result at least as extreme as the one observed. It measures how incompatible the data are with H0: smaller means less compatible.
要让“罕见”可比,必须先把统计量标准化:用观测值减去 H0 声称的参数值,再除以“在 H0 下的标准差”。这一步和第六讲的 z 分数完全一样,只是中心从 \(\mu\) 换成了 \(p_0\)。
To make "rare" comparable we standardise: subtract the parameter value claimed by H0 from the observed statistic, then divide by the standard deviation under H0. This is the same z-score move as Lecture 6, only centred at \(p_0\) instead of \(\mu\).
用第 21 讲反复出现的罚球例子:某球员自称长期命中率 80%,我们让他投 50 次、命中 32 次。如果 H0 为真,\(\hat p\) 的抽样分布中心是 0.80、标准差是 \(\sqrt{0.8\cdot0.2/50}=0.0566\);观测到的 0.64 落在中心左侧约 2.83 个标准差处。
Use the free-throw example that runs through Lecture 21: a player claims an 80% long-run rate; he makes 32 of 50. If H0 is true, \(\hat p\) is centred at 0.80 with SD \(\sqrt{0.8\cdot0.2/50}=0.0566\); the observed 0.64 sits about 2.83 standard deviations below centre.
如果 \(H_a\) 是“不同”(\(p\neq p_0\)),那么“一样极端”要算两端:观测到 0.64 离 0.80 有 2.83 个标准差,那么 0.96 也离得同样远,同样算“更极端”。所以双侧 P 值 = 单尾面积 × 2。
If \(H_a\) is "different" (\(p\neq p_0\)), "at least as extreme" means both directions: 0.64 is 2.83 SDs below 0.80, but 0.96 is just as far above, so it counts too. Hence a two-sided P-value is the one-tail area doubled.
是:\(P(\text{数据这么极端}\mid H_0\text{ 为真})\)。不是:\(P(H_0\text{ 为真}\mid \text{数据})\)。这两句话看着像一回事,其实天差地别:前者只需要 H0 这一个假设,算得出来;后者要求我们知道“H0 为真的先验概率”,那是另一门学问。AP 每年都用这个混淆来设干扰项。
It is: \(P(\text{data this extreme}\mid H_0\text{ true})\). It is not: \(P(H_0\text{ true}\mid \text{data})\). The two sentences look alike but are worlds apart: the first needs only H0 and is computable; the second would need a prior probability for H0. AP uses exactly this confusion as a distractor.
① P 值小 ≠ H0 一定假,只是“在 H0 下很罕见”;② P 值大 ≠ H0 真,可能只是样本太小、没测出来;③ P 值小 ≠ 效应大,样本量一大,微不足道的差异也能有很小的 P 值。
① A small P-value does not mean H0 is false — only that the data are rare under H0. ② A large P-value does not mean H0 is true — the sample may simply be too small. ③ A small P-value does not mean a large effect — with a big enough sample, a trivial difference gives a tiny P-value.
2.3 显著性水平与结论的写法:只有两句话2.3 The Significance Level and the Only Two Conclusions
结论只有两种:reject H0(有充分证据支持 Ha)或 fail to reject H0(证据不足)。永远不说 accept H0。
There are exactly two conclusions: reject H0 (convincing evidence for Ha) or fail to reject H0 (not enough evidence). Never "accept H0".
为什么不能“接受”?因为“证据不足”可能来自“H0 本来就对”,也可能来自“我们抽的样本太小、根本没能力发现差异”。把这两种情况混为一谈,就等于把“无罪释放”读成“清白证明”。
Why not "accept"? Because "not enough evidence" can mean either "H0 really is right" or "our sample was too small to detect the difference". Merging those two is exactly reading "acquitted" as "proven innocent".
| 比较Comparison | 决定Decision | 规范写法(英文模板)Standard wording (English) |
|---|---|---|
| \(P\text{-value}<\alpha\) | 拒绝 H0Reject H0 | Because \(P=\ldots<\alpha=0.05\), we reject \(H_0\). There is convincing evidence that [Ha in context]. |
| \(P\text{-value}\ge\alpha\) | 不拒绝 H0Fail to reject H0 | Because \(P=\ldots\ge\alpha=0.05\), we fail to reject \(H_0\). There is not convincing evidence that [Ha in context]. |
α 是事先定好的“我说服自己所需的证据门槛”,通常取 0.05,也可取 0.01(更严格)或 0.10(更宽松)。它必须在 STATE 那一步就写出来——先定门槛,再看数据,否则就成了“事后挑一个刚好能拒绝的 α”。
α is the pre-chosen threshold of evidence, usually 0.05, sometimes 0.01 (stricter) or 0.10 (more lenient). It must be stated in the STATE step — set the bar before looking at the data — otherwise you are just picking the α that happens to reject.
一项减肥研究说“平均减重 0.2 kg,P = 0.001,显著!”——显著是真的,但 0.2 kg 在现实里毫无意义。样本量越大,越容易“显著”。评估一项研究时,必须同时看效应大小、置信区间、研究设计,而不是只盯着 P 值是否小于 0.05。
A diet study reports "average loss 0.2 kg, P = 0.001 — significant!" The significance is real; the 0.2 kg is not meaningful. Bigger samples make significance easier. When judging a study, read the effect size, the interval, and the design — not just whether P crossed 0.05.
还有一个隐性成本:多重比较。如果分别对红、蓝、绿……六种颜色做六次 α = 0.05 的 z 检验,那么“至少有一次误报”的概率约为 \(1-0.95^6\approx 26\%\)——即使公司说的全是真的,你也大概有四分之一的机会“查出问题”。这就是为什么第 23 讲的卡方检验要一次性比较所有类别,而不是逐个比较。
There is a hidden cost: multiple comparisons. Run six separate z tests at α = 0.05, one per colour, and the chance of at least one false alarm is about \(1-0.95^6\approx 26\%\) — even if the company's claim is entirely true. That is precisely why Lecture 23's chi-square test compares all categories at once instead of one at a time.
2.4 两种错误与 power:误报、漏报与“抓得住”2.4 Two Errors and Power: False Alarm, Miss, and Detection
拒绝 H0 可能误报(Type I,概率就是 α);不拒绝 H0 可能漏报(Type II,概率 β)。而 power = 1 − β,衡量这个检验“抓得住真差异”的能力。
Rejecting H0 can be a false alarm (Type I, probability α); failing to reject can be a miss (Type II, probability β). And power = 1 − β measures the test's ability to detect a real effect.
| H0 实际为真H0 actually true | H0 实际为假(Ha 真)H0 actually false (Ha true) | |
|---|---|---|
| 拒绝 H0Reject H0 | Type I error(误报,P = α)(false alarm, P = α) | 正确结论(power = 1 − β)Correct decision (power = 1 − β) |
| 不拒绝 H0Fail to reject H0 | 正确结论Correct decision | Type II error(漏报,P = β)(missed detection, P = β) |
在土豆例子(\(H_0:p=0.08\)、\(H_a:p>0.08\)、α = 0.05、n = 500)里,检验的判定门槛是 \(\hat p = 0.0999\):只要样本比例超过它,我们就拒收这车土豆。但“H0 真”时也有 5% 的样本会越过这条线——这就是 α;而若真实不合格率是 0.11,仍有约 24% 的样本落在 0.0999 左边、让我们误收这车货——这就是 β,于是 power ≈ 0.76。
In the potato example (\(H_0:p=0.08\), \(H_a:p>0.08\), α = 0.05, n = 500) the decision cut-off is \(\hat p = 0.0999\): above it we reject the truck. Yet 5% of samples do cross that line when H0 is true — that is α. And if the true rate were 0.11, about 24% of samples would still land left of 0.0999 and let the bad truck through — that is β, giving power ≈ 0.76.
power 有四个“旋钮”,AP 只考方向、不考具体数值:
Power has four knobs; AP asks only about directions, never exact values:
| 旋钮Knob | 怎么变Change | power 怎么变Effect on power | 代价 / 原因Cost / reason |
|---|---|---|---|
| 真实参数离 H0 的远近How far the truth is from H0 | 差异更大larger effect | ↑ | 两条分布分得更开,尾巴更容易越过门槛the two curves separate, so the tail clears the cut-off |
| 显著性水平 αSignificance level α | α 更大(0.01→0.05)larger α | ↑ | 但 Type I 概率也变大——门槛降低的代价but P(Type I) rises too — that is the price |
| 总体分散程度 σPopulation spread σ | σ 更小smaller σ | ↑ | 分布更瘦,同样的差异更突出narrower curves make the same gap stand out |
| 样本量 nSample size n | n 更大larger n | ↑ | 标准误变小 → 分布变瘦;α 不变也能提高 powersmaller standard error → narrower curves; power rises with α fixed |
α 从 0.05 降到 0.01,误报少了,但门槛变高、β 变大、power 下降——真有问题的货更容易被放过。选择 α 不是选“最安全”,而是根据两种错误哪一种后果更严重来权衡:把无罪的人判刑很糟,就把 α 调小;漏掉严重的质量问题很糟,就别把 α 设得太苛刻。
Lowering α from 0.05 to 0.01 cuts false alarms, but raises the bar, increases β and reduces power — real problems pass more often. Choosing α is not choosing "safest"; it weighs which error costs more. Convicting the innocent is terrible → smaller α; missing a serious quality defect is terrible → do not set α too harshly.
2.5 两个总体比例之差:合并比例登场2.5 Two Proportions: the Pooled Estimate Enters
比较两组比例时,\(H_0\) 说 \(p_1=p_2\)(即 \(p_1-p_2=0\))。在 H0 下两组共享同一个 p,所以标准误里的 p 要用两组合并的最佳估计 \(\hat p_c\)。
Comparing two proportions, \(H_0\) says \(p_1=p_2\) (that is, \(p_1-p_2=0\)). Under H0 both groups share one p, so the standard error uses the best combined estimate, \(\hat p_c\).
条件与单比例类似,但每一条都要查两遍:两个样本各自随机(或随机分配)、各自“成功数与失败数都至少 10”、各自满足 10% 条件,并且两组之间相互独立(不同的人、不同的处理)。
Conditions mirror the one-sample case but must be checked twice: each sample random (or randomly assigned), each with at least 10 successes and 10 failures, each meeting the 10% condition, and the two groups independent of each other.
z = −2.8284 p = 0.00234 p̂ = 0.64 n = 50
例题精讲Worked Examples
例 1 单侧检验全流程:这车土豆该不该退?Example 1 A one-sided test end to end: reject the truck or not?
例 2 双侧检验与置信区间:Taeyeon 的调查Example 2 A two-sided test with its interval: Taeyeon's survey
z = 2.4495 p = 0.01430 p̂ = 0.6 n = 150
例 3 两个比例:新药真的比安慰剂好吗?Example 3 Two proportions: is the new drug better than placebo?
随堂练习Check Your Understanding
先自己写答案,再点开解答。每题的干扰项都是真实考场上的高频错误,值得逐个读理由。 Answer first, then reveal. Each distractor is a real, frequently seen exam error — read the diagnoses.
某球员自称长期罚球命中率 80%。他投 50 次中 32 次,检验得 \(z=-2.83\)、\(P=0.0023\)。下列对 P 值的解释哪一句正确?
A player claims an 80% long-run free-throw rate. He makes 32 of 50. The test gives \(z=-2.83\), \(P=0.0023\). Which interpretation of the P-value is correct?
- a该球员真实命中率等于 0.80 的概率只有 0.0023the probability that his true rate equals 0.80 is only 0.0023
- b若他的真实命中率是 0.80,那么投 50 次只中 32 次或更少的概率约为 0.0023if his true rate is 0.80, the probability of making 32 or fewer of 50 is about 0.0023
- c该球员命中率低于 0.80 的概率是 0.0023the probability that his rate is below 0.80 is 0.0023
- d如果我们重做实验,有 0.23% 的机会得到 0.64 这个样本比例if we repeated the study, there is a 0.23% chance of getting a sample proportion of 0.64
- 先找“假设”和“方向”Locate the assumption and the direction 本题 \(H_a:p<0.80\),是单侧;极端方向是“命中更少”。所以 P 值 = \(P(\hat p\le0.64\mid p=0.80)\)。Here \(H_a:p<0.80\), one-sided; the extreme direction is "fewer makes". So P-value \(=P(\hat p\le0.64\mid p=0.80)\). 必须写明“若 p = 0.80”。The phrase "if p = 0.80" is compulsory.
- 排除把条件反过来的选项Reject the reversed conditional a、c 都在问“参数的概率”,但参数是固定的未知常数,没有概率可言;这正是“P 值 = H0 为真的概率”这一经典误解。Options a and c ask for probabilities of the parameter, but a parameter is a fixed unknown constant — it has no probability. That is precisely the classic "P-value = P(H0 true)" error. a、c 出局。a and c are out.
- d 少了“至少这么极端”d misses "at least this extreme" 0.0023 是“32 次或更少”的累积概率,不是“刚好 0.64”的概率(后者接近于 0)。0.0023 is the chance of 32 or fewer, not exactly 0.64 (which is essentially 0). d 出局,b 正确。d is out; b is correct.
| 选项Option | 判断与理由Verdict & reason |
|---|---|
| a | 错。把 P 值读成“H0 为真的概率”,条件方向反了;参数也没有概率分布。Wrong: reads P as P(H0 true); the conditioning is reversed and parameters have no distribution. |
| b | 对。完整保留了“若 H0 为真”与“或更少(更极端)”。Correct: keeps both "if H0 is true" and "or fewer (more extreme)". |
| c | 错。这正是被检验的 Ha 本身,不是 P 值。Wrong: that is \(H_a\) itself, not a P-value. |
| d | 错。漏掉“或更极端”,把累积概率当成单点概率。Wrong: drops "or more extreme" and treats a cumulative probability as a point probability. |
某品牌声称其电池平均续航至少 30 小时。一个消费者组织怀疑实际更短,随机测了 15 节电池。设 \(\mu\) 为真实平均续航。正确的假设是
A brand claims its batteries last at least 30 hours on average. A consumer group suspects the true mean is shorter and tests 15 randomly chosen batteries. Let \(\mu\) be the true mean. The correct hypotheses are
- a\(H_0:\mu\ge30\) 对 \(H_a:\mu<30\)\(H_0:\mu\ge30\) versus \(H_a:\mu<30\)
- b\(H_0:\mu=30\) 对 \(H_a:\mu<30\)\(H_0:\mu=30\) versus \(H_a:\mu<30\)
- c\(H_0:\bar x=30\) 对 \(H_a:\bar x<30\)\(H_0:\bar x=30\) versus \(H_a:\bar x<30\)
- d\(H_0:\mu=30\) 对 \(H_a:\mu\neq30\)\(H_0:\mu=30\) versus \(H_a:\mu\neq30\)
- 定方向Fix the direction 组织“怀疑更短”= 想证明 \(\mu<30\),所以它进 Ha。"Suspects shorter" = wants to show \(\mu<30\), so that goes into \(H_a\). 方向锁定为左尾单侧。A left-tailed one-sided test.
- H0 写成等式Write H0 as an equality 厂家“至少 30”里的边界值就是 30;把整段 \(\mu\ge30\) 放进 H0 不符合 AP 规范,也无法计算 P 值。The boundary of the claim "at least 30" is 30; writing the whole range \(\mu\ge30\) violates AP convention and cannot produce a P-value. \(H_0:\mu=30\)。\(H_0:\mu=30\).
- 参数还是统计量Parameter or statistic \(\bar x\) 是样本算出的统计量,不能出现在假设里;这就是 c 项的错误。\(\bar x\) is a sample statistic and cannot appear in hypotheses — the error in c. 答案为 b。Answer b.
| 选项Option | 判断与理由Verdict & reason |
|---|---|
| a | 错。H0 不能写成不等式,计算需要唯一数值。Wrong: \(H_0\) may not be an inequality; the calculation needs a single value. |
| b | 对。H0 用等号,方向与怀疑一致。Correct: equality in \(H_0\), direction matches the suspicion. |
| c | 错。假设必须关于总体参数 \(\mu\),不能写样本均值。Wrong: hypotheses concern the parameter \(\mu\), never the sample mean. |
| d | 错。组织有明确方向(更短),双侧与题意不符。Wrong: the group has a clear direction (shorter); two-sided contradicts the wording. |
某公司新电池号称更耐用。检验 \(H_0:\mu=30\) 对 \(H_a:\mu>30\),算得 \(P=0.0276\)。(a) 在 α = 0.05 下结论是什么?(b) 在 α = 0.01 下呢?
A company claims its new batteries last longer. Testing \(H_0:\mu=30\) versus \(H_a:\mu>30\) gives \(P=0.0276\). (a) What is the conclusion at α = 0.05? (b) At α = 0.01?
- a两个水平都拒绝 H0reject H0 at both levels
- b两个水平都不拒绝 H0fail to reject H0 at both levels
- cα = 0.05 拒绝,α = 0.01 不拒绝reject at α = 0.05, fail to reject at α = 0.01
- dα = 0.01 拒绝,α = 0.05 不拒绝reject at α = 0.01, fail to reject at α = 0.05
- 比较 0.0276 与 0.05Compare 0.0276 with 0.05 \(0.0276<0.05\),落在拒绝域内。\(0.0276<0.05\), inside the rejection region. α = 0.05 时拒绝 H0,结论“电池平均续航超过 30 小时”。Reject at α = 0.05: the batteries last longer than 30 hours on average.
- 比较 0.0276 与 0.01Compare 0.0276 with 0.01 \(0.0276>0.01\),没有越过更严格的门槛。\(0.0276>0.01\): it does not clear the stricter bar. α = 0.01 时不拒绝 H0,证据不足以支持 Ha。Fail to reject at α = 0.01: not enough evidence for \(H_a\).
- 别把它说成“结论矛盾”Do not call this a contradiction 两个结论对应两个不同的证据门槛,都正确;报告时应同时给出 α 与 P 值。Both conclusions are correct at their own thresholds; a report should state α together with the P-value. c 正确。Option c.
| 选项Option | 判断与理由Verdict & reason |
|---|---|
| a | 错。0.0276 并不小于 0.01,严格水平下不能拒绝。Wrong: 0.0276 is not below 0.01. |
| b | 错。0.0276 小于 0.05,宽松水平下应当拒绝。Wrong: 0.0276 is below 0.05, so reject there. |
| c | 对。P 值处在两门槛之间。Correct: the P-value falls between the two thresholds. |
| d | 错。方向反了:α 越小越保守。Wrong: reversed — smaller α is the stricter test. |
回到土豆的例子(\(H_0:p=0.08\),\(H_a:p>0.08\))。检验结果不拒绝 H0,厂家收下了这车土豆;而实际上这车土豆的瑕疵率是 12%。这个错误属于
Back to the potatoes (\(H_0:p=0.08\), \(H_a:p>0.08\)). The test fails to reject \(H_0\), so the producer keeps the truck — but in truth 12% of the potatoes are blemished. This error is
- aType I 错误,概率为 αa Type I error, with probability α
- bType II 错误,概率为 βa Type II error, with probability β
- cType I 错误,概率为 βa Type I error, with probability β
- d不是错误,因为样本是随机的not an error, because the sample was random
- 写下真实情况Write the truth 真实 \(p=0.12>0.08\),所以 H0 是假的,Ha 是真的。Truly \(p=0.12>0.08\), so \(H_0\) is false and \(H_a\) is true. 真实状态:“H0 假”。Truth: \(H_0\) false.
- 写下决定Write the decision 题目说“不拒绝 H0”——正是漏掉真问题的情形。The problem says "fail to reject \(H_0\)" — the missed-detection cell. Type II,概率 β;用文字说:“有问题的货被放过了”。Type II, probability β; in words: "a bad truckload was let through".
- 给出后果State the consequence 瑕疵土豆被做成薯片,消费者可能投诉、品牌受损。Blemished potatoes become chips; customers may complain and the brand suffers. 这与“把好货退回去”(Type I)的代价方向相反。The opposite cost of "sending a good truck away" (Type I).
| 选项Option | 判断与理由Verdict & reason |
|---|---|
| a | 错。Type I 是“H0 真却拒绝”,这里 H0 是假的。Wrong: Type I rejects a true \(H_0\); here \(H_0\) is false. |
| b | 对。H0 假而未拒绝,概率记号 β。Correct: false \(H_0\) not rejected; probability β. |
| c | 错。Type I 的概率永远是 α,不是 β。Wrong: P(Type I) is always α, never β. |
| d | 错。随机抽样保证“无偏”,不保证每次判断正确。Wrong: random sampling ensures unbiasedness, not a correct decision every time. |
某检验在 α = 0.05 下的 power 只有 0.40(针对真实 \(p=0.11\) 这个备择值)。研究者希望提高 power,同时不改变 α。请给出至少两种可行做法并说明理由。
A test has power 0.40 at α = 0.05 against the alternative \(p=0.11\). The researchers want higher power without changing α. Give at least two ways to achieve this and explain why each works.
- 做法一:增大样本量 nOption 1: increase n 标准误 \(\sqrt{p(1-p)/n}\) 随 n 增大而变小,抽样分布变瘦,α 面积不变的前提下拒绝域离 H0 中心更近,就更容易抓到 \(p=0.11\) 的真实差异。The standard error \(\sqrt{p(1-p)/n}\) shrinks, the sampling curve narrows, and with the same α the rejection region reaches closer to \(H_0\)'s centre — easier to catch a true \(p=0.11\). 最常见、最可控的做法;代价是成本与时间。The usual, most controllable lever; the cost is money and time.
- 做法二:选更“极端”的备择值来评估Option 2: consider a more extreme alternative power 是针对某个具体备择值计算的。若真实不合格率其实是 0.15 而不是 0.11,两条分布离得更远,同一 α、同一 n 下 power 就更高。Power is computed for a specific alternative. If the true rate were 0.15 rather than 0.11, the curves separate more, so power is higher at the same α and n. 注意:这一点不是说研究者可以“选”真相,而是说 power 必须注明“针对哪个备择值”。Caveat: researchers cannot choose the truth — but a power claim must always name which alternative it refers to.
- 不能做的:把 α 调大What is not allowed: raising α α 调大确实提高 power,但题目明确要求 α 不变;而且它会让 Type I 概率上升。Raising α would raise power, but the question fixes α — and it would raise P(Type I) too. 按要求只能走“减小标准误/增大分离度”这条路。Under the constraint, only paths that shrink the SE or separate the curves qualify.
本讲小结Summary
- 检验只评估反对 H0 的证据:H0 恒为“参数 = 值”,Ha 由题目的用词决定 >、< 或 ≠;永不写统计量。
- P 值 = 在 H0 为真时得到“至少这么极端”结果的概率;它不是 H0 为真的概率。
- 结论只有两句:\(P<\alpha\) → reject H0;\(P\ge\alpha\) → fail to reject H0。永远不说 accept H0。
- 单比例:\(z=(\hat p-p_0)/\sqrt{p_0(1-p_0)/n}\),分母用 p0;双侧 P 值 = 单尾 × 2。两比例:\(H_0:p_1=p_2\),标准误用合并比例 \(\hat p_c\)。
- 双侧 α 检验与 100(1 − α)% 置信区间结论一致:区间不含 \(p_0\) ⇔ 拒绝 H0;统计显著 ≠ 现实重要,多重比较多做几次就会多几次误报。
- Type I(误报,P = α)与 Type II(漏报,P = β);power = 1 − β,随效应变大、α 变大、σ 变小、n 变大而升高。
- A test assesses evidence against H0: H0 is always "parameter = value"; Ha takes >, < or ≠ from the wording. Never write a statistic in a hypothesis.
- The P-value is the probability of a result at least as extreme, assuming H0 is true; it is not the probability that H0 is true.
- Two conclusions only: \(P<\alpha\) → reject H0; \(P\ge\alpha\) → fail to reject H0. Never accept H0.
- One proportion: \(z=(\hat p-p_0)/\sqrt{p_0(1-p_0)/n}\) with p0 in the denominator; a two-sided P-value doubles one tail. Two proportions: \(H_0:p_1=p_2\) with the pooled \(\hat p_c\) in the standard error.
- A two-sided α test agrees with the 100(1 − α)% interval: the interval excludes \(p_0\) ⇔ reject H0. Statistical significance is not practical importance, and many comparisons produce many false alarms.
- Type I (false alarm, P = α) and Type II (miss, P = β); power = 1 − β rises with larger effects, larger α, smaller σ and larger n.
总体均值的检验:t 检验、配对与两样本Tests About a Population Mean: t, Paired and Two-Sample
第 21 讲检验的是比例,标准误里所有的 p 都已知。这一讲换成均值:总体的 σ 几乎永远不知道,只能用样本的 s 去顶替——而这一步“估计的估计”会让分布尾部变厚,于是 z 换成 t。掌握这一点,配对数据(同一批人前后测)和两独立样本的比较就都只是“换一个统计量、换一个 df”的事了。
Lecture 21 tested a proportion, where every p in the standard error was known. This lecture switches to a mean: σ is almost never known, so the sample s must stand in — and that extra layer of estimation thickens the tails, turning z into t. Once that is clear, paired data (the same subjects measured twice) and two independent samples are just a different statistic and a different df.
本讲学习目标Learning Objectives
- 说明为什么要用 t 分布代替标准正态:σ 未知、用 s 估计,尾部更厚;df = n − 1,n 越大越接近正态。
- 为一个总体均值检验检查 Random / Normal / Independent 三个条件,n < 30 时会看图判断偏度与离群点。
- 完成单样本 t 检验 \(t=\dfrac{\bar x-\mu_0}{s/\sqrt n}\),会用 Table B 读出一个 P 值的范围,也会用 T-Test 得到精确值。
- 用置信区间对双侧检验下结论,并解释“区间不含 \(\mu_0\) ⇔ 拒绝 H0”。
- 对配对数据先求差值 \(d\),再做差值的单样本 t 检验;说清配对设计与两独立样本设计的区别。
- 完成两独立样本 t 检验(2-SampTTest),知道 df 由计算器给出、保守做法取较小的 n − 1。
- Explain why a t distribution replaces the standard Normal: σ is unknown and estimated by s, so the tails are thicker; df = n − 1, approaching Normal as n grows.
- CHECK Random, Normal and Independent conditions for a test about a mean, inspecting skew and outliers when n < 30.
- CONDUCT a one-sample t test with \(t=\dfrac{\bar x-\mu_0}{s/\sqrt n}\), reading a P-value range from Table B or an exact value from T-Test.
- USE a confidence interval to conclude a two-sided test, explaining "interval excludes \(\mu_0\) ⇔ reject H0".
- PERFORM a paired t test by first forming differences \(d\), and distinguish paired from two-independent-sample designs.
- CONDUCT a two-sample t test (2-SampTTest), knowing df comes from technology and that the conservative choice is the smaller n − 1.
核心概念Core Concepts
3.1 从 z 到 t:为什么要换分布3.1 From z to t: Why the Distribution Changes
用样本的 s 去顶替未知的 σ,等于在估计之上再加一层估计。t 分布就是为“σ 也要估”而设计的:比正态更矮更胖,df = n − 1。
Replacing the unknown σ with the sample s adds a second layer of estimation on top of the first. The t distribution exists precisely because σ must be estimated: lower and fatter than Normal, with df = n − 1.
在第 20 讲的置信区间里我们已经用过 t;现在把它用到检验上。分子还是“观测值 − H0 声称的值”,只是分母从 \(\sigma/\sqrt n\) 变成了 \(s/\sqrt n\)(称为均值的标准误)。因为 s 本身随样本波动,t 统计量比 z 更“野”,极端值出现的概率更大,所以临界值也更远。
We already used t for intervals in Lecture 20; now it moves to tests. The numerator is still "observed − value claimed by H0", but the denominator changes from \(\sigma/\sqrt n\) to \(s/\sqrt n\), the standard error of the mean. Since s itself varies from sample to sample, the t statistic is wilder than z, extreme values are more likely, and critical values sit farther out.
Random 随机Random
数据来自随机抽样或随机分配的实验。没有随机性,P 值就没有意义。
Data come from a random sample or a randomized experiment. Without randomness a P-value means nothing.
Normal 正态Normal
总体近似正态,或 \(n\ge30\)(由中心极限定理);n < 30 时必须看图:明显的偏度或离群点会让 t 程序失真。
The population is roughly Normal, or \(n\ge30\) (CLT); when n < 30 you must look at the data: strong skew or outliers break the t procedure.
Independent 独立Independent
个体观测相互独立;不放回抽样时检查 10% 条件:总体至少是样本的 10 倍。
Individual observations are independent; when sampling without replacement, check the 10% condition — the population is at least 10 times the sample.
别把 n ≥ 30 当护身符n ≥ 30 is not a force field
大样本救得了轻度偏态,救不了强离群点:一个录入错误就能把 \(\bar x\) 与 s 一起拖走。先看图,再算题。
A large sample rescues mild skew, not extreme outliers: one data-entry error drags both \(\bar x\) and s. Look at the data before computing.
3.2 单样本 t 检验:四步法只换一个分布3.2 The One-Sample t Test: Same Four Steps, One New Distribution
四步法一个字都不用改,只把 z 换成 t、把正态查表换成 df = n − 1 的 t 表。判断标准仍然是 \(P<\alpha\) 拒绝、\(P\ge\alpha\) 不拒绝。
The four-step routine is unchanged: swap z for t and read the P-value from a t distribution with df = n − 1. The decision rule is still reject if \(P<\alpha\), fail to reject otherwise.
操作上和比例检验几乎逐字对应:用 H0 声称的值算统计量,再按 Ha 的方向取尾面积。唯一的现实差别是——这里的尾面积没法用 68-95-99.7 估出来,必须查 t 表或让计算器算。
The mechanics mirror the proportion test almost word for word: compute the statistic against the value claimed by H0, then take the tail area in the direction of Ha. The practical difference: that tail area cannot be estimated with the 68-95-99.7 rule — use Table B or technology.
| 对比项Item | 单比例 z 检验(第 21 讲)One-proportion z test (Lec 21) | 单样本 t 检验(本讲)One-sample t test (this lecture) |
|---|---|---|
| 统计量Statistic | \(z=\dfrac{\hat p-p_0}{\sqrt{p_0(1-p_0)/n}}\) | \(t=\dfrac{\bar x-\mu_0}{s/\sqrt n}\) |
| 分母用什么Denominator uses | \(p_0\)(H0 给的值)\(p_0\), the value in H0 | \(s\)(样本估的值)\(s\), estimated from the sample |
| P 值来自P-value from | 标准正态standard Normal | t 分布,df = n − 1t with df = n − 1 |
| “正态”条件怎么查How "Normal" is checked | \(np_0\) 与 \(n(1-p_0)\) 都 ≥ 10\(np_0\) and \(n(1-p_0)\) both ≥ 10 | 总体正态,或 \(n\ge30\),或小样本看图population Normal, or \(n\ge30\), or inspect small samples |
① 表里只有正的 t 值,遇到负的 t 要用对称性 \(P(t\le-2.1)=P(t\ge2.1)\);② 需要的 df 表里没有时,用下一个更小的 df(更保守);③ 表只给一段区间,所以要写“P 在 0.05 与 0.10 之间”,不能硬凑成一个精确数字。
① The table lists only positive t values; for negative t use symmetry, \(P(t\le-2.1)=P(t\ge2.1)\). ② If your df is missing, use the next lower df (more conservative). ③ The table gives a range, so write "P is between 0.05 and 0.10" rather than inventing an exact number.
3.3 双侧检验与置信区间:同一件事的两种说法3.3 Two-sided Tests and Intervals: Two Views of One Thing
对均值来说,双侧 α 检验与 100(1 − α)% 置信区间结论完全一致:区间不含 \(\mu_0\) ⇔ 拒绝 \(H_0:\mu=\mu_0\)。但区间还额外告诉你“\(\mu\) 大概在哪儿”。
For means, a two-sided α test and a 100(1 − α)% interval always agree: the interval excludes \(\mu_0\) ⇔ reject \(H_0:\mu=\mu_0\). The interval also tells you where \(\mu\) plausibly lies.
夏威夷菠萝公司的例子:去年一块大田的平均菠萝重量是 31 盎司,换了新的灌溉系统后随机称了 50 个,得到 95% 置信区间 \((31.255,\ 32.616)\)。因为 31 不在这个区间里,所以双侧检验 \(H_0:\mu=31\) 在 α = 0.05 下必然拒绝;而且区间整个落在 31 右边,说明今年平均重量更大。这正是第 21 讲“P 值只给决定、区间给了方向与大小”的延续。
Hawaii Pineapple Company: last year a large field averaged 31 oz per pineapple. After a new irrigation system, 50 randomly weighed pineapples give a 95% interval of \((31.255,\ 32.616)\). Because 31 is not in the interval, the two-sided test of \(H_0:\mu=31\) at α = 0.05 must reject; and since the whole interval lies above 31, this year's mean is larger. This continues Lecture 21's point: the P-value gives a decision, the interval gives direction and size.
双侧检验问“\(\mu_0\) 能不能被排除”,置信区间回答“哪些值不能被排除”。两者用同一个 \(s/\sqrt n\),所以对均值而言它们严格一致(对比例只是近似一致)。
A two-sided test asks "can \(\mu_0\) be ruled out?"; the interval answers "which values cannot be ruled out?" Both use the same \(s/\sqrt n\), so for means they agree exactly (for proportions only approximately).
3.4 配对 t 检验:先算差值,再做单样本3.4 Paired t Test: Differences First, Then One Sample
同一批人(或一一配对的个体)测两次,就得到配对数据。把每一对相减得到 \(d\),问题立刻变成“\(d\) 的平均值是否为 0”的单样本 t 检验,df = 对数 − 1。
Measuring the same subjects (or matched pairs) twice gives paired data. Subtract within each pair to get \(d\), and the problem becomes a one-sample t test of whether the mean of \(d\) is 0, with df = pairs − 1.
为什么不能直接做两独立样本 t?因为同一个人前后的两次测量不独立:本来就容易抑郁的人,两次分数都偏高。相减之后,个体之间的差异被消掉了,剩下的只是“处理带来的变化”,检验因此更灵敏——这也是配对设计在实验里受欢迎的原因。
Why not a two-sample t? Because the two measurements on one person are not independent: someone prone to depression scores high both times. Subtracting removes the person-to-person differences and leaves only the change due to treatment, which makes the test more sensitive — the reason paired designs are popular in experiments.
判断标准只有一个:两组数据之间有没有“一一对应”的关系。同一批人前后测、同卵双胞胎、同一块地的左右两半 → 配对;随机分成两组不同的人、两种不同处理的独立组 → 两独立样本。把配对数据误当两独立样本做,会丢掉配对带来的精度,还会违反独立性;反过来把两组不同的人硬当配对,则完全无意义。
One criterion only: is there a one-to-one link between the two sets of measurements? Same subjects measured twice, identical twins, left/right halves of the same plot → paired; two separate groups of different people or two independently assigned treatments → two independent samples. Treating paired data as independent throws away the precision gained by pairing and violates independence; forcing unrelated groups into pairs is meaningless.
3.5 两独立样本均值之差:标准误平方相加3.5 Two Independent Means: Adding Standard Errors in Quadrature
比较两个均值时,\(H_0:\mu_1-\mu_2=0\)。差值的标准误是两个标准误的平方和再开根:\(\sqrt{s_1^2/n_1+s_2^2/n_2}\),df 由计算器给出,保守做法取较小的 \(n-1\)。
Comparing two means, \(H_0:\mu_1-\mu_2=0\). The standard error of the difference is the square root of the sum of the two squared standard errors: \(\sqrt{s_1^2/n_1+s_2^2/n_2}\). df comes from technology; the conservative choice is the smaller \(n-1\).
条件(各查一遍)Conditions (check each group)
Random:两个样本各自随机,或随机分配;Independent:两组之间独立,且各组满足 10% 条件;Normal:两组各自正态或 \(n\ge30\),小样本时看图。
Random: each sample random, or random assignment; Independent: groups independent and each meets the 10% condition; Normal: each group Normal or \(n\ge30\) — inspect small samples.
检验的是“差”,不是“各自”Test the difference, not each mean
\(H_0\) 说两个均值相等(差为 0),不是“各自等于某个历史值”。所以写假设时要写成 \(H_0:\mu_1-\mu_2=0\) 或 \(H_0:\mu_1=\mu_2\),并说明 \(\mu_1,\mu_2\) 各指谁。
\(H_0\) says the two means are equal (difference 0), not that each equals some historical value. Write \(H_0:\mu_1-\mu_2=0\) or \(H_0:\mu_1=\mu_2\) and define both parameters.
例题精讲Worked Examples
下面两道例题把四步法完整走一遍:一道单样本 t,一道配对 t。做题时先写 STATE 与 PLAN,再动手算。The two examples walk the four-step routine end to end: one one-sample t test and one paired t test. Write STATE and PLAN before touching the calculator.
例 1 单样本 t 检验全流程Example 1 A one-sample t test end to end
t = 1.5412 p = 0.0728 x̄ = 33.9 Sx = 9.8 n = 15
例 2 配对 t:咖啡因戒断会加重抑郁吗?Example 2 Paired t: does caffeine withdrawal worsen depression?
| 受试者Subject | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 咖啡因Caffeine | 5 | 5 | 4 | 3 | 8 | 5 | 0 | 0 | 2 | 11 | 1 |
| 安慰剂Placebo | 16 | 23 | 5 | 7 | 14 | 24 | 6 | 3 | 15 | 12 | 0 |
| 差值 d(安慰剂 − 咖啡因)Difference d (placebo − caffeine) | 11 | 18 | 1 | 4 | 6 | 19 | 6 | 3 | 13 | 1 | −1 |
随堂练习Check Your Understanding
这一讲的题目全部围绕“选对方法”和“读对 P 值”,计算本身不难。 Every question here is about choosing the right procedure and reading the P-value correctly; the arithmetic is easy.
研究者随机抽取 12 名员工的通勤时间,想检验平均通勤时间是否为 25 分钟。做单样本 t 检验前,关于 Normal 条件最恰当的做法是
A researcher randomly selects 12 employees' commute times to test whether the mean is 25 minutes. Before the one-sample t test, the most appropriate way to handle the Normal condition is to
- a不必检查,因为 t 检验不受正态性影响skip it, because t tests are unaffected by Normality
- b只要样本量大于 10 就自动满足assume it holds whenever n > 10
- c画点图或正态概率图,检查是否有强偏度或离群点plot the data (dotplot or Normal probability plot) and look for strong skew or outliers
- d因为总体 σ 已知,可以改用 z 检验use a z test instead, since σ is known
- 先看样本量Check n first n = 12 < 30,中心极限定理还帮不上忙。n = 12 < 30, so the CLT is not yet doing the work for you. 必须直接检查数据的形状。The data's shape must be checked directly.
- 用什么图Which plot 点图/直方图看对称性和离群点,正态概率图看是否成直线。A dotplot or histogram for symmetry and outliers; a Normal probability plot for linearity. 没有强偏、没有离群点 → 可以用 t。No strong skew and no outliers → t is fine.
- 澄清 σClarify σ 题目没有给出总体 σ,只给了样本 s,所以只能做 t,不能做 z。No population σ is given, only s, so the z test is unavailable. c 正确。Option c.
| 选项Option | 判断与理由Verdict & reason |
|---|---|
| a | 错。t 程序对强偏与离群点敏感,正因如此才要检查。Wrong: t procedures are sensitive to strong skew and outliers — hence the check. |
| b | 错。10 或 15 都不是“自动正态”的门槛;通常要 n ≥ 30 才不必细看。Wrong: 10 or 15 is not an automatic-Normality threshold; roughly n ≥ 30 is when you stop inspecting. |
| c | 对。画图判断偏度与离群点,是 n < 30 时的标准做法。Correct: plotting to judge skew and outliers is standard when n < 30. |
| d | 错。σ 未知(题目只给 s),z 检验不适用。Wrong: σ is unknown (only s is given), so z does not apply. |
菠萝公司今年的 95% 置信区间为 \((31.255,\ 32.616)\)。若要检验 \(H_0:\mu=31\) 对 \(H_a:\mu\neq31\),在 α = 0.05 下的结论是
The pineapple company's 95% interval is \((31.255,\ 32.616)\). For testing \(H_0:\mu=31\) versus \(H_a:\mu\neq31\) at α = 0.05, the conclusion is
- a不拒绝 H0,因为 31 很接近区间fail to reject, because 31 is close to the interval
- b拒绝 H0,有证据表明平均重量不是 31 盎司reject H0; there is evidence the mean weight is not 31 oz
- c拒绝 H0,并证明平均重量是 32 盎司reject H0 and prove the mean weight is 32 oz
- d无法判断,因为置信区间与假设检验无关cannot tell, because intervals and tests are unrelated
- 定位 31Locate 31 31 < 31.255,落在区间左侧之外。31 < 31.255, to the left of the interval. 31 不是 \(\mu\) 的合理取值 → 拒绝 H0。31 is not a plausible value of \(\mu\) → reject \(H_0\).
- 说清证据方向State the direction 整个区间都在 31 右侧,所以证据指向“更大”。The whole interval lies right of 31, so the evidence points to "larger". 可以额外说“今年平均重量更大”。You may add that this year's mean is larger.
- 排除“证明等于”Reject the "proves equal" trap c 把“拒绝 31”偷换成“证明是 32”,这是 AP 反复考察的逻辑错误;拒绝 H0 只支持不等,不支持某个具体数值。Option c turns "reject 31" into "prove 32" — a logic error AP tests repeatedly. Rejecting \(H_0\) supports "not equal", never one exact value. b 正确。Option b.
| 选项Option | 判断与理由Verdict & reason |
|---|---|
| a | 错。区间是一个整体判据,31 在区间外,不能因为“接近”就放过。Wrong: the interval is an all-or-nothing criterion; being "close" does not rescue 31. |
| b | 对。区间不含 31 → 拒绝,并且证据指向更大的值。Correct: interval excludes 31 → reject, with evidence pointing larger. |
| c | 错。拒绝 H0 不能“证明”参数等于 32。Wrong: rejecting \(H_0\) cannot prove the parameter equals 32. |
| d | 错。双侧检验与同等置信水平的区间严格对应。Wrong: the two-sided test corresponds exactly to the interval at the matching level. |
下列哪一项应当用配对 t 而不是两独立样本 t?
Which of these calls for a paired t rather than a two-sample t?
- a随机抽取 40 名男生和 45 名女生,比较平均每周运动时间comparing mean weekly exercise of 40 randomly chosen boys and 45 girls
- b随机选 30 名学生,记录他们期中与期末的考试成绩,比较两次平均分recording the midterm and final scores of the same 30 randomly chosen students
- c随机分配 60 名患者接受新药或安慰剂,比较缓解率randomly assigning 60 patients to a drug or placebo and comparing relief rates
- d比较两所不同学校学生的平均 SAT 分数comparing mean SAT scores at two different schools
- b 项:同一批人两次Option b: same students twice 30 名学生的期中与期末成绩天然成对;同一学生的两次成绩相关,不能当作 60 个独立观测。The midterm and final scores of the same 30 students are naturally paired; the two scores of one student are related and cannot be treated as 60 independent observations. 应算差值 d = 期末 − 期中,做单样本 t,df = 29。Form d = final − midterm, run a one-sample t with df = 29.
- 其余三项:不同的人The others: different people a、d 是两组不同的个体;c 是随机分配的两组患者,虽然比较的是比例(应用两比例检验),也不是配对。a and d involve two separate groups; c randomly assigns two groups (and compares proportions, so a two-proportion test applies) — still not paired. 只有 b 是配对设计。Only b is paired.
| 选项Option | 判断与理由Verdict & reason |
|---|---|
| a | 错。男女生是两组不同的人,无一一对应。Wrong: boys and girls are separate groups with no one-to-one link. |
| b | 对。同一个学生的两次成绩成对,须用差值。Correct: each student's two scores form a pair, so use differences. |
| c | 错。两组独立患者,且响应变量是分类的(缓解/未缓解),用两比例检验。Wrong: independent groups with a categorical response (relief or not) — a two-proportion test. |
| d | 错。两所学校的学生互不配对,用两独立样本 t。Wrong: students at two schools are not matched; use a two-sample t. |
研究者随机招募 22 名有氧运动者与 20 名拉伸练习者,测得静息心率:运动组 \(\bar x_1=62.4\)、\(s_1=7.8\);拉伸组 \(\bar x_2=68.1\)、\(s_2=9.2\)。在 α = 0.05 下检验两组平均静息心率是否不同。
Researchers recruit 22 aerobic exercisers and 20 stretchers and measure resting heart rate: exercisers \(\bar x_1=62.4\), \(s_1=7.8\); stretchers \(\bar x_2=68.1\), \(s_2=9.2\). At α = 0.05, test whether the mean resting heart rates differ.
- 写假设并定义参数State hypotheses and define parameters 设 \(\mu_1\) = 运动者的真实平均静息心率,\(\mu_2\) = 拉伸者的。\(H_0:\mu_1-\mu_2=0\),\(H_a:\mu_1-\mu_2\neq0\),α = 0.05。Let \(\mu_1\) = true mean for exercisers, \(\mu_2\) = for stretchers. \(H_0:\mu_1-\mu_2=0\), \(H_a:\mu_1-\mu_2\neq0\), α = 0.05. 关键词“不同”→ 双侧。"Differ" → two-sided.
- 检查条件Check conditions 两组均为随机抽取且相互独立;两个 n 都 ≥ 20,无明显强偏或离群点(题目未提示)→ 可用 t;两组总体人数远多于 220 人。Both groups randomly selected and independent; each n ≥ 20 with no strong skew or outliers reported → t is fine; both populations far exceed 220. 两独立样本 t 检验。Use a two-sample t test.
- 计算Compute \[ t=\frac{62.4-68.1}{\sqrt{\dfrac{7.8^2}{22}+\dfrac{9.2^2}{20}}} =\frac{-5.7}{\sqrt{2.765+4.232}}=\frac{-5.7}{2.645}\approx -2.16 \] 计算器给出 df ≈ 37.5,双侧 \(P\approx0.038\);若用保守 df = 19,双侧 \(P\approx0.044\),仍小于 0.05。Technology gives df ≈ 37.5 and two-sided \(P\approx0.038\); the conservative df = 19 gives \(P\approx0.044\), still below 0.05. 两种 df 下都拒绝 H0。Reject under either df.
- 结论与边界Conclude with limits 有充分证据表明两组平均静息心率不同,且样本显示运动组更低。但这是观察研究、不是随机分配,不能断言“运动导致心率降低”。There is convincing evidence the means differ, with the exercisers lower. But this is an observational comparison, not random assignment — we cannot claim exercise caused the lower rate. 结论写“有关联、有差异”,不写“因果”。Say "associated, different", not "caused".
t = −2.155 p = 0.0378 df = 37.47
本讲小结Summary
- σ 未知时用 \(s\) 顶替,统计量服从 t 分布,df = n − 1;df 越大越接近正态。
- 单样本 t:\(t=(\bar x-\mu_0)/(s/\sqrt n)\),P 值来自 df = n − 1;Table B 给区间,计算器给精确值。
- 条件:Random、Independent(10% 条件)、Normal(\(n\ge30\) 或看图无强偏/离群点)。
- 双侧 α 检验与 100(1 − α)% 置信区间结论一致:区间不含 \(\mu_0\) ⇔ 拒绝。
- 配对数据先求 \(d\),再做差值的单样本 t,df = 对数 − 1;同一批人前后测 ≠ 两独立样本。
- 两独立样本:\(t=(\bar x_1-\bar x_2)/\sqrt{s_1^2/n_1+s_2^2/n_2}\),df 用计算器或保守取较小 n − 1。
- With σ unknown, \(s\) replaces it and the statistic follows a t distribution with df = n − 1; larger df is closer to Normal.
- One-sample t: \(t=(\bar x-\mu_0)/(s/\sqrt n)\) with P from df = n − 1; Table B gives a range, technology the exact value.
- Conditions: Random, Independent (10% condition), Normal (\(n\ge30\), or no strong skew/outliers in small samples).
- A two-sided α test agrees with the 100(1 − α)% interval: the interval excludes \(\mu_0\) ⇔ reject.
- Paired data: form \(d\) first, then a one-sample t on the differences with df = pairs − 1; same-subject twice is not two independent samples.
- Two independent samples: \(t=(\bar x_1-\bar x_2)/\sqrt{s_1^2/n_1+s_2^2/n_2}\), df from technology or the conservative smaller n − 1.
卡方检验:比较计数Chi-Square Tests: Comparing Counts
前两讲比较的是比例与均值——都是“数出来的量”。这一讲的响应变量是分类的:颜色、星期几、治疗结果、是否患病。对这种数据,我们比较的是各类的计数,用的统计量叫 \(\chi^2\)。三种卡方检验长得几乎一样,区别全在数据是怎么收集的:一个变量的分布对不对(GOF)、同一变量在几组间是否相同(homogeneity)、两个变量是否有关联(association/independence)。
The last two lectures compared proportions and means — quantities you can count up. Here the response is categorical: colour, weekday, treatment outcome, disease status. Such data are compared through counts, using the \(\chi^2\) statistic. The three chi-square tests look almost identical; what separates them is how the data were collected — does one variable follow a claimed distribution (GOF), is one variable distributed the same across several groups (homogeneity), or are two variables associated (association/independence)?
本讲学习目标Learning Objectives
- 根据数据结构区分三种卡方检验:GOF、homogeneity、association/independence,并写出各自的 H0 与 Ha。
- 计算期望计数:GOF 用 \(np_i\);双向表用 \(E=\dfrac{\text{行合计}\times\text{列合计}}{\text{总合计}}\)。
- 计算 \(\chi^2=\sum\dfrac{(O-E)^2}{E}\) 与自由度:GOF 为 \(k-1\),双向表为 \((r-1)(c-1)\)。
- 检查 Random、Large Counts(所有期望计数 ≥ 5)、Independent 三个条件。
- 读懂 \(\chi^2\) 分布右尾给出的 P 值,并写出“有证据表明…(差异/关联)”的规范结论。
- 做follow-up 分析:找出 \((O-E)^2/E\) 最大的格子,说明差异来自哪里。
- 说明为什么观察性研究即使显著也不能得出因果结论,而随机分配可以。
- IDENTIFY the correct chi-square procedure from the data structure — GOF, homogeneity, or association/independence — and state each H0 and Ha.
- COMPUTE expected counts: \(np_i\) for GOF; \(E=\dfrac{\text{row total}\times\text{column total}}{\text{table total}}\) for a two-way table.
- CALCULATE \(\chi^2=\sum\dfrac{(O-E)^2}{E}\) and df: \(k-1\) for GOF, \((r-1)(c-1)\) for two-way tables.
- CHECK Random, Large Counts (all expected counts ≥ 5) and Independent conditions.
- INTERPRET the right-tail area of a chi-square distribution and state a conclusion of the form "there is evidence of a difference / an association".
- CARRY OUT a follow-up analysis identifying the cell with the largest \((O-E)^2/E\).
- EXPLAIN why an observational study cannot establish causation even when significant, while random assignment can.
核心概念Core Concepts
4.1 三个卡方:先问数据是怎么来的4.1 Three Chi-Squares: Start from How the Data Were Collected
三种检验的公式一模一样,区别只有两个:表里有几个变量、数据来自几组。先问这两个问题,检验的名字和 H0 的措辞就定了。
The formula is identical in all three tests; only two things differ: how many variables the table holds and how many groups the data came from. Answer those first and both the name and the wording of H0 follow.
| 检验Test | 数据结构Data structure | H0 说什么What H0 says | dfdf | 例子Example |
|---|---|---|---|---|
| GOF拟合优度goodness-of-fit | 一个分类变量,一个样本one categorical variable, one sample | 该变量的分布等于某个声称的分布the variable follows a claimed distribution | \(k-1\) | M&M 六种颜色的比例是否为 24:20:16:14:13:13are M&M colours in the ratio 24:20:16:14:13:13 |
| Homogeneity同质性homogeneity | 一个分类变量,多个总体或处理组(各组的样本量事先固定)one variable across several populations or treatments (group sizes fixed by design) | 该变量在各组中的分布相同the distribution is the the same in every group | \((r-1)(c-1)\) | 三种背景音乐下,顾客买法国/意大利/其他酒的比例是否相同are wine-type proportions the same under three music treatments |
| Association / Independence关联/独立association/independence | 一个样本里同时记录两个分类变量one sample, two categorical variables recorded | 两个变量没有关联(相互独立)the two variables are not associated (independent) | \((r-1)(c-1)\) | 学历与是否规律运动是否有关is education level associated with regular exercise |
最容易混的是后两种。判断的关键不是“表长什么样”,而是抽样方式:如果研究者先按组抽人(例如随机分配 84 人听法国音乐、75 人听意大利音乐、84 人不放音乐),比较的是“各组的分布是否相同”→ homogeneity;如果只从一个人群里随机抽 400 人,同时问两个问题(学历、是否运动),比较的是“这两个变量是否相关”→ association。同一个 3×2 表格,两种设计会得到相同的 \(\chi^2\) 数值和 df,但结论的对象不同。
The last two are the ones students mix up. The key is not what the table looks like but how the sample was drawn: if the researcher selected groups in advance (84 assigned to French music, 75 to Italian, 84 to none), the question is whether the distribution is the same in every group → homogeneity. If 400 people were drawn from one population and two variables were recorded for each (education, exercise), the question is whether those variables are associated → association. The same 3×2 table yields the same \(\chi^2\) and df under either design, but the target of the conclusion differs.
4.2 期望计数与 χ² 统计量4.2 Expected Counts and the Chi-Square Statistic
\(\chi^2\) 把每个格子的“观察 − 期望”平方后除以期望再全部相加。除以 E 是标准化:大格子里的 5 个差距不算什么,小格子里的 5 个差距就很大。
\(\chi^2\) squares every cell's "observed − expected", divides by the expected count, and adds. Dividing by E standardises: a gap of 5 is trivial in a large cell and huge in a small one.
Random 随机Random
数据来自随机抽样或随机分配的实验。没有随机性,P 值无从解释。
Data come from a random sample or a randomized experiment; without randomness the P-value means nothing.
Large Counts 大计数Large Counts
所有期望计数 ≥ 5(不是观察计数!)。有格子不满足时,可合并类别后重做,或改用精确检验。
All expected counts ≥ 5 — not the observed counts. If a cell fails, combine categories or use an exact test.
Independent 独立Independent
个体观测相互独立;不放回抽样时检查 10% 条件。同一个人贡献两个格子(例如同一顾客买了两种酒)会破坏这一条。
Individual observations are independent; check the 10% condition without replacement. One person filling two cells (buying two wines) violates this.
右侧尾部Right tail only
\(\chi^2\) 只取非负值、右偏;P 值永远是右尾面积。df 越大曲线越靠右、越对称。
\(\chi^2\) is non-negative and right-skewed; the P-value is always a right-tail area. Larger df shifts the curve right and makes it more symmetric.
4.3 GOF:这个分布对吗?(M&M 的颜色)4.3 GOF: Is This the Right Distribution? (M&M Colours)
GOF 只比较“一个变量的各类计数”与“H0 声称的比例 × n”。若每个颜色都单独做一次 z 检验,就会掉进第 21 讲说过的多重比较陷阱;卡方一次比较全部类别。
GOF compares the counts in the categories of one variable with "the claimed proportions × n". Testing each colour with its own z test would fall into the multiple-comparisons trap from Lecture 21; chi-square compares all categories at once.
Mars 公司声称牛奶巧克力的颜色比例为:蓝 24%、橙 20%、绿 16%、黄 14%、红 13%、棕 13%。一袋随机抽取的 60 颗糖里,实际计数是蓝 9、橙 8、绿 12、黄 15、红 10、棕 6。若声称成立,期望计数应为 \(60\times\) 各比例:14.4、12、9.6、8.4、7.8、7.8,全部 ≥ 5,大计数条件满足。
Mars claims milk-chocolate colours occur in the proportions blue 24%, orange 20%, green 16%, yellow 14%, red 13%, brown 13%. A random bag of 60 candies gives counts 9, 8, 12, 15, 10, 6. Under the claim the expected counts are \(60\times\) each proportion: 14.4, 12, 9.6, 8.4, 7.8, 7.8 — all ≥ 5, so Large Counts holds.
| 颜色Colour | 观察 OObserved O | 声称比例Claimed p | 期望 EExpected E | \((O-E)^2/E\)\((O-E)^2/E\) |
|---|---|---|---|---|
| Blue 蓝 | 9 | 0.24 | 14.4 | 2.025 |
| Orange 橙 | 8 | 0.20 | 12.0 | 1.333 |
| Green 绿 | 12 | 0.16 | 9.6 | 0.600 |
| Yellow 黄 | 15 | 0.14 | 8.4 | 5.186 |
| Red 红 | 10 | 0.13 | 7.8 | 0.621 |
| Brown 棕 | 6 | 0.13 | 7.8 | 0.415 |
| 合计Total | 60 | 1.00 | 60.0 | 10.180 |
Large Counts 条件要求的是期望计数都 ≥ 5。一个观察计数只有 2 的格子,只要它对应的期望计数是 8,条件仍然满足;反过来,观察计数全是 30,但期望计数里有 3.2,条件就不满足。因为 \(\chi^2\) 的近似理论是在“期望计数足够大”时才成立的。
Large Counts requires every expected count to be ≥ 5. A cell with observed count 2 is fine if its expected count is 8; conversely, all observed counts could be 30 while an expected count of 3.2 makes the condition fail, because the chi-square approximation needs large expected counts.
4.4 双向表:homogeneity 与 association 的完整流程4.4 Two-Way Tables: Homogeneity and Association End to End
双向表里每个格子都是“行变量第 \(i\) 类 + 列变量第 \(j\) 类”的联合计数。期望计数假设“行与列互不影响”,于是 \(E=\frac{\text{行合计}\times\text{列合计}}{\text{总合计}}\);df = \((r-1)(c-1)\)。
Each cell of a two-way table is the joint count of row category \(i\) and column category \(j\). Assuming row and column do not interact gives \(E=\frac{\text{row total}\times\text{column total}}{\text{table total}}\), with df = \((r-1)(c-1)\).
超市实验:随机分配播放无音乐、法国手风琴、意大利弦乐三种背景,记录顾客买法国酒、意大利酒、其他酒的数量。因为三种条件的人数(84、75、84)是研究者事先安排的,这是 homogeneity 检验——比较“酒的种类分布”在三种音乐下是否相同。
A supermarket experiment randomly assigns three music conditions — none, French accordion, Italian strings — and records purchases of French, Italian and other wine. Because the group sizes (84, 75, 84) were fixed by the researchers, this is a homogeneity test: is the distribution of wine type the same under all three conditions?
| 酒的种类 \ 音乐Wine \ Music | 无音乐None | 法国French | 意大利Italian | 合计Total |
|---|---|---|---|---|
| 法国酒French wine | 30 | 39 | 30 | 99 |
| 意大利酒Italian wine | 11 | 1 | 19 | 31 |
| 其他酒Other wine | 43 | 35 | 35 | 113 |
| 合计Total | 84 | 75 | 84 | 243 |
先算条件分布:法国酒在三种音乐下的比例是 30/84 ≈ 0.357、39/75 = 0.520、30/84 ≈ 0.357;意大利酒是 11/84 ≈ 0.131、1/75 ≈ 0.013、19/84 ≈ 0.226。意大利酒在法国音乐下几乎没人买(1.3%),在意大利音乐下升到 22.6%——差异看起来真实存在。
First the conditional distributions: French wine sells at 30/84 ≈ 0.357, 39/75 = 0.520 and 30/84 ≈ 0.357; Italian wine at 11/84 ≈ 0.131, 1/75 ≈ 0.013 and 19/84 ≈ 0.226. Italian wine barely sells under French music (1.3%) but jumps to 22.6% under Italian music — the difference looks real.
“法国酒 / 无音乐”这一格:法国酒合计 99,无音乐合计 84,总合计 243,所以 \(E=\dfrac{99\times84}{243}\approx34.22\)。它的观察值是 30,贡献 \(\dfrac{(30-34.22)^2}{34.22}\approx0.52\)。同理“意大利酒 / 法国音乐”:\(E=\dfrac{31\times75}{243}\approx9.57\),观察值 1,贡献 \(\dfrac{(1-9.57)^2}{9.57}\approx7.67\)——这是全表最大的一块。
For "French wine / no music": French wine totals 99, no-music totals 84, table total 243, so \(E=\dfrac{99\times84}{243}\approx34.22\). The observed 30 contributes \(\dfrac{(30-34.22)^2}{34.22}\approx0.52\). For "Italian wine / French music": \(E=\dfrac{31\times75}{243}\approx9.57\), observed 1, contributing \(\dfrac{(1-9.57)^2}{9.57}\approx7.67\) — the largest single term.
4.5 follow-up 与结论的边界4.5 Follow-up Analysis and the Limits of the Conclusion
显著的 \(\chi^2\) 只说明“至少有一处不同”,不说明差在哪里。follow-up 就是回去看哪一格的 \((O-E)^2/E\) 最大——那才是故事的主角。
A significant \(\chi^2\) says only that something differs, not where. The follow-up goes back to find the cell with the largest \((O-E)^2/E\) — that is where the story is.
如果数据来自一个样本、两个变量(association 检验),即使 P 值极小,也只能说“两个变量有关联”。要谈因果,必须有随机分配——这正是 wine 实验(可以谈因果)与“学历 vs 运动”调查(只能谈关联)的分界线。“学历越高越爱运动”也可能是收入、居住环境、时间安排造成的。
If the data are one sample with two variables (association), even a tiny P-value supports only "the variables are associated". Causation needs random assignment — the line between the wine experiment (causal) and the education-versus-exercise survey (association only). "More educated people exercise more" could reflect income, neighbourhood or schedule.
还有两个易错点:① Ha 的措辞。homogeneity 的备择是“至少两组的分布不同”,不是“所有组都不同”——“所有都相等”的反面只是“存在不相等”。② 双向表的 df 只由形状决定,与样本量无关:3×3 表永远是 4,即使样本量 2430。
Two more traps: ① wording of Ha. For homogeneity the alternative is "at least two distributions differ", not "all differ" — the negation of "all equal" is "some are unequal". ② The df of a two-way table depends only on its shape: a 3×3 table always has df = 4, even with 2 430 observations.
例题精讲Worked Examples
例 1 GOF:出生日真的均匀分布吗?Example 1 GOF: are births evenly spread over the week?
例 2 Association:学历与规律运动有关吗?Example 2 Association: is education related to regular exercise?
| 学历 \ 运动Education \ Exercise | 规律运动Regular | 不规律Not regular | 合计Total |
|---|---|---|---|
| 高中High school | 60 | 60 | 120 |
| 本科College | 80 | 80 | 160 |
| 研究生Graduate | 80 | 40 | 120 |
| 合计Total | 220 | 180 | 400 |
随堂练习Check Your Understanding
卡方的计算不难,难在“选哪种检验”和“结论写到什么程度”。 The arithmetic is easy; what is hard is choosing the test and deciding how far the conclusion may go.
研究者随机抽取 500 名选民,记录其性别与支持的候选人,想判断性别与候选人偏好是否有关。应使用
A researcher randomly samples 500 voters and records gender and preferred candidate, to judge whether gender and candidate preference are related. The correct procedure is
- a卡方拟合优度检验a chi-square goodness-of-fit test
- b卡方同质性检验a chi-square test for homogeneity
- c卡方关联/独立性检验a chi-square test for association/independence
- d两比例 z 检验a two-proportion z test
- 数变量:两个Count variables: two 性别、候选人偏好都是分类变量,且来自同一个 500 人样本。Gender and candidate preference are both categorical, recorded on the same 500 voters. 排除单变量的 GOF。Rule out GOF.
- 看分组方式Check how groups arose 不是事先按性别各抽 250 人再比较候选人分布,而是一次抽样同时问两个问题。Voters were not drawn as fixed groups by gender; one sample was asked both questions. 不是 homogeneity,而是 association。Not homogeneity — association.
- 为什么不是两比例 zWhy not a two-proportion z 候选人多于两个(列数 > 2),两比例 z 只能比较两组的某一个比例。There are more than two candidates (columns > 2), while a two-proportion z compares only two groups on one proportion. c 正确;df = (性别数−1)(候选人数−1)。Option c; df = (genders − 1)(candidates − 1).
| 选项Option | 判断与理由Verdict & reason |
|---|---|
| a | 错。GOF 只处理一个变量的分布,这里有两个变量。Wrong: GOF handles one variable's distribution; here there are two. |
| b | 错。homogeneity 要求各组样本量事先固定(按组抽样或分配),本题不是。Wrong: homogeneity requires group sizes fixed by design; this study did not fix them. |
| c | 对。一个样本、两个分类变量,检验是否独立。Correct: one sample, two categorical variables, testing independence. |
| d | 错。候选人超过两类,两比例 z 不适用。Wrong: more than two categories, so the two-proportion z does not apply. |
一张 4×3 的双向表总合计为 600,其中“第 2 行、第 3 列”这一格所在行合计为 180、列合计为 150。该格的期望计数与整张表的 df 分别是
In a 4×3 two-way table with total 600, the row total for the cell in row 2, column 3 is 180 and its column total is 150. The expected count for that cell and the table's df are
- a45 与 645 and 6
- b45 与 1145 and 11
- c30 与 630 and 6
- d30 与 730 and 7
- 算期望Compute E \[ E=\frac{180\times150}{600}=45 \] 期望计数 45。Expected count 45.
- 算 dfCompute df 4 行 3 列:\((4-1)(3-1)=3\times2=6\)。4 rows, 3 columns: \((4-1)(3-1)=3\times2=6\). df = 6,与 600 无关。df = 6, unrelated to 600.
- 排除常见错算Rule out the usual slips 11 = 4×3 − 1(忘了减 1 的应用对象),7 = 4+3(把加法当乘法),30 = 180×150/900 之类的算错。11 = 4×3 − 1 (wrong subtraction), 7 = 4 + 3 (adding instead of multiplying), 30 comes from a mis-keyed denominator. a 正确。Option a.
| 选项Option | 判断与理由Verdict & reason |
|---|---|
| a | 对。期望 45,df = 3×2 = 6。Correct: E = 45 and df = 3×2 = 6. |
| b | 错。df 不是 4×3−1。Wrong: df is not 4×3−1. |
| c | 错。期望计数算错了,45 才是行×列/总数。Wrong: the expected count is 45, from row × column / total. |
| d | 错。df 不是行列数相加。Wrong: df is not the sum of rows and columns. |
一项随机抽样调查发现“每天喝咖啡”与“失眠”显著相关(\(P<0.001\))。下列结论最恰当的是
A random-sample survey finds "daily coffee drinking" significantly associated with "insomnia" (\(P<0.001\)). The most appropriate conclusion is
- a喝咖啡导致失眠,建议所有人戒咖啡coffee causes insomnia, so everyone should quit coffee
- b在该人群中,喝咖啡与失眠存在关联in this population, coffee drinking and insomnia are associated
- c喝咖啡与失眠无关,因为 P 值只说明抽样误差coffee and insomnia are unrelated, since P measures sampling error
- d有 99.9% 的概率喝咖啡会导致失眠there is a 99.9% probability that coffee causes insomnia
- 先看设计Check the design first “随机抽样调查”只保证样本有代表性,没有随机分配喝不喝咖啡。"Random-sample survey" guarantees a representative sample, not random assignment of coffee drinking. 不能谈因果。Causal language is off the table.
- P 值能说什么What P can say 极小的 P 值说明:如果总体中两者真的独立,抽到这么强的关联几乎不可能。A tiny P-value says: if the variables really were independent, an association this strong would be very unlikely in a sample. 因此有充分证据表明存在关联。Hence convincing evidence of an association.
- 说清可能的混杂Name the plausible confounders 压力大的人既睡不好又靠咖啡提神——压力就是典型的混杂变量。Stressed people both sleep badly and drink more coffee — stress is a textbook confounder. b 正确。Option b.
| 选项Option | 判断与理由Verdict & reason |
|---|---|
| a | 错。观察性研究不能得出因果,更不能给出“所有人戒咖啡”的建议。Wrong: observational data cannot establish causation, still less a universal recommendation. |
| b | 对。只声明关联,并限于被研究的人群。Correct: an association claim, limited to the population studied. |
| c | 错。P 值小正说明关联不是偶然,说“无关”与数据相反。Wrong: a small P-value means the association is unlikely to be chance; "unrelated" contradicts the data. |
| d | 错。P 值不是“因果成立的概率”,也不等于 1 − P。Wrong: a P-value is not the probability of causation, nor is it 1 − P. |
某 2×3 双向表检验得 \(\chi^2=15.2\),df = 2,P ≈ 0.0005。四个格子的 \((O-E)^2/E\) 分别为 0.2、1.1、9.6、4.3。follow-up 应当首先指出
A 2×3 table gives \(\chi^2=15.2\), df = 2, P ≈ 0.0005. The cell contributions \((O-E)^2/E\) are 0.2, 1.1, 9.6 and 4.3. The follow-up should first point to
- a贡献 0.2 的格子,它最接近期望the 0.2 cell, which is closest to expected
- b贡献 9.6 的格子,它对统计量贡献最大the 9.6 cell, which contributes most to the statistic
- c贡献 4.3 的格子,因为它排第二the 4.3 cell, because it ranks second
- d不必 follow-up,P 值已经说明一切no follow-up is needed; the P-value says it all
- 比较贡献值Compare contributions 9.6 远大于其他三项,占 \(\chi^2=15.2\) 的六成以上。9.6 dwarfs the rest, accounting for over 60% of \(\chi^2=15.2\). 主角是 9.6 那一格。The 9.6 cell is the story.
- 补上方向Add the direction 只看贡献值不够,还要说“观察值比期望多(或少)了多少”,这才是可解释的结论。A contribution alone is not enough: state whether the observed count is above or below expected, which makes the finding interpretable. b 正确。Option b.
| 选项Option | 判断与理由Verdict & reason |
|---|---|
| a | 错。贡献最小说明这一格最“正常”,与 follow-up 的目的相反。Wrong: the smallest contribution is the most ordinary cell — the opposite of a follow-up. |
| b | 对。最大贡献 = 最大偏离,是 follow-up 的起点。Correct: the largest contribution is the largest deviation, the starting point of a follow-up. |
| c | 错。第二名不是重点,除非它也有实质解释。Wrong: second place is not the focus unless it also has a substantive story. |
| d | 错。\(\chi^2\) 显著只说“有差异”,说不出差在哪里。Wrong: significance says only that something differs, not where. |
χ² = 10.180 p = 0.0703 df = 5
χ² = 18.279 p = 0.0011 df = 4
本讲小结Summary
- 三种卡方靠数据结构区分:GOF(一个变量、一个样本)、homogeneity(一个变量、多组)、association(两个变量、一个样本)。
- 期望计数:GOF 用 \(np_i\);双向表用 \(\frac{\text{行}\times\text{列}}{\text{总}}\)。统计量 \(\chi^2=\sum\frac{(O-E)^2}{E}\),求和不含合计。
- df:GOF 为 \(k-1\),双向表为 \((r-1)(c-1)\)——只由类别数决定,与样本量无关。
- 条件:Random、Independent、所有期望计数 ≥ 5(不是观察计数)。
- P 值永远取 \(\chi^2\) 分布的右尾;显著只说明“至少一处不同 / 存在关联”。
- follow-up 找 \((O-E)^2/E\) 最大的格子并报方向;观察性数据只能谈关联,随机分配才能谈因果。
- The three chi-square tests are separated by data structure: GOF (one variable, one sample), homogeneity (one variable, several groups), association (two variables, one sample).
- Expected counts: \(np_i\) for GOF; \(\frac{\text{row}\times\text{column}}{\text{total}}\) for two-way tables. Statistic \(\chi^2=\sum\frac{(O-E)^2}{E}\), excluding totals.
- df: \(k-1\) for GOF, \((r-1)(c-1)\) for two-way tables — fixed by the number of categories, not the sample size.
- Conditions: Random, Independent, all expected counts ≥ 5 (not observed counts).
- The P-value is always the right tail of a \(\chi^2\) distribution; significance means only "something differs / an association exists".
- Follow-up: the largest \((O-E)^2/E\), with its direction. Observational data support association only; random assignment supports causation.
回归推断:斜率 β 的置信区间与检验Inference for Regression: Confidence Intervals and Tests for Slope
前面几讲推断的对象是比例、均值;这一次是回归直线的斜率。第 3 讲算出的 LSRL 斜率 \(b\) 只是样本的结果,换一批数据它就会变;真正想知道的是总体(真实)回归线的斜率 \(\beta\)。这一讲把第 22 讲的 t 检验整套搬过来:估计 \(b\)、给出标准误 \(SE_b\)、用 df = n − 2 的 t 分布做区间与检验,并用残差图检查五个条件。它是 AP 统计推断部分的收官。
Earlier lectures inferred a proportion or a mean; now the target is the slope of a regression line. The slope \(b\) you computed in Chapter 3 is a sample result and changes with every sample; what we want is the slope \(\beta\) of the population (true) regression line. This lecture carries over Lecture 22's t machinery: estimate \(b\), attach its standard error \(SE_b\), build intervals and tests with df = n − 2, and check the five conditions through residual plots. It closes the inference half of AP Statistics.
本讲学习目标Learning Objectives
- 说清 \(b\) 是统计量、\(\beta\) 是参数;描述 \(b\) 的抽样分布:中心为 \(\beta\)、标准误 \(SE_b\)、近似正态。
- 检查回归推断的五个条件:Linear、Independent、Normal、Equal variance、Random,并知道用残差图看哪一条。
- 构造并解释斜率的 t 区间 \(b\pm t^{*}SE_b\),df = n − 2。
- 完成斜率的 t 检验 \(t=\dfrac{b-\beta_0}{SE_b}\),P 值来自 df = n − 2 的 t 分布,并能读懂 \(H_0:\beta=0\) 的含义。
- 从计算机输出中读出 \(b\)、\(SE_b\)、\(t\)、\(P\)、\(s\)(残差标准差)与 \(R^2\) 各代表什么。
- 指出外推与“相关不等于因果”在回归推断中的具体表现,并说明 \(R^2\) 小并不妨碍斜率显著。
- Explain that \(b\) is a statistic and \(\beta\) a parameter; describe the sampling distribution of \(b\) — centred at \(\beta\), spread \(SE_b\), approximately Normal.
- CHECK the five conditions for regression inference — Linear, Independent, Normal, Equal variance, Random — and know which residual plot reveals which.
- CONSTRUCT and interpret a t interval for slope, \(b\pm t^{*}SE_b\) with df = n − 2.
- PERFORM a t test for slope, \(t=\dfrac{b-\beta_0}{SE_b}\), with P from a t distribution with df = n − 2, and interpret \(H_0:\beta=0\).
- READ computer output: what \(b\), \(SE_b\), \(t\), \(P\), \(s\) (residual SD) and \(R^2\) each mean.
- IDENTIFY extrapolation and "correlation is not causation" in regression inference, and explain why a small \(R^2\) can coexist with a significant slope.
核心概念Core Concepts
5.1 斜率也是统计量:b 的抽样分布5.1 The Slope Is a Statistic: the Sampling Distribution of b
换一批样本,LSRL 的斜率会变。所以 \(b\) 是随机变量,它有抽样分布:中心是总体斜率 β,分散程度是 SEb,形状近似正态。
Draw a new sample and the LSRL's slope changes. So \(b\) is a random variable with a sampling distribution: centred at the population slope β, spread given by SEb, approximately Normal in shape.
老忠实泉的例子:一个月的 222 次喷发数据算出的总体回归线斜率是 10.36 秒/分钟。如果每次只取 20 次喷发算 LSRL,三次得到的斜率可能是 10.2、7.7、9.5——它们围着 10.36 上下跳。这个“跳动的规律”就是 \(b\) 的抽样分布。用软件重复抽 1000 次,斜率的平均值 10.32 接近 10.36,标准差约 1.30。
Old Faithful: with all 222 eruptions in a month, the population regression line has slope 10.36 seconds per minute. Taking three separate samples of 20 eruptions yields slopes like 10.2, 7.7 and 9.5 — jumping around 10.36. That pattern of jumps is the sampling distribution of \(b\). Simulating 1000 samples gives a mean slope of 10.32, close to 10.36, with SD about 1.30.
还要记住:截距 \(a\) 也是统计量,它估计总体截距 \(\alpha\)。但 AP 的推断几乎总是围绕斜率进行,因为斜率是“每增加 1 单位 x,y 平均变化多少”,它才是关系强弱的核心。
Remember too that the intercept \(a\) is also a statistic estimating the population intercept \(\alpha\). AP inference, however, almost always targets the slope, because the slope is "how much y changes on average per unit of x" — the heart of the relationship.
5.2 五个条件:LINER 与三条残差图5.2 Five Conditions: LINER and Three Residual Plots
回归推断的条件可以记成 LINER:Linear、Independent、Normal、Equal variance、Random。残差图一次性检查 Linear 与 Equal variance。
The conditions are remembered as LINER: Linear, Independent, Normal, Equal variance, Random. A single residual plot checks Linear and Equal variance.
| 条件Condition | 含义Meaning | 怎么查How to check | 违反时什么样A violation looks like |
|---|---|---|---|
| Linear 线性 | 每个 x 处的平均响应落在真实回归线上the mean response at each x lies on the true line | 散点图 + 残差图scatterplot + residual plot | 残差图出现弯曲(U 形或拱形)residuals form a curve (U or arch) |
| Independent 独立 | 个体观测相互独立individual observations are independent | 看数据如何产生(随机抽样/分配、10% 条件)how the data were produced (random sample/assignment, 10% condition) | 同一对象被重复测量、时间序列自相关repeated measurements on one subject; serial correlation over time |
| Normal 正态 | 固定 x 时 y 服从正态分布for fixed x, y is Normally distributed | 残差的直方图或正态概率图histogram or Normal probability plot of residuals | 残差直方图强烈偏斜或有离群点strong skew or outliers in the residual histogram |
| Equal variance 等方差 | 残差的分散程度在所有 x 处相同the spread of residuals is the same at every x | 残差图的上下宽度vertical spread in the residual plot | “喇叭口”——x 越大残差越散a funnel — residuals widen as x grows |
| Random 随机 | 数据来自随机样本或随机分配的实验data come from a random sample or randomized experiment | 看研究设计read the study design | 方便抽样、非随机分组convenience sampling, non-random groups |
残差图只直接回答 Linear 与 Equal variance;Normal 要看残差的直方图或正态概率图;Independent 与 Random 靠研究设计,图看不出来。AP 的评分要求“逐条点名”,只写一句“条件满足”拿不到分。
The residual plot speaks directly to Linear and Equal variance only. Normal needs a histogram or Normal probability plot of residuals; Independent and Random come from the design, not the picture. AP rubrics require naming each condition; a blanket "conditions met" earns nothing.
5.3 斜率的置信区间:b ± t* SEb5.3 A Confidence Interval for Slope: b ± t* SEb
区间形式与前面完全一样:估计值 ± 临界值 × 标准误,只是这里 df = n − 2(估计了两条直线参数 a 与 b,用掉两个自由度)。
The form is the familiar one: estimate ± critical value × standard error, only now df = n − 2 (two degrees of freedom are spent estimating a and b).