跳到主要内容

概率与统计2

A-Level 数学 · 第 6 主题

训练
讲义 词汇表

这份讲义涵盖主题 6:概率统计(Probability & Statistics)2。它增加泊松模型、组合随机变量、连续分布,以及估计和检验的思想。

6.1

泊松分布

大纲
Candidates should be able to: Notes and examples
• use formulae to calculate probabilities for the distribution $\text{Po}(\lambda)$
• use the fact that if $X \sim \text{Po}(\lambda)$ then the mean and variance of $X$ are each equal to $\lambda$ Proofs are not required.
• understand the relevance of the Poisson distribution to the distribution of random events, and use the Poisson distribution as a model
• use the Poisson distribution as an approximation to the binomial distribution where appropriate The conditions that $n$ is large and $p$ is small should be known; $n > 50$ and $np < 5$, approximately.
• use the normal distribution, with continuity correction, as an approximation to the Poisson distribution where appropriate. The condition that $\lambda$ is large should be known; $\lambda > 15$, approximately.

来源:剑桥国际大纲

人们在一个航站楼排队等候
随机到达一个队列的人跟随一个泊松分布。

泊松分布(Poisson distribution)$X \sim \mathrm{Po}(\lambda)$ 为一个固定区间中随机事件的数目建模,当事件以一个稳定的平均速率 $\lambda$ 发生时:

$$P(X = r) = e^{-\lambda}\frac{\lambda^r}{r!}.$$
对于一个泊松变量,平均值和方差都等于 $\lambda$。当 $n$ 大且 $p$ 小时,泊松分布是二项分布的一个好近似(approximation)。当 $\lambda$ 大时,正态分布(带连续性校正)近似泊松。

例题。 $X \sim \mathrm{Po}(3)$。求 $P(X = 2)$

$$P(X = 2) = e^{-3}\frac{3^2}{2!} = e^{-3}\times 4.5 = 0.224.$$

平均值 3 的泊松分布的一个条形图,向右倾斜
泊松分布 $\mathrm{Po}(3)$:对于一个泊松变量,平均值和方差都等于 $\lambda$
探索

The Poisson distribution

Change the mean λ. Poisson models the number of random events in a fixed interval — rare events give a skewed shape.

词汇表 训练
英文 中文 拼音
Poisson distribution 泊松分布 pō sōng fēn bù
approximation 近似 jìn sì
6.2

随机变量的线性组合

大纲
Candidates should be able to: Notes and examples
• use, when solving problems, the results that – $\text{E}(aX + b) = a\text{E}(X) + b$ and $\text{Var}(aX + b) = a^2\text{Var}(X)$$\text{E}(aX + bY) = a\text{E}(X) + b\text{E}(Y)$$\text{Var}(aX + bY) = a^2\text{Var}(X) + b^2\text{Var}(Y)$ for independent $X$ and $Y$ – if $X$ has a normal distribution then so does $aX + b$ – if $X$ and $Y$ have independent normal distributions then $aX + bY$ has a normal distribution – if $X$ and $Y$ have independent Poisson distributions then $X + Y$ has a Poisson distribution. Proofs of these results are not required.

来源:剑桥国际大纲

当你用一个线性规则改变一个变量时,期望(expectation,平均)和方差(variance)遵循这些规则:

$$E(aX + b) = aE(X) + b, \qquad \mathrm{Var}(aX + b) = a^2\,\mathrm{Var}(X).$$
对于两个独立变量 $X$$Y$:
$$E(aX + bY) = aE(X) + bE(Y), \qquad \mathrm{Var}(aX + bY) = a^2\,\mathrm{Var}(X) + b^2\,\mathrm{Var}(Y).$$
两个有用的事实:若 $X$ 有一个正态分布(normal distribution)则 $aX + b$ 也有;而独立泊松变量的和又是泊松。

例题。 $X$ 有平均值 $5$ 和方差 $4$。求 $E(3X - 1)$$\mathrm{Var}(3X - 1)$

$$E(3X - 1) = 3(5) - 1 = 14, \qquad \mathrm{Var}(3X - 1) = 3^2 \times 4 = 36.$$

探索

