nbinrnd
Negative binomial random numbers
Description
generates an array of random numbers, where y = nbinrnd(r,p,sz1,...,szN)sz1,...,szN indicates the
size of each dimension.
generates an array of random numbers, where the vector y = nbinrnd(r,p,sz)sz specifies
size(r).
The simplest application of the negative binomial is the case of successive random
trials, each having a constant probability p of success. The number of
extra trials you must perform in order to observe a given number r of
successes has a negative binomial distribution. However, consistent with a more general
interpretation of the negative binomial, nbinrnd allows
r to be any positive value, including nonintegers.
Examples
Input Arguments
Output Arguments
Alternative Functionality
nbinrndis a function specific to the negative binomial distribution. Statistics and Machine Learning Toolbox™ also offers the generic functionrandom, which supports various probability distributions. To userandom, specify the probability distribution name and its parameters. Note that the distribution-specific functionnbinrndis faster than the generic functionrandom.To generate random numbers interactively, use
randtool, a user interface for random number generation.
Extended Capabilities
Version History
Introduced before R2006a
