Probability generating functions · 概率生成函数
| English | 中文 | Pinyin · 拼音 |
|---|---|---|
| discrete distribution/dɪˈskriːt ˌdɪstrɪˈbjuːʃn/ | 离散分布 | lí sàn fēn bù |
| probability generating function/ˌprɒbəˈbɪlɪti ˈdʒenəreɪtɪŋ ˈfʌŋkʃn/ | 概率母函数 | gài lǜ mǔ hán shù |
| coefficient/ˌkəʊɪˈfɪʃənt/ | 系数 | xì shù |
| variance/ˈveərɪəns/ | 方差 | fāng chà |
| derivative/dɪˈrɪvətɪv/ | 导数 | dǎo shù |
| independent/ˌɪndɪˈpendənt/ | 独立 | dú lì |
A distribution in a single function
- A discrete distribution 离散分布 is a list of probabilities — clumsy to manipulate.
- A probability generating function 概率母函数 (PGF) packs the whole list into one tidy function, turning hard probability sums into easy calculus.
一个函数中的一个分布
- 一个离散分布是一列概率——操作起来笨拙。
- 一个概率生成函数(PGF)(probability generating function)把整个列表打包进一个整洁的函数,把困难的概率求和变成容易的微积分。
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. · 改变 x 并观察 PGF 如何将概率存储在 x 的幂次中。
Defining the PGF
- For a discrete variable $X$ taking values $0, 1, 2, \dots$:
- The coefficient 系数 of $t^x$ is exactly $P(X = x)$ — the function encodes the distribution.
A probability generating function stores all the probabilities as coefficients
定义 PGF
- 对一个取值 $0, 1, 2, \dots$ 的离散变量 $X$:
- $t^x$ 的系数恰好是 $P(X = x)$——该函数编码了分布。

概率生成函数把所有概率作为系数存储起来
The probability generating function of X is defined as: · X 的概率生成函数定义为:
G(t) = E(tˣ) = Σ P(X=x) tˣ.
Mean and variance 方差 from derivatives 导数
- Differentiate and evaluate at $t = 1$:
Worked example. $G(t) = 0.5 + 0.3t + 0.2t^2$. Then $G'(t) = 0.3 + 0.4t$, so $E(X) = G'(1) = 0.3 + 0.4 = 0.7$.
从导数得均值和方差
- 求导并在 $t = 1$ 处求值:
例题。 $G(t) = 0.5 + 0.3t + 0.2t^2$。那么 $G'(t) = 0.3 + 0.4t$,所以 $E(X) = G'(1) = 0.3 + 0.4 = 0.7$。
X has G(t) = 0.5 + 0.3t + 0.2t². Since E(X) = G′(1) and G′(t) = 0.3 + 0.4t, what is E(X)? · X 的 G(t) = 0.5 + 0.3t + 0.2t²。由于 E(X) = G′(1) 且 G′(t) = 0.3 + 0.4t,求 E(X)?
G'(1) = 0.3 + 0.4(1) = 0.7.
The mean is found from the PGF by E(X) = G′(). · 均值通过 PGF 求得:E(X) = G′()。
E(X) = G'(1).
Sums of independent 独立 variables
- The single most useful property: the PGF of a sum of independent variables is the product of their PGFs:
- This makes adding independent variables (e.g. total of several dice) almost effortless.
独立变量的和
- 最有用的单一性质:独立变量的和的 PGF 是它们 PGF 的积:
- 这使把独立变量相加(例如几个骰子的总和)几乎毫不费力。
For any valid PGF, what is the value of G(1)? · 对于任何有效的 PGF,G(1) 的值是多少?
G(1) = Σ P(X=x) = 1, since probabilities sum to 1. · G(1) = Σ P(X=x) = 1,因为概率之和为 1。
The PGF of a sum of two independent variables is the product of their PGFs. · 两个独立变量之和的 PGF 等于它们各自 PGF 的乘积。
G_{X+Y}(t) = G_X(t) G_Y(t) for independent X and Y. · G_{X+Y}(t) = G_X(t) G_Y(t),适用于独立的 X 和 Y。
Check it's a valid PGF
$G(1)$ must equal 1. Since $G(1) = \sum P(X = x)$, a valid PGF always gives $G(1) = 1$ — a quick sanity check before you differentiate.
检查它是一个有效的 PGF
$G(1)$ 必须等于 1。 因为 $G(1) = \sum P(X = x)$,一个有效的 PGF 总是给出 $G(1) = 1$——在你求导之前一个快速的合理性检查。
You've got it
- PGF: $G(t) = E(t^X) = \sum P(X=x)\,t^x$ (and $G(1) = 1$)
- $E(X) = G'(1)$; $\text{Var}(X) = G''(1) + G'(1) - (G'(1))^2$
- the PGF of a sum of independent variables is the product of their PGFs
你掌握了
- PGF:$G(t) = E(t^X) = \sum P(X=x)\,t^x$(且 $G(1) = 1$)
- $E(X) = G'(1)$;$\text{Var}(X) = G''(1) + G'(1) - (G'(1))^2$
- 独立变量的和的 PGF 是它们 PGF 的积