这份讲义涵盖主题 4:进阶概率统计(Further Probability & Statistics)。它增加连续分布、小样本推断、卡方和非参数检验,以及概率母函数。
进阶概率与统计
A-Level 进阶数学 · 第 4 主题
4.1
连续随机变量
大纲
| Candidates should be able to: | Notes and examples |
|---|---|
| use a probability density function which may be defined piecewise | |
| use the general result $\text{E}(g(X)) = \int f(x)g(x) \, \mathrm{d}x$ where $f(x)$ is the probability density function of the continuous random variable $X$ and $g(X)$ is a function of $X$ | |
| understand and use the relationship between the probability density function (PDF) and the cumulative distribution function (CDF), and use either to evaluate probabilities or percentiles | |
| use cumulative distribution functions (CDFs) of related variables in simple cases. | e.g. given the CDF of a variable $X$, find the CDF of a related variable $Y$, and hence its PDF, e.g. where $Y = X^3$. |
来源:剑桥国际大纲
一个连续变量 $X$ 由一个概率密度函数(probability density function)$f(x)$ 描述,它可能被分段定义。一个范围上的概率是 $f$ 下的面积,而 $X$ 的任何函数的平均值是

累积分布函数(cumulative distribution function)$F(x) = P(X \leqslant x)$ 是累加的总数:$F(x) = \displaystyle\int_{-\infty}^{x} f(t)\,dt$,而 $f(x) = F'(x)$。用 $F$ 求概率和百分位数(percentiles,例如中位数(median)解 $F(x) = 0.5$)。

例题。 一个变量对 $0 \leqslant x \leqslant 2$ 有 $f(x) = \tfrac12 x$。求中位数。
累积分布函数是 $F(x) = \displaystyle\int_0^x \tfrac12 t\,dt = \tfrac14 x^2$。令 $F(m) = 0.5$:
一个相关变量的分布。 若 $Y=g(X)$,通过它的累积函数求 $Y$ 的分布。对 $Y=X^2$:$F_Y(y)=P(X^2\leqslant y)=P(-\sqrt y\leqslant X\leqslant\sqrt y)=F_X(\sqrt y)-F_X(-\sqrt y)$,然后微分得 $f_Y=F_Y'$。当 $g$ 单调递增时有一个捷径,$F_Y(y)=F_X\big(g^{-1}(y)\big)$。
例题。 用 $f_X(x)=\tfrac12 x$ 在 $[0,2]$ 上(所以 $F_X(x)=\tfrac14 x^2$),令 $Y=X^2$。对 $0\leqslant y\leqslant 4$,$F_Y(y)=F_X(\sqrt y)=\tfrac14 y$,所以 $f_Y(y)=F_Y'(y)=\tfrac14$——就是说 $Y$ 在 $[0,4]$ 上均匀分布。
Continuous random variables
P(a < X < b) = ∫ f(x) dx
For a continuous variable, probability is the area under the density curve.
| 英文 | 中文 | 拼音 |
|---|---|---|
| probability density function | 概率密度函数 | gài lǜ mì dù hán shù |
| cumulative distribution function | 累积分布函数 | lěi jī fēn bù hán shù |
| percentiles | 百分位数 | bǎi fēn wèi shù |
| median | 中位数 | zhōng wèi shù |
4.2
利用正态分布与t分布的推断
大纲
| Candidates should be able to: | Notes and examples |
|---|---|
| formulate hypotheses and apply a hypothesis test concerning the population mean using a small sample drawn from a normal population of unknown variance, using a t-test | |
| calculate a pooled estimate of a population variance from two samples | Calculations based on either raw or summarised data may be required. |
| formulate hypotheses concerning the difference of population means, and apply, as appropriate: - a 2-sample t-test - a paired sample t-test - a test using a normal distribution | The ability to select the test appropriate to the circumstances of a problem is expected. |
| determine a confidence interval for a population mean, based on a small sample from a normal population with unknown variance, using a t-distribution | |
| determine a confidence interval for a difference of population means, using a t-distribution or a normal distribution, as appropriate. |
来源:剑桥国际大纲

当一个样本小而总体方差未知时,把你的假设检验(hypothesis test)建立在 $t$ 分布而不是正态上。同样的思想给出平均值的一个置信区间(confidence interval):

例题。 一个 $n = 10$ 的样本有平均值 $\bar{x} = 50$ 和标准差 $s = 4$。求平均值的一个 $95\%$ 置信区间(对 $9$ 个自由度用 $t = 2.262$)。
Why small samples need t instead of z
With $\sigma$ unknown you use $t$, and $t$ has heavier tails than the normal (drawn dashed behind it) — so its critical values are larger and the interval is wider. At the worked example's $9$ degrees of freedom the widget reads $t^* = 2.262$, exactly the table value used above. Sweep df up and $t$ collapses onto the normal.
The normal distribution
Shade a tail to find a probability — the basis of confidence intervals and hypothesis tests.
| 英文 | 中文 | 拼音 |
|---|---|---|
| hypothesis test | 假设检验 | jiǎ shè jiǎn yàn |
| confidence interval | 置信区间 | zhì xìn qū jiān |
| pooled estimate | 合并估计 | hé bìng gū jì |
4.3
卡方检验
大纲
| Candidates should be able to: | Notes and examples |
|---|---|
| fit a theoretical distribution, as prescribed by a given hypothesis, to given data | Questions will not involve lengthy calculations. |
| use a $\chi^2$-test, with the appropriate number of degrees of freedom, to carry out the corresponding goodness of fit analysis | Classes should be combined so that each expected frequency is at least 5. |
| use a $\chi^2$-test, with the appropriate number of degrees of freedom, for independence in a contingency table. | Yates’ correction is not required. Where appropriate, either rows or columns should be combined so that the expected frequency in each cell is at least 5. |
来源:剑桥国际大纲
一个 $\chi^2$ 检验(卡方检验(chi-squared test))把观察计数 $O$ 与一个理论分布(theoretical distribution)的预期计数 $E$ 比较:

