Maxima Function
random_negative_binomial (n,p)
random_negative_binomial(n,p,m)
Returns a Negative Binomial(n,p) random variate, with 0<p<1 and n a positive integer. Calling random_negative_binomial
with a third argument m, a random sample of size m will be simulated.
There are three algorithms implemented for this function, the one to be used can be selected giving a certain value to the global variable random_negative_binomial_algorithm
, which defaults to bernoulli
.
See also . To make use of this function, write first load(distrib)
.