Macaulay2 » Documentation
Packages » Probability :: negativeBinomialDistribution
next | previous | forward | backward | up | index | toc

negativeBinomialDistribution -- negative binomial distribution

Synopsis

Description

The negative binomial distribution, the distribution of the number of failures in a sequence of Bernoulli trials (with probability of success p) until the rth success.

i1 : X = negativeBinomialDistribution(5, 0.1)

o1 = NB(5,.1)

o1 : DiscreteProbabilityDistribution
i2 : density_X 20

o2 = .0129187353167939

o2 : RR (of precision 53)
i3 : probability_X 30

o3 = .269251039773836

o3 : RR (of precision 53)
i4 : quantile_X 0.4

o4 = 37
i5 : random X

o5 = 72

Caveat

Probability texts define the negative binomial distribution in a variety of different ways. Our definition is consistent with R.

Ways to use negativeBinomialDistribution :

For the programmer

The object negativeBinomialDistribution is a method function.