例题。 四个等可能的类别给出观察计数 $20, 30, 25, 25$(所以每个预期计数是 $25$)。在 $5\%$ 水平检验拟合。
The chi-squared distribution and its 5% tail
The worked example on this page gives $\chi^2 = 2$ with $3$ degrees of freedom against a table value of $7.815$ — the widget reproduces both. Drag df to see why the critical value changes with the number of categories.
Chi-squared test route
Follow observed and expected counts to a test decision.
| 英文 | 中文 | 拼音 |
|---|---|---|
| chi-squared test | 卡方检验 | kǎ fāng jiǎn yàn |
| theoretical distribution | 理论分布 | lǐ lùn fēn bù |
| degrees of freedom | 自由度 | zì yóu dù |
| goodness of fit | 拟合优度 | nǐ hé yōu dù |
| independence | 独立性 | dú lì xìng |
| contingency table | 列联表 | liè lián biǎo |
4.4
非参数检验
大纲
| Candidates should be able to: | Notes and examples |
|---|---|
| understand the idea of a non-parametric test and appreciate situations in which such a test might be useful | e.g. when sampling from a population which cannot be assumed to be normally distributed. |
| understand the basis of the sign test, the Wilcoxon signed-rank test and the Wilcoxon rank-sum test | Including knowledge that Wilcoxon tests are valid only for symmetrical distributions. |
| use a single-sample sign test and a single-sample Wilcoxon signed-rank test to test a hypothesis concerning a population median | Including the use of normal approximations where appropriate. Questions will not involve tied ranks or observations equal to the population median value being tested. |
| use a paired-sample sign test, a Wilcoxon matched-pairs signed-rank test and a Wilcoxon rank-sum test, as appropriate, to test for identity of populations. | Including the use of normal approximations where appropriate. Questions will not involve tied ranks or zero‑difference pairs. |
来源:剑桥国际大纲
一个非参数检验(non-parametric test)不假设数据是正态的,所以当那个假设失败时它有用。基本的是:
- 符号检验(sign test):数有多少值落在一个提议的中位数之上和之下,并用一个二项模型检验那些计数;
- 威尔科克森符号秩检验(Wilcoxon signed-rank test,配对数据的匹配对检验),它也用差的大小,而不只是它们的符号;
- 威尔科克森秩和检验(Wilcoxon rank-sum test),用于比较两个分开的样本。

例题。 检验一个中位数是否是 $5$。在一个 $10$ 个值的样本中(没有等于 $5$ 的),$9$ 个在 $5$ 之上而 $1$ 个在它之下。在 $5\%$ 水平检验(双尾)。
在 $H_0$(中位数 $= 5$)下,之上的数目跟随 $B(10, 0.5)$。观察结果($9$ 个在上)是极端的,所以求 $P(X \geq 9) = \binom{10}{9}(0.5)^{10} + (0.5)^{10} = \dfrac{11}{1024} = 0.0107$。对一个双尾检验与 $\tfrac{1}{2}(5\%) = 0.025$ 比较。因为 $0.0107 < 0.025$,拒绝 $H_0$:有证据表明中位数不是 $5$。
Non-parametric test chooser
Choose the rank-based test that matches the data situation.
| 英文 | 中文 | 拼音 |
|---|---|---|
| non-parametric test | 非参数检验 | fēi cān shù jiǎn yàn |
| sign test | 符号检验 | fú hào jiǎn yàn |
| Wilcoxon signed-rank test | 威尔科克森符号秩检验 | wēi ěr kē kè sēn fú hào zhì jiǎn yàn |
| Wilcoxon rank-sum test | 威尔科克森秩和检验 | wēi ěr kē kè sēn zhì hé jiǎn yàn |
4.5
概率母函数
大纲
| Candidates should be able to: | Notes and examples |
|---|---|
| understand the concept of a probability generating function (PGF) and construct and use the PGF for given distributions | Including the discrete uniform, binomial, geometric and Poisson distributions. |
| use formulae for the mean and variance of a discrete random variable in terms of its PGF, and use these formulae to calculate the mean and variance of a given probability distribution | |
| use the result that the PGF of the sum of independent random variables is the product of the PGFs of those random variables. |
来源:剑桥国际大纲

一个离散变量 $X$ 的概率母函数(probability generating function)是
例题。 $X$ 有 $P(X=0) = 0.5$、$P(X=1) = 0.3$、$P(X=2) = 0.2$。用 PGF 求 $E(X)$。
这里 $G(t) = 0.5 + 0.3t + 0.2t^2$,所以 $G'(t) = 0.3 + 0.4t$ 且

Probability generating function lab
G(x) = p0 + p1 x + p2 x^2 + ...
Change x and see how a PGF stores probabilities in powers of x.
| 英文 | 中文 | 拼音 |
|---|---|---|
| probability generating function | 概率母函数 | gài lǜ mǔ hán shù |
| Further Probability & Statistics | 进阶概率统计 | jìn jiē gài lǜ tǒng jì |
4.5
考试技巧
- 对于一个连续型随机变量,pdf 在它的范围上积分为 $1$,而 $E(X) = \int x f(x)\,dx$。
- 当样本小而总体方差未知时用 $t$ 分布;陈述自由度。
- 对一个卡方检验计算 $\sum (O-E)^2/E$、与正确自由度的临界值比较,并合并 $E < 5$ 的类别。
- 为每个检验陈述 $H_0$ 和 $H_1$ 并结合上下文给出结论。
本主题的互动课程
逐步学习,并即时检测练习。