Negative Binomial Distribution | 负二项分布

📚 Negative Binomial Distribution | 负二项分布

The negative binomial distribution is a discrete probability distribution used to model the number of trials required to achieve a fixed number of successes in a sequence of independent Bernoulli trials.

负二项分布是一种离散概率分布,用于描述在一系列独立伯努利试验中,达到固定成功次数所需的试验次数。

It appears frequently in IB Mathematics AA HL, particularly in the topic of probability distributions and statistical inference.

在 IB 数学 AA HL 中,它经常出现在概率分布与统计推断的相关考点中。

1. When Do We Use It? | 何时使用负二项分布?

We use the negative binomial distribution when we repeat independent trials, each with the same probability of success \(p\), and we keep going until we have observed exactly \(r\) successes.

当我们重复进行独立试验,每次成功概率均为 \(p\),并且一直持续到恰好观察到 \(r\) 次成功时,我们就可以使用负二项分布。

The variable of interest is the total number of trials needed. For example, how many free throws must a player attempt in order to make 5 shots?

我们关心的变量是总共所需的试验次数。例如,一名球员需要投篮多少次才能命中 5 次?

This is different from a binomial distribution, where the number of trials is fixed and we count the number of successes. In a negative binomial setting, the number of successes is fixed and we count the number of trials.

这不同于二项分布:二项分布中试验次数固定,我们统计成功次数;而负二项分布中成功次数固定,我们统计试验次数。

2. Definition and Parameters | 定义与参数

Let each trial have two outcomes: success or failure. Let \(p\) be the probability of success on a single trial.

设每次试验只有两种结果:成功或失败。令 \(p\) 为单次试验的成功概率。

  • \(X\) is the total number of trials needed to achieve \(r\) successes.

    \(X\) 表示达到 \(r\) 次成功所需的总试验次数。

  • We write \(X \sim NB(r, p)\).

    我们记作 \(X \sim NB(r, p)\)。

  • The parameter \(r\) is a positive integer, \(r \in \mathbb{Z}^+\).

    参数 \(r\) 为正整数,\(r \in \mathbb{Z}^+\)。

  • The probability \(p\) satisfies \(0 < p \leq 1\).

    概率 \(p\) 满足 \(0 < p \leq 1\)。

The smallest possible value of \(X\) is \(r\), because we need at least \(r\) trials to obtain \(r\) successes.

\(X\) 的最小可能取值为 \(r\),因为至少需要 \(r\) 次试验才能获得 \(r\) 次成功。

3. Probability Mass Function | 概率质量函数

The probability mass function of the negative binomial distribution is given by the following formula.

负二项分布的概率质量函数由以下公式给出。

P(X = x) = C(x−1, r−1) · pʳ · (1−p)ˣ⁻ʳ

Here \(x\) is a whole number with \(x \geq r\).

其中 \(x\) 为整数,且 \(x \geq r\)。

The binomial coefficient \(C(x−1, r−1)\) counts the number of ways to choose which \(r−1\) of the first \(x−1\) trials are successes.

组合数 \(C(x−1, r−1)\) 表示在前 \(x−1\) 次试验中,挑选出 \(r−1\) 次作为成功位置的方法数。

The final trial must be the \(r\)-th success, so the last trial contributes one factor of \(p\). The earlier \(x−1\) trials contain \(r−1\) successes and \(x−r\) failures.

最后一次试验必须是第 \(r\) 次成功,因此最后那次试验贡献一个因子 \(p\)。前 \(x−1\) 次试验中包含 \(r−1\) 次成功和 \(x−r\) 次失败。

4. Special Case: Geometric Distribution | 特例:几何分布

When \(r = 1\), the negative binomial distribution becomes the geometric distribution.

当 \(r = 1\) 时,负二项分布退化为几何分布。

The probability mass function simplifies to the following.

其概率质量函数简化为如下形式。

P(X = x) = p · (1−p)ˣ⁻¹

This gives the probability that the first success occurs on the \(x\)-th trial.

这表示首次成功出现在第 \(x\) 次试验的概率。

Thus the geometric distribution is the negative binomial distribution with exactly one success required.

因此,几何分布就是“只需要一次成功”时的负二项分布。

5. Expected Value and Variance | 期望与方差

The mean and variance of a negative binomial random variable have concise formulas.

负二项随机变量的均值与方差具有简洁的公式。

E(X) = r ÷ p

Var(X) = r(1−p) ÷ p²

To understand these formulas, write \(X\) as the sum of \(r\) independent geometric random variables.

为了理解这些公式,可以将 \(X\) 写成 \(r\) 个独立几何随机变量之和。

Each geometric part has mean \(1 ÷ p\) and variance \((1−p) ÷ p²\). Adding \(r\) independent copies gives the results above.

每一个几何部分均值为 \(1 ÷ p\),方差为 \((1−p) ÷ p²\)。将 \(r\) 个独立部分相加,就得到上述结果。

6. Derivation of the PMF | 概率质量函数的推导

We now derive the probability mass function step by step.

