Negative Binomial Distribution
A Detailed Step-by-Step Explanation
By Bindeshwar Singh Kushwaha
PostNetwork Academy
Introduction: Relation with Geometric Distribution
- The negative binomial distribution is a generalization of the geometric distribution.
- It describes the number of failures before the \( r^{th} \) success in a sequence of Bernoulli trials.
- When \( r = 1 \), it reduces to the geometric distribution.
Definition of Random Variable
- Let \( X \) denote the number of failures before the \( r^{th} \) success.
- Each trial has:
- Probability of success = \( p \)
- Probability of failure = \( (1-p) \)
- Then \( X = 0, 1, 2, \ldots \)
- We are interested in \( P(X = x) \): the probability of observing \( x \) failures before the \( r^{th} \) success.
Derivation of Probability Mass Function (PMF)
- To have \( x \) failures before the \( r^{th} \) success:
- The last (i.e., \( x + r \)-th) trial must be a success.
- The previous \( x + r – 1 \) trials must contain \( r – 1 \) successes and \( x \) failures.
- Number of ways to arrange \( r – 1 \) successes in \( x + r – 1 \) trials:
\[
\binom{x + r – 1}{r – 1}
\]
Hence,
\[
P(X = x) = \binom{x + r – 1}{r – 1}(1-p)^x p^r
\]
Probability Mass Function (PMF)
\[
P(X = x) = \binom{x + r – 1}{r – 1} (1 – p)^x p^r, \quad x = 0, 1, 2, \ldots
\]
- \( p \): probability of success
- \( 1-p \): probability of failure
- \( r \): number of required successes
- \( \binom{x + r – 1}{r – 1} \): number of arrangements
Mean and Variance: Binomial Distribution
- For the binomial distribution:
\[
\text{Mean} = np, \quad \text{Variance} = np(1-p)
\] - The probabilities for \( X = 0, 1, 2, \ldots \) are the successive terms of \( (q + p)^n \).
Mean and Variance: Negative Binomial (Mean)
- The probabilities for \( X = 0, 1, 2, \ldots \) are successive terms of
\[
\left[ \frac{1}{p} + \left( \frac{q}{p} \right) \right]^r
\] - Thus, the mean is:
\[
\text{Mean} = \frac{rq}{p}
\]
Mean and Variance: Negative Binomial (Variance)
- The variance is:
\[
\text{Var} = \frac{rq}{p^2}
\]
Example 1
Problem: Find the probability that the third head turns up in 5 tosses of an unbiased coin.
Given: \( p = \frac{1}{2}, \, r = 3, \, x + r = 5 \Rightarrow x = 2 \)
\[
P(X = x) = \binom{x + r – 1}{r – 1} p^r (1-p)^x
\]
\[
P(X = 2) = \binom{4}{2} \left( \frac{1}{2} \right)^3 \left( \frac{1}{2} \right)^2 = \frac{3}{16}
\]
Example 2
Problem: Find the probability that the third child in a family is the second daughter.
Given: \( p = \frac{1}{2}, \, r = 2, \, x + r = 3 \Rightarrow x = 1 \)
\[
P(X = 1) = \binom{2}{1} \left( \frac{1}{2} \right)^2 \left( \frac{1}{2} \right)^1 = \frac{1}{4}
\]
Example 3
A proof-reader catches a misprint with probability 0.8. Find the expected number of misprints in which he stops after catching the 20th misprint.
\[
E(X) = \frac{rq}{p} = \frac{20 \times 0.2}{0.8} = 5
\]
\[
E(X + r) = E(X) + r = 5 + 20 = 25
\]
Hence, the expected number of misprints is 25.
Example 4
Find the probability that at least 3 items are examined to get 2 defectives if \( p = 0.1, q = 0.9 \).
\[
P(X \ge 1) = 1 – P(X = 0)
\]
\[
P(X = 0) = {1 \choose 1} (0.1)^2 (0.9)^0 = 0.01
\]
\[
P(X \ge 1) = 1 – 0.01 = 0.99
\]
Hence, the probability is 0.99.
Example 5
A family stops after the second daughter. \( p = \frac{1}{2} \).
\[
E(X) = \frac{rq}{p} = \frac{2 \times \frac{1}{2}}{\frac{1}{2}} = 2
\]
\[
E(X + r) = E(X) + r = 2 + 2 = 4
\]
Expected total children = 4.
Applications
- Modeling number of failures before a fixed number of successes.
- Used in quality control and reliability testing.
- Applied in ecology, insurance, and health studies.
- Generalizes geometric distribution for multiple successes.
NegativeBinomial
Video
Connect with PostNetwork Academy
- Website: www.postnetwork.co
- YouTube: @postnetworkacademy
- Facebook: facebook.com/postnetworkacademy
- LinkedIn: linkedin.com/company/postnetworkacademy
- GitHub: github.com/postnetworkacademy