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

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

The negative binomial distribution is a fundamental discrete probability distribution in A-Level Further Mathematics, particularly under the Edexcel specification. It models the number of trials required to achieve a fixed number of successes in a sequence of independent Bernoulli trials, each with the same probability of success. In this article, we derive and explain the formulas for the mean and variance of this distribution, with clear steps and worked examples.

负二项分布是 A-Level 进阶数学(Edexcel 考试局)中的一个核心离散概率分布。它用于描述在一系列独立的伯努利试验中,为了达到固定次数的成功所需进行的试验次数,每次试验的成功概率相同。本文将详细推导并解释负二项分布的均值与方差公式,并配有清晰的步骤和例题。


1. Definition of Negative Binomial Distribution | 负二项分布的定义

Let \(X\) be the number of Bernoulli trials needed to obtain exactly \(r\) successes, where each trial has success probability \(p\) and failure probability \(q = 1 – p\). Then \(X\) follows a negative binomial distribution with parameters \(r\) and \(p\). The probability mass function is given by:

设 \(X\) 表示为了恰好获得 \(r\) 次成功所需的伯努利试验次数,每次试验的成功概率为 \(p\),失败概率为 \(q = 1 – p\)。则 \(X\) 服从参数为 \(r\) 和 \(p\) 的负二项分布。其概率质量函数为:

P(X = x) = C(x – 1, r – 1) p^r q^(x – r), x = r, r + 1, r + 2, …

Here \(C(x – 1, r – 1)\) is the binomial coefficient, representing the number of ways to arrange \(r – 1\) successes among the first \(x – 1\) trials, with the final trial being a success. This distribution is sometimes also defined as the number of failures before the \(r\)-th success, but in the Edexcel A-Level syllabus, the definition above is standard.

其中 \(C(x – 1, r – 1)\) 是组合数,表示在前 \(x – 1\) 次试验中安排 \(r – 1\) 次成功的方式数,而最后一次试验必定是成功。有时负二项分布也被定义为第 \(r\) 次成功之前的失败次数,但在 Edexcel A-Level 考纲中,上述定义是标准形式。


2. Deriving the Mean | 均值的推导

To find the mean \(E(X)\) of the negative binomial distribution, we can interpret \(X\) as the sum of \(r\) independent geometric random variables. Recall that a geometric distribution models the number of trials to achieve the first success, with mean \(1/p\). After each success, the process resets, so the total number of trials to obtain \(r\) successes is the sum of \(r\) independent geometric variables.

为了求负二项分布的均值 \(E(X)\),我们可以将 \(X\) 解释为 \(r\) 个独立的几何随机变量之和。回顾几何分布用于描述获得第一次成功所需的试验次数,其均值为 \(1/p\)。每次成功之后,过程重新开始,因此获得 \(r\) 次成功所需的总试验次数就是 \(r\) 个独立几何变量之和。

E(X) = E(G₁) + E(G₂) + … + E(Gᵣ) = r × (1/p) = r/p

Thus the mean of the negative binomial distribution is \(r/p\). For example, if \(r = 3\) and \(p = 0.5\), then the expected number of trials to get 3 successes is \(3 / 0.5 = 6\). This matches our intuition: with a 50% success rate, we expect 2 trials per success on average.

因此负二项分布的均值为 \(r/p\)。例如,若 \(r = 3\) 且 \(p = 0.5\),则获得 3 次成功所需的期望试验次数为 \(3 / 0.5 = 6\)。这符合直觉:成功率为 50% 时,平均每次成功需要 2 次试验。


3. Deriving the Variance | 方差的推导

Similarly, we can use the sum of independent geometric variables to find the variance. The variance of a geometric distribution with success probability \(p\) is \(q / p²\), where \(q = 1 – p\). Since the geometric variables in the negative binomial are independent, the variance of their sum is the sum of their variances.