下面我们逐步推导概率质量函数。

  • The \(x\)-th trial must be a success, and it must be the \(r\)-th success.

    第 \(x\) 次试验必须是成功,并且它必须是第 \(r\) 次成功。

  • In the first \(x−1\) trials, there must be exactly \(r−1\) successes.

    在前 \(x−1\) 次试验中,必须恰好有 \(r−1\) 次成功。

  • The probability of any specific arrangement of \(r−1\) successes and \(x−r\) failures is \(pʳ(1−p)ˣ⁻ʳ\).

    任意一种由 \(r−1\) 次成功和 \(x−r\) 次失败组成的具体排列概率为 \(pʳ(1−p)ˣ⁻ʳ\)。

  • The number of such arrangements is \(C(x−1, r−1)\).

    这种排列的数量为 \(C(x−1, r−1)\)。

Multiplying the probability of one arrangement by the number of arrangements gives the PMF.

将一种排列的概率乘以排列数,就得到概率质量函数。

7. Worked Example | 例题精讲

Suppose an archer hits the target with probability \(p = 0.4\), and each shot is independent. The archer continues shooting until hitting the target 3 times.

假设一名射箭运动员命中靶子的概率为 \(p = 0.4\),且每次射击相互独立。她持续射击直到命中 3 次。

Find the probability that exactly 7 shots are required.

求恰好需要射击 7 次的概率。

Here \(r = 3\), \(p = 0.4\), and \(x = 7\).

这里 \(r = 3\),\(p = 0.4\),\(x = 7\)。

P(X = 7) = C(6, 2) · 0.4³ · 0.6⁴

We compute the binomial coefficient and the powers.

我们计算组合数以及幂次。

  • \(C(6, 2) = 15\)

    \(C(6, 2) = 15\)

  • \(0.4³ = 0.064\)

    \(0.4³ = 0.064\)

  • \(0.6⁴ = 0.1296\)

    \(0.6⁴ = 0.1296\)

Therefore the probability is approximately the following.

因此概率约为如下结果。

P(X = 7) ≈ 15 × 0.064 × 0.1296 ≈ 0.124

We can also compute the expected number of shots and the variance.

我们还可以计算期望射击次数与方差。

E(X) = 3 ÷ 0.4 = 7.5

Var(X) = 3 × 0.6 ÷ 0.4² = 11.25

So on average the archer needs 7.5 shots, and the variability is quite large.

因此平均需要 7.5 次射击,且波动幅度相当大。

8. Relationship with Other Distributions | 与其他分布的关系

The negative binomial distribution is closely connected to the binomial and geometric distributions.

负二项分布与二项分布、几何分布密切相关。

Distribution Number of Successes Number of Trials
Binomial Random Fixed
Negative Binomial Fixed Random
Geometric Fixed, \(r = 1\) Random

In a binomial distribution, the total number of trials \(n\) is fixed. In a negative binomial distribution, it is the number of successes \(r\) that is fixed.

在二项分布中,总试验次数 \(n\) 固定;而在负二项分布中,固定的是成功次数 \(r\)。

When \(r = 1\), the negative binomial distribution reduces exactly to the geometric distribution.

当 \(r = 1\) 时,负二项分布就精确地退化为几何分布。

9. Real-World Applications | 实际应用

The negative binomial distribution is useful in many practical situations.

负二项分布在许多实际问题中非常有用。

  • Quality control: inspect items until a fixed number of defects is found.

    质量控制:检查产品直到发现固定数量的次品为止。

  • Sports analytics: count the number of attempts until a player achieves a certain number of successes.

    体育数据分析:统计运动员完成特定成功次数所需的尝试次数。

  • Epidemiology: model the number of contacts needed until a fixed number of infections occur.

    流行病学:模拟直到发生固定数量感染所需的接触人数。

  • Computer science: analyze the number of repeated requests until a certain number of successful transmissions.

    计算机科学:分析直到一定数量成功传输所需的重复请求次数。

10. Common Mistakes to Avoid | 常见错误

Students often make a few standard mistakes with this distribution.

学习这个分布时,学生经常犯以下几种典型错误。

  • Using \(C(x, r)\) instead of \(C(x−1, r−1)\). The last trial is fixed as a success, so it cannot be chosen freely.

    误用 \(C(x, r)\) 而不是 \(C(x−1, r−1)\)。最后一次试验必须固定为成功,不能自由选择。

  • Forgetting that \(x\) must be at least \(r\).

    忘记 \(x\) 至少等于 \(r\)。

  • Confusing the roles of success and failure when using the PMF.

    使用概率质量函数时混淆成功与失败的角色。

  • Using the binomial formula instead of the negative binomial formula.

    错误地使用二项分布公式而不是负二项分布公式。

Always check the wording of the problem: if the number of successes is fixed and the number of trials is random, use the negative binomial distribution.

始终检查题目表述:如果成功次数固定而试验次数随机,则应用负二项分布。

11. Summary | 小结

The negative binomial distribution is a powerful tool for modelling waiting times until a fixed number of successes.

负二项分布是对“直到固定成功次数出现”这一等待过程进行建模的有力工具。

Here are the key formulas to remember.

以下是需要记住的关键公式。

P(X = x) = C(x−1, r−1) · pʳ · (1−p)ˣ⁻ʳ

E(X) = r ÷ p

Var(X) = r(1−p) ÷ p²

Understanding the derivation makes it much easier to remember these formulas and to apply them correctly in IB exam questions.

理解推导过程能帮助你更轻松地记住这些公式,并在 IB 考试中正确应用。

Published by Tutor

Published by TutorHao | IB 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