homechevron_rightProfessionalchevron_rightStatistics

# Negative Binomial Distribution. Probability density function, cumulative distribution function, mean and variance

This calculator calculates negative binomial distribution pdf, cdf, mean and variance for given parameters

### This page exists due to the efforts of the following people:

In the theory of probability and statistics, a Bernoulli trial (or binomial trial) is a random experiment with exactly two possible outcomes, "success" and "failure", in which the probability of success is the same every time the experiment is conducted. Wikipedia

When we want to know the probability of k successes in n such trials, we should look into binomial distribution.
When we want to know the probability of getting the first success on k-th trial, we should look into geometric distribution.

When we want to know the probability that the k-th success is observed on the n-th trial, we should look into negative binomial distribution.

Probability density function of negative binomial distribution is
$f(x)=C^{x-1}_{k-1}p^{k}(1-p)^{x-k}$
where

• p is the probability of success of a single trial,
• x is the trial number on which the k-th success occurs.
• $C^{n}_{m}=\frac{n!}{m!(n-m)!}$ is the number of combinations of m from n

Cumulative distribution function of negative binomial distribution is
$F(x)=1-I_p(k+1,x-k)$
where

• $I_x(a,b)$ is the regularized incomplete beta function

Note that $f(k)=p^k$, that is, the chance to get the k-th success on the k-th trial is exactly k multiplications of p, which is quite obvious.

Mean or expected value for the negative binomial distribution is
$\mu_x=\frac{k}{p}$

Variance is
$\sigma^{2}_{x}=\frac{k(1-p)}{p^2}$

The calculator below calculates mean and variance of negative binomial distribution and plots probability density function and cumulative distribution function for given parameters: the probability of success p, number of successes k and the number of trials to plot on chart n.

Note that there are other formulation of negative binomial distribution. They are created using the following notation: n - number of trials, r - number of failures, k - number of successes, with n=k+r. These are:

• k successes, given r failures
• n trials, given r failures
• r failures, given k successes
• n trials, given k successes (case described above)
• k successes, given n trials (binomial distribution).

They have slightly different formulas.

### Negative Binomial Distribution. Probability density function, cumulative distribution function, mean and variance

Digits after the decimal point: 2
Mean

Variance

Negative Binomial Distribution
Cumulative distribution function
Save the calculation to reuse next time or share with friends.