← 返回资讯屏轩教育 · 行业资讯

Mean and Variance of the Negative Binomial Distribution | 负二项分布的均值与方差

2026-08-02 17:14 · 本文部分内容由AI辅助创作

📚 Mean and Variance of the Negative Binomial Distribution | 负二项分布的均值与方差

The negative binomial distribution models the number of trials needed to achieve a fixed number of successes in a sequence of independent Bernoulli trials. In the Edexcel A-Level specification, it is a key distribution for understanding waiting-time problems. This article derives the mean and variance of the negative binomial distribution and demonstrates how to apply these formulas in exam-style questions.

负二项分布用于建模在一系列独立的伯努利试验中,获得固定成功次数所需的试验次数。在 Edexcel A-Level 大纲中,它是理解等待时间问题的一个关键分布。本文将推导负二项分布的均值与方差,并展示如何在考题中应用这些公式。


1. Introduction to the Negative Binomial Distribution | 负二项分布简介

Suppose we conduct a sequence of independent trials, each with success probability p. The negative binomial random variable X ~ NB(r, p) counts the number of trials up to and including the r-th success. Here r is a positive integer, and p is in (0,1).

假设我们进行一系列独立试验,每次试验成功概率为 p。负二项随机变量 X ~ NB(r, p) 计数直到并包括第 r 次成功所需的试验次数。这里 r 是正整数,p 在 (0,1) 之间。


2. Probability Mass Function (PMF) | 概率质量函数

The probability mass function of X is given by P(X = k) = k-1Cr-1 pr (1-p)k-r, for k = r, r+1, r+2, ... . The binomial coefficient k-1Cr-1 counts the ways to arrange r-1 successes in the first k-1 trials, with the final k-th trial being a success.

X 的概率质量函数为 P(X = k) = k-1Cr-1 pr (1-p)k-r,其中 k = r, r+1, r+2, ... 。二项式系数 k-1Cr-1 计算了前 k-1 次试验中 r-1 次成功的排列方式,而第 k 次试验为成功。


3. Relationship with the Geometric Distribution | 与几何分布的关系

mial variable can be written as the sum of r independent geometric random variables: X = G1 + G2 + ... + Gr, where each Gi ~ Geo(p) represents the number of trials from the (i-1)-th success to the i-th success (inclusive). This relationship is crucial for deriving the mean and variance without using the probability generating function.

参数为 p 的几何分布 Geo(p) 是 r = 1 时负二项分布的特例。此外,一个负二项变量可以表示为 r 个独立的几何随机变量之和:X = G1 + G2 + ... + Gr,其中每个 Gi ~ Geo(p) 表示从第 i-1 次成功到第 i 次成功(含)的试验次数。这种关系对于不使用概率生成函数推导均值和方差至关重要。


4. Mean Using the Sum of Geometric Variables | 利用几何变量之和求均值

If G ~ . Since X is the sum of r independent Geo(p) variables, the expectation of X is E(X) = E(G1) + E(G2) + ... + E(Gr p) = r/p. This holds regardless of the dependence structure because expectation is linear.

如果 G ~ Geo(p) 支集为 {1,2,3,...}(直到首次成功所需的试验次数),则 E(G) = 1/p。由于 X 是 r 个独立 Geo(p) 变量之和,X 的期望值为 E(X) = E(G1) + E(G2) + ... + E(Gr) = r × (1/p) = r/p。因为期望具有线性性质,这一点无论独立与否都成立,但我们已知它们独立所以更稳固。


5. Variance Using the Sum of Geometric Variables | 利用几何变量之和求方差

