📚 Mean and Variance of the Negative Binomial Distribution | 负二项分布的均值与方差
The negative binomial distribution is a discrete probability distribution that models the number of independent Bernoulli trials needed to obtain a fixed number of successes. For Edexcel A-Level Further Mathematics, you are expected to derive, interpret and apply the mean and variance of this distribution, usually through the probability generating function or by linking it to the geometric distribution.
负二项分布是一种离散概率分布,用来描述获得固定次数成功所需的独立伯努利试验次数。在 Edexcel A-Level 进阶数学中,你需要推导、解释并应用该分布的均值与方差,通常通过概率生成函数或借助几何分布来完成。
1. Definition and Context | 定义与背景
The negative binomial distribution arises when independent Bernoulli trials are repeated until a fixed number r of successes has been observed. It is a natural generalisation of the geometric distribution, which is the special case r = 1.
当独立伯努利试验重复进行,直到观察到固定次数 r 次成功时,就产生了负二项分布。它是几何分布的推广,而几何分布正是 r = 1 的特殊情形。
In this topic we usually define X as the total number of trials up to and including the r-th success. Each trial has probability p of success and probability q = 1 − p of failure. The trials are independent, and r is a fixed positive integer.
在本专题中,我们通常将 X 定义为直到第 r 次成功为止的总试验次数。每次试验成功的概率为 p,失败的概率为 q = 1 − p。各次试验相互独立,r 是一个固定的正整数。
X ~ NB(r, p), p ∈ (0, 1), q = 1 − p, r ∈ ℕ
2. Two Common Forms of the Negative Binomial | 负二项分布的两种常见形式
Edexcel questions can use either of two equivalent random variables. The first counts the total number of trials needed to reach the r-th success, often written as X. The second counts the number of failures before the r-th success, often written as Y = X − r.
Edexcel 考题可能使用两种等价的随机变量之一。第一种计算达到第 r 次成功所需的总试验次数,通常记为 X。第二种计算第 r 次成功之前的失败次数,通常记为 Y = X − r。
For the total-trial variable X, the distribution is written X ~ NB(r, p). For the failure-count variable Y, the same parameters are used, but the mean is shifted by r because Y = X − r. You must check the wording of the question carefully.
对于总试验次数变量 X,分布记作 X ~ NB(r, p)。对于失败次数变量 Y,使用相同的参数,但由于 Y = X − r,均值会平移 r。你必须仔细审题,判断题目使用的是哪种定义。
X = total trials to the r-th success, Y = X − r = failures before the r-th success
3. Probability Mass Function | 概率质量函数
For X ~ NB(r, p) counting total trials, the probability mass function is given by the chance that the r-th success occurs on trial x. This requires exactly r − 1 successes in the first x − 1 trials, followed by a success on trial x.
对于计总试验次数的 X ~ NB(r, p),其概率质量函数表示第 r 次成功发生在第 x 次试验的概率。这就要求前 x − 1 次试验中恰好有 r − 1 次成功,并且第 x 次试验为成功。
P(X = x) = C(x − 1, r − 1) pr qx − r, x = r, r + 1, r + 2, …
For the failure-count variable Y, the support starts at zero, and the probability mass function is P(Y = y) = C(y + r − 1, r − 1) pr qy for y = 0, 1, 2, … .
对于计失败次数的变量 Y,其取值范围从零开始,概率质量函数为 P(Y = y) = C(y + r − 1, r − 1) pr qy,其中 y = 0, 1, 2, …。
4. Mean via the Probability Generating Function: First Derivative | 用概率生成函数推导均值:一阶导数
Let G_X(t) = E(tX) be the probability generating function. For X ~ NB(r, p) counting total trials, the PGF is obtained by summing the probability mass function over the permissible values of x.
令 G_X(t) = E(tX) 为概率生成函数。对于计总试验次数的 X ~ NB(r, p),概率生成函数可通过对其概率质量函数在允许的 x 值上求和得到。
G_X(t) = [p t ÷ (1 − q t)]r, |t| < 1/q
Taking logarithms gives ln G_X(t) = r[ln p + ln t − ln(1 − q t)]. Differentiating with respect to t gives G’_X(t) ÷ G_X(t) = r(1/t + q ÷ (1 − q t)).
取对数得 ln G_X(t) = r[ln p + ln t − ln(1 − q t)]。对 t 求导得 G’_X(t) ÷ G_X(t) = r(1/t + q ÷ (1 − q t))。
Setting t = 1 and using G_X(1) = 1 gives the mean E(X) = G’_X(1) = r(1 + q/p) = r/p. This is the expected total number of trials required to obtain r successes.
令 t = 1,并利用 G_X(1) = 1,可得均值 E(X) = G’_X(1) = r(1 + q/p) = r/p。这就是获得 r 次成功所需的总试验次数的期望值。
E(X) = r ÷ p
5. Variance via the Probability Generating Function: Second Derivative | 用概率生成函数推导方差:二阶导数
To find the variance, we need the second derivative of G_X(t) at t = 1. Starting from G’_X(t) = G_X(t) × r(1/t + q ÷ (1 − q t)), apply the product rule.
为了求方差,我们需要 G_X(t) 在 t = 1 处的二阶导数。从 G’_X(t) = G_X(t) × r(1/t + q ÷ (1 − q t)) 出发,使用乘积法则。
Differentiating again and substituting t = 1 gives G”_X(1) = r² ÷ p² + r(q − p) ÷ p². This expression will be used in the variance formula.
再次求导并代入 t = 1,得到 G”_X(1) = r² ÷ p² + r(q − p) ÷ p²。该表达式将用于方差公式。
G”_X(1) = r² ÷ p² + r(q − p) ÷ p²
For any random variable with PGF G_X(t), the variance is Var(X) = G”_X(1) + G’_X(1) − [G’_X(1)]². Substituting the known values gives Var(X) = r q ÷ p².
对于任意具有概率生成函数 G_X(t) 的随机变量,方差为 Var(X) = G”_X(1) + G’_X(1) − [G’_X(1)]²。代入已知值可得 Var(X) = r q ÷ p²。
Var(X) = r q ÷ p² = r(1 − p) ÷ p²
6. Alternative Derivation Using a Sum of Geometric Variables | 用几何分布之和进行替代推导
A more intuitive derivation treats the total waiting time for r successes as the sum of r independent geometric waiting times. If X_i represents the number of trials from just after the (i − 1)-th success up to and including the i-th success, then X_i ~ Geo(p).
一种更直观的推导将获得 r 次成功的总等待时间视为 r 个独立几何等待时间之和。如果 X_i 表示从第 (i − 1) 次成功之后到第 i 次成功为止的试验次数,那么 X_i ~ Geo(p)。
X = X₁ + X₂ + … + Xr, Xi ~ Geo(p) independent
For a single geometric variable X_i, the mean is 1/p and the variance is q ÷ p². By independence, the mean and variance of the sum are simply the sums of the individual means and variances.
对于单个几何变量 X_i,均值为 1/p,方差为 q ÷ p²。由独立性可知,总和的均值和方差就是各个均值与方差之和。
E(X) = r ÷ p, Var(X) = r q ÷ p²
If Y = X − r counts failures before the r-th success, then Y = Σ (X_i − 1), so E(Y) = r q ÷ p and Var(Y) = r q ÷ p². The variance is unchanged because subtracting the constant r does not affect dispersion.
如果 Y = X − r 表示第 r 次成功前的失败次数,那么 Y = Σ (X_i − 1),所以 E(Y) = r q ÷ p,Var(Y) = r q ÷ p²。方差不变,因为减去常数 r 不影响离散程度。
7. Worked Example | 例题
Suppose a biased coin has probability p = 0.2 of landing heads. Let X be the number of tosses needed to obtain r = 5 heads. Since each toss is independent, X ~ NB(5, 0.2).
假设一枚偏置硬币正面朝上的概率为 p = 0.2。令 X 为获得 r = 5 次正面所需的投掷次数。由于每次投掷相互独立,X ~ NB(5, 0.2)。
For the total number of tosses, E(X) = 5 ÷ 0.2 = 25 and Var(X) = 5 × 0.8 ÷ 0.2² = 5 × 0.8 ÷ 0.04 = 100. The standard deviation is √100 = 10.
对于总投掷次数,E(X) = 5 ÷ 0.2 = 25,Var(X) = 5 × 0.8 ÷ 0.2² = 5 × 0.8 ÷ 0.04 = 100。标准差为 √100 = 10。
If instead Y is the number of tails before the 5th head, then E(Y) = 5 × 0.8 ÷ 0.2 = 20 and Var(Y) = 100. The mean shifts down by 5, but the spread is the same.
如果改为 Y 表示第 5 次正面之前的反面次数,则 E(Y) = 5 × 0.8 ÷ 0.2 = 20,Var(Y) = 100。均值向下平移 5,但离散程度相同。
| Variable | Meaning | Mean | Variance |
|---|---|---|---|
| X | Total tosses to 5 heads | 25 | 100 |
| Y | Tails before
Published by TutorHao | A-Level Mathematics Revision Series | aleveler.com 更多咨询请联系16621398022(同微信) CommentsMore posts |
屏轩国际教育cambridge primary/secondary checkpoint, cat4, ukiset,ukcat,igcse,alevel,PAT,STEP,MAT, ibdp,ap,ssat,sat,sat2课程辅导,国外大学本科硕士研究生博士课程论文辅导