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

negativeBinomialDistribution -- negative binomial distribution

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 = .2692510397738366

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:

  • negativeBinomialDistribution(Number,Number)

For the programmer

The object negativeBinomialDistribution is a method function.


The source of this document is in /build/reproducible-path/macaulay2-1.25.06+ds/M2/Macaulay2/packages/Probability.m2:1025:0.