Linear combination lab

E(aX + b) = aE(X) + b

Change a scaling factor and see how the expected value scales.

词汇表 训练
英文 中文 拼音
expectation 期望 qī wàng
variance 方差 fāng chà
normal distribution 正态分布 zhèng tài fēn bù
6.3

连续随机变量

大纲
Candidates should be able to: Notes and examples
• understand the concept of a continuous random variable, and recall and use properties of a probability density function For density functions defined over a single interval only; the domain may be infinite, e.g. $\frac{3}{x^4}$ for $x \geqslant 1$.
• use a probability density function to solve problems involving probabilities, and to calculate the mean and variance of a distribution. Including location of the median or other percentiles of a distribution by direct consideration of an area using the density function. Explicit knowledge of the cumulative distribution function is not included.

来源:剑桥国际大纲

一个连续型随机变量(continuous random variable)能取一个范围内的任何值。它的概率来自一个概率密度函数(probability density function)$f(x)$,有两个关键的性质:

$$f(x) \geqslant 0, \qquad \int_{-\infty}^{\infty} f(x)\,dx = 1.$$
一个概率是 $f$ 下的面积,而平均值通过积分求得:
$$P(a < X < b) = \int_a^b f(x)\,dx, \qquad E(X) = \int_{-\infty}^{\infty} x\,f(x)\,dx.$$

累积分布函数(cumulative distribution function)是 $F(x) = P(X \leqslant x) = \int_{-\infty}^{x} f(t)\,dt$;中位数(median)解 $F(m) = 0.5$,而其他百分位数(percentiles)解 $F(x) = p$