类似地,我们可以利用独立几何变量之和来求方差。成功概率为 \(p\) 的几何分布的方差为 \(q / p²\),其中 \(q = 1 – p\)。由于负二项分布中的几何变量相互独立,其和的方差等于各方差之和。

Var(X) = r × (q / p²) = r q / p²

Therefore, the variance of the negative binomial distribution is \(r(1-p) / p²\). Using the same example with \(r = 3\) and \(p = 0.5\), we have \(q = 0.5\), so the variance is \(3 × 0.5 / 0.25 = 6\). This indicates a relatively wide spread around the mean.

因此,负二项分布的方差为 \(r(1-p) / p²\)。使用相同的例子,\(r = 3\) 且 \(p = 0.5\),则 \(q = 0.5\),方差为 \(3 × 0.5 / 0.25 = 6\)。这表明分布围绕均值有较大的离散程度。


4. Algebraic Derivation Using Probability Generating Function | 使用概率母函数的代数推导

An alternative and more rigorous approach to deriving the mean and variance uses the probability generating function (PGF). The PGF of a negative binomial distribution can be derived from the sum of \(r\) independent geometric PGFs. For a geometric distribution, the PGF is \(G(t) = pt / (1 – qt)\), where \(t\) is the dummy variable.

另一种更严谨的推导均值与方差的方法是使用概率母函数(PGF)。负二项分布的概率母函数可以由 \(r\) 个独立几何分布的 PGF 之和推导得出。几何分布的 PGF 为 \(G(t) = pt / (1 – qt)\),其中 \(t\) 为辅助变量。

G(t) = [pt / (1 – qt)]^r

To find the mean, we differentiate the PGF with respect to \(t\) and evaluate at \(t = 1\). The first derivative is \(G'(t) = r [pt / (1 – qt)]^(r-1) × [p(1 – qt) + pqt] / (1 – qt)²\). Simplifying and setting \(t = 1\) gives \(G'(1) = r / p\), which is the mean.

为了求均值,我们对 PGF 关于 \(t\) 求导,并在 \(t = 1\) 处取值。一阶导数为 \(G'(t) = r [pt / (1 – qt)]^(r-1) × [p(1 – qt) + pqt] / (1 – qt)²\)。化简并在 \(t = 1\) 处求值,得到 \(G'(1) = r / p\),即均值。

For the variance, we need the second derivative \(G”(1)\). Recall that \(E(X(X – 1)) = G”(1)\). After differentiating and simplifying, we obtain \(G”(1) = r(r + 1)/p² – r/p\). Then:

为了求方差,我们需要二阶导数 \(G”(1)\)。回顾 \(E(X(X – 1)) = G”(1)\)。经过求导和化简,得到 \(G”(1) = r(r + 1)/p² – r/p\)。于是:

Var(X) = E(X²) – [E(X)]² = G”(1) + E(X) – [E(X)]² = r q / p²

This matches the earlier result. The PGF method is particularly useful when dealing with sums of independent random variables, as it avoids lengthy combinatorial summations.

这与前面的结果一致。PGF 方法在处理独立随机变量之和时特别有用,因为它避免了冗长的组合求和。


5. Key Formulas Summary | 关键公式总结

Quantity Formula 中文
Mean \(E(X)\) \(r / p\) 均值 \(r / p\)
Variance \(Var(X)\) \(r q / p²\) 方差 \(r q / p²\)
Standard Deviation \(\sqrt{r q} / p\) 标准差 \(\sqrt{r q} / p\)

Note that \(q = 1 – p\). The standard deviation is simply the square root of the variance. These formulas are essential for solving exam problems that require calculating expected values and spreads without full probability tables.

注意 \(q = 1 – p\)。标准差就是方差的正平方根。这些公式对于解决需要计算期望值和离散程度的考试题目至关重要,无需查阅完整的概率表。


6. Worked Example 1 | 例题一

