The negative binomial distribution

The negative binomial distribution

Spec 3.3 · Edexcel A-Level Further Maths: Revision notes

Studying this course? Keep your progress in one place.

Key facts

  • X∼NB(r,p)X\sim\text{NB}(r,p) is the number of trials needed to get rr successes, so x=r,r+1,r+2,…x=r,r+1,r+2,\dots
  • P(X=x)=(x−1r−1)pr(1−p)x−rP(X=x)=\binom{x-1}{r-1}p^r(1-p)^{x-r}.
  • E(X)=rpE(X)=\frac rp and Var(X)=r(1−p)p2\text{Var}(X)=\frac{r(1-p)}{p^2}: rr times the geometric values.
  • With r=1r=1 it is the geometric distribution.
  • Binomial fixes the trials; negative binomial fixes the successes.

The negative binomial model

The number of independent trials needed to obtain rr successes.

The negative binomial distribution extends the geometric distribution. With independent trials, each with probability pp of success, XX is the number of trials needed to obtain rr successes: X∼NB(r,p)X\sim\text{NB}(r,p).

The conditions are the same as for the geometric model: two outcomes, constant pp and independent trials.

The rrth success must happen on trial XX, so x=r,r+1,r+2,…x=r,r+1,r+2,\dots When r=1r=1 it is geometric. The number of rolls of a fair die to get two sixes is NB(2,16)\text{NB}\left(2,\frac16\right).

00.010.020.030.040.050.060.07234567891011121314Number of rolls xP(X = x)
NB(2, 1/6): the number of rolls of a fair die needed to get two sixes (probabilities to 3 d.p.)

Binomial

Fixed in advance:
Number of trials nn
What you count:
Successes

Geometric

Fixed in advance:
One success
What you count:
Trials to the first success

Negative binomial

Fixed in advance:
Number of successes rr
What you count:
Trials to the rrth success

How many rolls of a fair die are needed to get three sixes?

The probability function

Trial xx is the rrth success, and the earlier x−1x-1 trials contain exactly r−1r-1 successes in any order.

Trial xx must be the rrth success, giving a factor pp. The first x−1x-1 trials contain exactly r−1r-1 successes in any order, with probability (x−1r−1)pr−1(1−p)x−r\binom{x-1}{r-1}p^{r-1}(1-p)^{x-r}. Multiplying gives the formula.

The binomial coefficient is (x−1r−1)\binom{x-1}{r-1}, not (xr)\binom xr: the final trial is fixed as a success, so only the first x−1x-1 trials can be arranged.

For "on or before" probabilities, add the individual terms. For "more than", use 1−P(X≤x)1-P(X\leq x) as it has fewer terms.

  1. 1

    First x − 1 trials

    exactly r − 1 successes in any order: C(x−1, r−1) p^(r−1) (1−p)^(x−r)

  2. 2

    Trial x

    must be the rth success, with probability p

  3. 3

    Multiply

    P(X = x) = C(x−1, r−1) p^r (1−p)^(x−r), for x = r, r+1, r+2, …

Building the negative binomial probability function
  • P(X=x)P(X=x)(x−1r−1)pr(1−p)x−r\dbinom{x-1}{r-1}p^r(1-p)^{x-r}

Worked example

A shooter hits with probability 0.30.3 and XX is the number of shots needed for 33 hits. Find P(X=5)P(X=5) and P(X≤4)P(X\leq4).

X∼NB(2,0.5)X\sim\text{NB}(2,0.5). Find P(X=4)P(X=4).

Mean and variance

They are rr times the geometric mean and variance.

For X∼NB(r,p)X\sim\text{NB}(r,p): μ=E(X)=rp\mu=E(X)=\frac rp and σ2=Var(X)=r(1−p)p2\sigma^2=\text{Var}(X)=\frac{r(1-p)}{p^2}.

These are in the formulae booklet and you do not need to prove them. They are rr times the geometric mean and variance, which fits waiting for rr successes one after another.

Do not use pp instead of p2p^2 in the denominator of the variance, or leave out the factor rr.

02040608010012061234rValue
  • Mean
  • Variance
Mean r/p and variance r(1−p)/p² for NB(r, 1/6): both are r times the geometric values 6 and 30
  • Mean E(X)E(X)rp\dfrac rp
  • Variance Var(X)\text{Var}(X)r(1−p)p2\dfrac{r(1-p)}{p^2}

Worked example

Find the mean and variance when r=4r=4 and p=0.25p=0.25, and when r=2r=2 and p=16p=\frac16 (rolls of a die to get two sixes).

X∼NB(5,0.5)X\sim\text{NB}(5,0.5). Find E(X)E(X) and Var(X)\text{Var}(X).

Using the model in context

State the trial and success, give X∼NB(r,p)X\sim\text{NB}(r,p), then add the right probabilities.

State what a trial and a success are, then give X∼NB(r,p)X\sim\text{NB}(r,p) with the values of rr and pp.

The model suits "first to rr" situations. For a best-of-five series won by the first team to 33 wins, imagine the games continuing regardless. A team wins the series if its third win comes by game 55, so you add P(X=3)P(X=3), P(X=4)P(X=4) and P(X=5)P(X=5).

For the series to last exactly five games, either team's third win is on game 5: add the two probabilities, which cannot happen together. Check assumptions such as independence and constant pp.

  1. 1

    Define

    say what a trial and a success are

  2. 2

    State

    give X ~ NB(r, p) with its values

  3. 3

    Calculate

    write each term of the sum on its own line

  4. 4

    Comment

    check independence and constant p

Applying the model.

Worked example

Two evenly matched teams play a best-of-five series, so each wins a game with probability 0.50.5. The first to 33 wins takes the series. Find the probability that the series lasts exactly five games.

Team A wins each game with probability 0.60.6. What is the probability that A wins the series in exactly 3 games?

Try an exam question

A shooter hits a target with probability 0.40.4 on each independent shot. Let XX be the number of shots needed to score 33 hits. Find P(X=5)P(X=5) and E(X)E(X).

[5 marks]

That's the notes covered.

Carry on to the next subtopic.

Try a question

Find P(X=5)\mathrm{P}(X=5).

1 mark, marked against the mark scheme

Revision notes