一条密度曲线,a 和 b 之间的区域被着色为一个概率
对于一个连续变量,概率 $P(a$a$$b$ 之间 $f(x)$ 下的面积。

例题。 一个连续变量对 $0 \leqslant x \leqslant 2$$f(x) = \tfrac12 x$(其他地方为 $0$)。求 $E(X)$

$$E(X) = \int_0^2 x\cdot\tfrac12 x\,dx = \int_0^2 \tfrac12 x^2\,dx = \left[\tfrac{x^3}{6}\right]_0^2 = \frac{8}{6} = \frac{4}{3}.$$

方差(variance)用同样的思路,$\mathrm{Var}(X)=\displaystyle\int_{-\infty}^{\infty}x^2 f(x)\,dx-\big(E(X)\big)^2$。对同样的 $f(x)=\tfrac12 x$$[0,2]$ 上:$\displaystyle\int_0^2 x^2\cdot\tfrac12 x\,dx=\left[\tfrac{x^4}{8}\right]_0^2=2$,所以 $\mathrm{Var}(X)=2-\left(\tfrac43\right)^2=2-\tfrac{16}{9}=\tfrac{2}{9}$

探索

Area = probability

P(a < X < b) = ∫ f(x) dx

For a continuous variable, probability is the area under the density curve between two values.

词汇表 训练
英文 中文 拼音
continuous random variable 连续型随机变量 lián xù xíng suí jī biàn liàng
probability density function 概率密度函数 gài lǜ mì dù hán shù
cumulative distribution function 累积分布函数 lěi jī fēn bù hán shù
median 中位数 zhōng wèi shù
percentiles 百分位数 bǎi fēn wèi shù
6.4

抽样与估计

大纲
Candidates should be able to: Notes and examples
• understand the distinction between a sample and a population, and appreciate the necessity for randomness in choosing samples
• explain in simple terms why a given sampling method may be unsatisfactory Including an elementary understanding of the use of random numbers in producing random samples. Knowledge of particular sampling methods, such as quota or stratified sampling, is not required.
• recognise that a sample mean can be regarded as a random variable, and use the facts that $\text{E}(\overline{X}) = \mu$ and that $\text{Var}(\overline{X}) = \frac{\sigma^2}{n}$
• use the fact that $\overline{X}$ has a normal distribution if $X$ has a normal distribution
• use the Central Limit Theorem where appropriate Only an informal understanding of the Central Limit Theorem (CLT) is required; for large sample sizes, the distribution of a sample mean is approximately normal.
• calculate unbiased estimates of the population mean and variance from a sample, using either raw or summarised data Only a simple understanding of the term 'unbiased' is required, e.g. that although individual estimates will vary the process gives an accurate result 'on average'.
• determine and interpret a confidence interval for a population mean in cases where the population is normally distributed with known variance or where a large sample is used
• determine, from a large sample, an approximate confidence interval for a population proportion.

来源:剑桥国际大纲

一大群人
统计研究一个样本以了解一个整个总体。

一个样本(sample)是从整个总体(population)选出的一个小群。一个随机样本需要随机性(randomness),使每个成员有一个被选中的公平机会。

有些方法不令人满意,因为它们是有偏(biased)的:只抽志愿者,或最先到达的 20 个人,会过度代表某些类型的人。一个真正随机的样本用随机数——给总体的每个成员编号,然后抽号(从一张表或一个生成器)来决定谁在样本里。

样本平均值 $\bar{X}$ 本身是一个随机变量,带

$$E(\bar{X}) = \mu, \qquad \mathrm{Var}(\bar{X}) = \frac{\sigma^2}{n}.$$
中心极限定理(Central Limit Theorem),对于一个大样本 $\bar{X}$ 近似正态,无论总体的形状如何。

一条偏斜的总体曲线和样本平均值窄得多的钟形,在同一个中心之上
无论总体的形状如何,样本平均值 $\bar{X}$ 有一个窄的、近乎正态的分布,以 $\mu$ 为中心。

从一个样本你能找到总体平均值和方差的无偏估计(unbiased estimates)。一个置信区间(confidence interval)给出一个可能包含真实平均值的范围。当总体是正态、$\sigma$ 已知(或样本大)时,一个 $95\%$ 的区间是

$$\bar{x} \pm 1.96\,\frac{\sigma}{\sqrt{n}}.$$

一条数轴,显示中间的样本平均值和向每一侧伸出的区间
一个 $95\%$ 置信区间在样本平均值每一侧伸出 $1.96$ 个标准误。

你也能从一个大样本找到一个总体比例(population proportion)的置信区间。

例题。 一个 $n = 64$ 的样本有平均值 $\bar{x} = 50$,来自一个 $\sigma = 8$ 的总体。求总体平均值的一个 $95\%$ 置信区间。

$$50 \pm 1.96\times\frac{8}{\sqrt{64}} = 50 \pm 1.96 \;\Rightarrow\; (48.0,\ 52.0).$$

探索

The sampling distribution

X̄ ~ N(μ, σ²/n)

By the Central Limit Theorem, sample means follow a normal curve — narrower for bigger samples.

词汇表 训练
英文 中文 拼音
sample 样本 yàng běn
population 总体 zǒng tǐ
randomness 随机性 suí jī xìng
biased 有偏 yǒu piān
Central Limit Theorem 中心极限定理 zhōng xīn jí xiàn dìng lǐ
unbiased estimates 无偏估计 wú piān gū jì
confidence interval 置信区间 zhì xìn qū jiān
population proportion 总体比例 zǒng tǐ bǐ lì
6.5

假设检验

大纲
Candidates should be able to: Notes and examples
• understand the nature of a hypothesis test, the difference between one-tailed and two-tailed tests, and the terms null hypothesis, alternative hypothesis, significance level, rejection region (or critical region), acceptance region and test statistic Outcomes of hypothesis tests are expected to be interpreted in terms of the contexts in which questions are set.
• formulate hypotheses and carry out a hypothesis test in the context of a single observation from a population which has a binomial or Poisson distribution, using – direct evaluation of probabilities – a normal approximation to the binomial or the Poisson distribution, where appropriate
• formulate hypotheses and carry out a hypothesis test concerning the population mean in cases where the population is normally distributed with known variance or where a large sample is used
• understand the terms Type I error and Type II error in relation to hypothesis tests
• calculate the probabilities of making Type I and Type II errors in specific situations involving tests based on a normal distribution or direct evaluation of binomial or Poisson probabilities.

来源:剑桥国际大纲

一个假设检验(hypothesis test)用样本数据来判断一个断言。你设立两个陈述:原假设(null hypothesis)$H_0$(被检验的断言,通常是"没有变化")和备择假设(alternative hypothesis)$H_1$(你反而怀疑的)。若 $H_1$ 指向一个方向(例如 $\mu > 50$)测试是单尾(one-tailed),若它允许两个方向($\mu \neq 50$)则是双尾(two-tailed)。

你固定一个显著性水平(significance level,常常 $5\%$)、从数据算出一个检验统计量(test statistic),并看它是否落入拒绝域(rejection region,也叫临界域);若是你拒绝 $H_0$,否则统计量在接受域中。

一条标准正态曲线,超过正负 1.96 的两个尾都被着色为拒绝域
一个 $5\%$ 的双尾测试只在检验统计量落入超过 $\pm1.96$ 的一个着色的尾时才拒绝 $H_0$

两个错误可能发生:一个第一类错误(Type I error)是当 $H_0$ 实际为真时拒绝它;一个第二类错误(Type II error)是当 $H_0$ 实际为假时接受它。你能从拒绝域求它们的概率:$P(\text{第一类})=P(\text{统计量在拒绝域}\mid H_0)$——这等于显著性水平——而 $P(\text{第二类})=P(\text{统计量在接受域}\mid H_1$ 在一个给定值处为真$)$,从二项、泊松或正态分布计算。

例题。 一个总体被断言有平均值 $50$,带 $\sigma = 8$。一个 $n = 64$ 的样本给出 $\bar{x} = 52$。在 $5\%$ 水平检验平均值是否已改变。

$H_0\!: \mu = 50$$H_1\!: \mu \neq 50$(双尾)。检验统计量是

$$z = \frac{\bar{x} - \mu}{\sigma/\sqrt{n}} = \frac{52 - 50}{8/8} = 2.$$
$5\%$(双尾)的临界值是 $1.96$。因为 $2 > 1.96$,你拒绝 $H_0$:有证据表明平均值已改变。

例题(一个二项检验)。 一枚硬币被声称是公平的,但被怀疑正面落得太少:$H_0\!:p=0.5$,$H_1\!:p<0.5$。在 $n=30$ 次投掷里你看到 $X=9$ 个正面。在 $H_0$ 下,$X\sim B(30,0.5)$,所以单尾尾概率是

$$P(X\leqslant 9)=\sum_{k=0}^{9}\binom{30}{k}(0.5)^{30}\approx 0.021.$$
因为 $0.021<0.05$,拒绝 $H_0$:硬币看来对正面有偏。(对大的 $n$,二项用一个正态近似;对稀有事件一个泊松检验同样工作。而这里,若规则是"当 $X\leqslant 9$ 时拒绝",那么 $P(\text{第一类})=P(X\leqslant 9\mid p=0.5)\approx0.021$。)

探索

The rejection region

reject H₀ if z < −z*

The shaded tail is the rejection region — if the test statistic lands there, reject H₀.

词汇表 训练
英文 中文 拼音
hypothesis test 假设检验 jiǎ shè jiǎn yàn
null hypothesis 原假设 yuán jiǎ shè
alternative hypothesis 备择假设 bèi zé jiǎ shè
one-tailed 单尾 dān wěi
two-tailed 双尾 shuāng wěi
significance level 显著性水平 xiǎn zhù xìng shuǐ píng
test statistic 检验统计量 jiǎn yàn tǒng jì liàng
rejection region 拒绝域 jù jué yù
Type I error 第一类错误 dì yī lèi cuò wù
Type II error 第二类错误 dì èr lèi cuò wù
Probability & Statistics 概率统计 gài lǜ tǒng jì
6.5

考试技巧

  • 对稀有的、随机的、独立的事件用泊松分布;它的平均值等于它的方差($= \lambda$)。
  • 当组合独立随机变量时,方差相加(它们从不相减)。
  • 对于一个假设检验,陈述 $H_0$$H_1$、显著性水平、检验统计量,以及一个结合上下文的结论。
  • 对于一个置信区间,用正确的 $z$(或 $t$)值并用文字解释它。

本主题的互动课程

逐步学习,并即时检测练习。

A-Level 数学的更多主题

登录或创建账号

IGCSE, A-Level & AP