Negative binomial distribution with parameters
. If (
- 1)(1 -
≥ 100, the random numbers are generated by NBAR method. Otherwise, the random numbers are generated by combination of inverse transformation and table lookup methods. The NBAR method is a variation of the acceptance/rejection method that uses constant and linear functions (on the fraction close to the distribution mode) and exponential functions (at the distribution tails) as majorizing functions. To ensure that the majorizing functions are close to the normalized probability mass function, five 2D figures are formed from the majorizing and minorizing functions as well as from other auxiliary curves. To avoid time-consuming acceptance/rejection checks, areas with zero probability of rejection are introduced.