A biased die has a probability of 0.2 of showing a six. The die is thrown repeatedly until 4 sixes have appeared. Let \(X\) be the number of throws required. Find the mean and variance of \(X\).

一枚有偏骰子出现六点的概率为 0.2。重复投掷该骰子,直到出现 4 次六点。设 \(X\) 为所需投掷次数。求 \(X\) 的均值和方差。

Here \(r = 4\) and \(p = 0.2\). Using the formulas:

这里 \(r = 4\),\(p = 0.2\)。使用公式:

E(X) = r / p = 4 / 0.2 = 20

Var(X) = r q / p² = 4 × 0.8 / 0.04 = 3.2 / 0.04 = 80

Thus on average 20 throws are needed to obtain 4 sixes, with a variance of 80. The standard deviation is \(\sqrt{80} \approx 8.94\), showing a considerable spread around the mean.

因此平均需要 20 次投掷才能获得 4 次六点,方差为 80。标准差为 \(\sqrt{80} \approx 8.94\),说明围绕均值有相当大的离散程度。


7. Worked Example 2 | 例题二

A basketball player has a free-throw success rate of 0.7. Let \(Y\) be the number of free throws needed to make 5 successful shots. Find the mean and standard deviation of \(Y\).

一名篮球运动员的罚球命中率为 0.7。设 \(Y\) 为投进 5 个球所需的罚球次数。求 \(Y\) 的均值和标准差。

Here \(r = 5\), \(p = 0.7\), \(q = 0.3\). Therefore:

这里 \(r = 5\),\(p = 0.7\),\(q = 0.3\)。因此:

E(Y) = 5 / 0.7 ≈ 7.14

Var(Y) = 5 × 0.3 / 0.49 ≈ 3.06

SD(Y) = \(\sqrt{3.06}\) ≈ 1.75

This means the player is expected to take about 7 to 8 attempts to make 5 successful free throws. The standard deviation of about 1.75 attempts indicates typical variability.

这意味着该运动员预计需要大约 7 到 8 次尝试才能投进 5 个罚球。标准差约为 1.75 次,反映了典型的波动范围。


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

When \(r = 1\), the negative binomial distribution reduces to the geometric distribution. Substituting \(r = 1\) into the mean and variance formulas gives \(E(X) = 1/p\) and \(Var(X) = q/p²\), which are exactly the well-known geometric distribution results. This provides a quick check of the formulas.

当 \(r = 1\) 时,负二项分布退化为几何分布。将 \(r = 1\) 代入均值和方差公式,得到 \(E(X) = 1/p\) 和 \(Var(X) = q/p²\),这正是众所周知的几何分布结果。这为公式提供了快速验证。

Furthermore, because the negative binomial is a sum of \(r\) independent geometric variables, any linear combination of independent negative binomial random variables with the same \(p\) but different \(r\) values is also negative binomial, with \(r\) equal to the sum of the individual \(r\) values. This property is useful in advanced probability problems.

此外,由于负二项分布是 \(r\) 个独立几何变量之和,具有相同 \(p\) 但不同 \(r\) 值的独立负二项随机变量的线性组合,其 \(r\) 等于各 \(r\) 值之和,且仍服从负二项分布。这一性质在进阶概率问题中非常有用。


9. Common Pitfalls in Exams | 考试中的常见误区

Students often confuse the two common definitions of the negative binomial distribution: the number of trials to achieve \(r\) successes versus the number of failures before the \(r\)-th success. Under the Edexcel specification, the standard is the number of trials, so the mean is \(r/p\). If the alternative definition is used, the mean would be \(rq/p\) and variance \(rq/p²\). Always check the exam question wording carefully.

学生常常混淆负二项分布的两种常见定义:达到 \(r\) 次成功所需的试验次数,与第 \(r\) 次成功之前的失败次数。在 Edexcel 考纲中,标准定义是试验次数,因此均值为 \(r/p\)。如果使用另一种定义,均值则为 \(rq/p\),方差仍为 \(rq/p²\)。务必仔细阅读题目措辞。

