Negative Binomial |
The negative binomial distribution is a discrete probability distribution of the number of successes in a sequence of Bernoulli trials before a specified (non-random) number r of failures occurs.
Suppose there is a sequence of independent Bernoulli trials, each trial having two potential outcomes called “success” and “failure”. In each trial the probability of success is p and of failure is (1 − p). We are observing this sequence until a predefined number r of failures has occurred. Then the random number of successes we have seen, X, will have the negative binomial distribution:
This topic contains the following sections:
Constructor | Description | Performance |
---|---|---|
set success probability and number of failures | Creates new instance of NegativeBinomial with user specified parameters. | |
set random generator | Creates new instance of NegativeBinomial with user specified parameters and generator. |
Method | Description | Performance |
---|---|---|
sample | Generate random variable sample. Fill in array with random variable series in place: Static method which generates new sample of negative binomial distribution variate with specified parameters: | |
pmf | Probability mass function. Static probability mass function. | |
cdf | Cumulative distribution function. Static cumulative distribution function. | |
inverse cdf | Inverse cumulative distribution function. Is useful for quantile calculation. Function will return value of random variable such that likelihood for this random variable to occur less than or equal to returned value equal to specified pvalue parameter. |
Property | Description | Performance |
---|---|---|
number of failures | Number of failures until the experiment is stopped. | |
success probability | Success probability in each trial. | |
mean | Mean of the distribution. | |
mode | Mode of distribution. | |
kurtosis | Excess Kurtosis of distribution. | |
skewness | Skewness of distribution. | |
variance | Variance of the distribution. |