in the sum are independent, the variance of X is the sum of the variances: Var(X) = Var(G1) + Var(G2) + ... + Var(Gr /p² = rq/p². This is a straightforward derivation that is often expected in Edexcel exams.

对于几何分布 Geo(p),方差为 Var(G) = (1-p)/p² = q/p²,其中 q = 1-p。由于和中的各个几何分量相互独立,X 的方差就是方差之和:Var(X) = Var(G1) + Var(G2) + ... + Var(Gr) = r × q/p² = rq/p²。这是 Edexcel 考试中经常要求的直接推导。


广告 / Sponsored

6. Verification via Probability Generating Function (PGF) | 通过概率生成函数验证

Alternatively, the mean and variance can be found using the PGF of the negative binomial. The PGF of Geo(p) is GG(t) = pt/(1 - qt). For X ~ NB(r, p), GX(t) = [GG(t)]r = [pt/(1 - qt)]r. Then E(X) = G'X(1) and Var(X) = G''X(1) + G'X(1) - [G'X(1)]². Carrying out the differentiation confirms the same results.

另一种方法是使用负二项分布的概率生成函数(PGF)来求均值和方差。Geo(p) 的 PGF 为 GG(t) = pt/(1 - qt)。对于 X ~ NB(r, p),GX(t) = [GG(t)]r = [pt/(1 - qt)]r。然后 E(X) = G'X(1),Var(X) = G''X(1) + G'X(1) - [G'X(1)]²。求导后可验证结果一致。


7. Summary of Mean and Variance Formulas | 均值与方差公式总结

For X ~ on is defined in terms of number of failures Y = X - r, then E(Y) = rq/p and Var(Y) = rq/p². Always check which parameterisation is used in the question.

对于上述定义下的 X ~ NB(r, p)(直到第 r 次成功的试验次数):均值 μ = r/p,方差 σ² = r(1-p)/p² = rq/p²。注意,如果分布定义为失败次数 Y = X - r,则 E(Y) = rq/p,Var(Y) = rq/p²。解题时务必确认题目使用的是哪种参数化。


8. Worked Example 1 – Basic Calculation | 例题1——基本计算

Question: A biased die lands on a six with probability 0.2. It is thrown repeatedly until six appears for the 4th time. Let X be the number of throws required. Find E(X) and Var(X).

题目:一个不均匀骰子掷出六点的概率为 0.2。反复投掷直到出现第四次六点。设 X 为所需投掷次数。求 E(X) 和 Var(X)。

p = 0.2, so E(X) = r/p = 4/0.2 = 20. Variance = rq/p² = 4 × 0.8 / (0.2²) = 3.2/0.04 = 80.

解答:这里 r = 4, p = 0.2,所以 E(X) = r/p = 4/0.2 = 20。方差 = rq/p² = 4 × 0.8 / (0.2²) = 3.2/0.04 = 80。


9. Worked Example 2 – Using the Distribution with Unknown r | 例题2——未知 r 时的应用

Question: In a game a player has a constant probability 0.3 of hitting a target. The number of shots needed to achieve 5 hits is modelled by X ~ NB(5, 0.3). Calculate the probability that the player needs more than 10 shots to get 5 hits, and find the expected number of failures.

题目:在一个游戏中,玩家命中目标的恒定概率为 0.3。所需射击次数直到取得 5 次命中记为 X ~ NB(5, 0.3)。计算玩家需要超过 10 次射击才能取得 5 次命中的概率,并求期望失败次数。

t needing more than 10 shots for 5 hits means in 10 shots there were at most 4 hits. Let Y ~ (X > 10) = P(Y ≤ 4). Using binomial tables or a calculator, P(Y ≤ 4) ≈ 0.8497. So about 85% r of failures is E(X - 5) = E(X) - 5 = r/p - 5 = 5/0.3 - 5 ≈ 16.667 - 5 = 11.667 failures.

解答:我们需要求 P(X > 10)。这等于 1 - P(X ≤ 10)。注意到需要超过 10 次射击才取得 5 次命中,意味着在前 10 次射击中最多有 4 次命中。设 Y ~ Bin(10, 0.3) 为 10 次射击中的命中次数。则 P(X > 10) = P(Y ≤ 4)。使用二项分布表或计算器得 P(Y ≤ 4) ≈ 0.8497。因此概率约为 85%。期望失败次数为 E(X - 5) = E(X) - 5 = r/p - 5 = 5/0.3 - 5 ≈ 16.667 - 5 = 11.667 次失败。


10. Common Mistakes | 常见错误

A common mistake is to confuse the formula for the mean with that of the binomial distribution. Remember that for the negative binomial (number of trials), the mean is r/p, not rp. Also, forgetting that the geometric distribution is defined on {1,2,...} can lead to an incorrect variance if shifted to {0,1,...}. Always verify the domain of your random variable. Finally, ensure you correctly identify r and p from the context – r is the number of successes, not failures.

一个常见错误是将负二项分布的均值公式与二项分布的均值混淆。请记住,对于负二项(试验次数)分布,均值是 r/p,而不是 rp。此外,忘记几何分布定义在 {1,2,...} 上可能导致在转换为 {0,1,...} 时算错方差。务必确认随机变量的定义域。最后,确保从上下文正确识别 r 和 p —— r 是成功次数,而非失败次数。


11. Key Takeaways | 核心要点

The mean and variance of X ~ ved by recognising X as a sum of r independent geometric variables. In exam problems, be careful to match the parameterisation to the question. Negative binomial models are useful for 'waiting until success' scenarios.

X ~ NB(r, p)(试验次数)的均值和方差分别为 E(X) = r/p 和 Var(X) = rq/p²。通过将 X 看作 r 个独立几何变量之和,可以很容易地推导出这些公式。在考试题目中,注意将参数化与题目匹配。负二项模型对于“等待直到成功”的情景非常有用。


12.

Published by TutorHao | A-Level Mathematics Revision Series | aleveler.com

广告 / Sponsored
英文原版剑桥国际中学计算机教材 Cambridge Lower Secondary Computing Learner…
计算机 备考教辅 · 正版现货 · 与本文同科同级别
查看详情 / View on Taobao参考价 ¥233.0

更多咨询请联系16621398022(同微信)

备考资讯每日更新,关注不错过
考纲变化 · 科目分析 · 学习方法
扫码关注公众号 tutorhao
在微信里长按二维码识别关注
或截图后用「扫一扫 → 相册」选择本图
公众号:tutorhao