Another common mistake is using \(p\) for the failure probability instead of \(q\). Remember that \(p\) is always the success probability in the formulas. Also, when \(r\) is large, the distribution becomes more symmetric and can be approximated by a normal distribution, but exact formulas should be used unless the question explicitly asks for an approximation.

另一个常见错误是将 \(p\) 误用为失败概率。请记住,在公式中 \(p\) 始终表示成功概率。另外,当 \(r\) 较大时,分布变得更加对称,可以用正态分布近似,但除非题目明确要求近似,否则应使用精确公式。


10. Derivation via Direct Summation (Optional) | 直接求和推导(选学)

For completeness, we outline a direct summation derivation of the mean. By definition, \(E(X) = \sum_{x=r}^{∞} x C(x – 1, r – 1) p^r q^(x-r)\). Using the identity \(x C(x – 1, r – 1) = r C(x, r)\), the sum becomes \(r p^r \sum_{x=r}^{∞} C(x, r) q^(x-r)\).

为完整起见,我们概述均值的一种直接求和推导。根据定义,\(E(X) = \sum_{x=r}^{∞} x C(x – 1, r – 1) p^r q^(x-r)\)。利用恒等式 \(x C(x – 1, r – 1) = r C(x, r)\),该求和变为 \(r p^r \sum_{x=r}^{∞} C(x, r) q^(x-r)\)。

Using the negative binomial series expansion, \(\sum_{x=r}^{∞} C(x, r) q^(x-r) = (1 – q)^(-r-1) = p^(-r-1)\). Therefore, \(E(X) = r p^r × p^(-r-1) = r / p\). A similar, though more involved, approach applies to the variance.

利用负二项级数展开,\(\sum_{x=r}^{∞} C(x, r) q^(x-r) = (1 – q)^(-r-1) = p^(-r-1)\)。因此,\(E(X) = r p^r × p^(-r-1) = r / p\)。方差也可用类似但更复杂的方法推导。


11. Summary and Exam Tips | 总结与考试技巧

To summarise, for a negative binomial distribution defined as the number of trials to achieve \(r\) successes with success probability \(p\), the mean is \(r/p\) and the variance is \(r(1-p)/p²\). These formulas are derived elegantly using the sum of geometric variables or via the PGF.

总结:对于定义为达到 \(r\) 次成功所需的试验次数、成功概率为 \(p\) 的负二项分布,均值为 \(r/p\),方差为 \(r(1-p)/p²\)。这些公式可以通过几何变量之和或 PGF 优雅地推导出来。

Exam tips: 1) Identify \(r\) and \(p\) correctly. 2) Decide which definition of negative binomial the question uses. 3) Use \(q = 1 – p\) to compute variance quickly. 4) For parts (a) and (b), write down the formula before substituting values. 5) When asked for the standard deviation, do not forget to take the square root of the variance.

考试技巧: 1) 正确识别 \(r\) 和 \(p\)。2) 判断题目使用的是哪种负二项定义。3) 使用 \(q = 1 – p\) 快速计算方差。4) 在代入数值之前写出公式。5) 当题目要求标准差时,不要忘记对方差开平方。

Mastering these formulas not only helps with direct calculation questions but also provides a foundation for understanding more complex probability models in Further Mathematics, such as compound distributions and moment-generating functions.

掌握这些公式不仅有助于直接计算类题目,也为理解进阶数学中更复杂的概率模型(如复合分布和矩母函数)奠定基础。


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

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

Comments

屏轩国际教育cambridge primary/secondary checkpoint, cat4, ukiset,ukcat,igcse,alevel,PAT,STEP,MAT, ibdp,ap,ssat,sat,sat2课程辅导,国外大学本科硕士研究生博士课程论文辅导

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Discover more from aleveler.com

Subscribe now to keep reading and get access to the full archive.

Continue reading