Negative Binomial Distribution Calculator

Distribution Diagram

Negative Binomial Distribution Calculator

What is Negative Binomial Distribution?

The negative binomial distribution models the number of trials needed to achieve a specified number of successes in a sequence of independent Bernoulli trials, each with the same probability of success.

Formula and Parameters

The probability mass function for the negative binomial distribution is:

\[P(X = n) = \binom{n-1}{r-1} p^r (1-p)^{n-r}\]

Where:

  • \(n\) is the number of trials
  • \(r\) is the number of successes
  • \(p\) is the probability of success on each trial
  • \(\binom{n-1}{r-1}\) is the binomial coefficient

Calculation Steps

  1. Calculate the binomial coefficient \(\binom{n-1}{r-1}\)
  2. Compute \(p^r\)
  3. Compute \((1-p)^{n-r}\)
  4. Multiply these three terms together

Example Calculation

Let's calculate the probability of getting 3 successes in 5 trials, with a success probability of 0.4:

  1. \(\binom{5-1}{3-1} = \binom{4}{2} = 6\)
  2. \(0.4^3 = 0.064\)
  3. \((1-0.4)^{5-3} = 0.6^2 = 0.36\)
  4. \(6 \times 0.064 \times 0.36 = 0.13824\)

Visual Representation

Number of Trials Probability

This graph illustrates a typical negative binomial distribution. The height of each bar represents the probability of achieving the required number of successes at that specific number of trials.