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

hypergeometricDistribution -- hypergeometric distribution

Synopsis

Description

The hypergeometric distribution, the number of white balls drawn after drawing k balls from an urn containing m white and n black balls.

i1 : X = hypergeometricDistribution(5, 6, 4)

o1 = HG(5,6,4)

o1 : DiscreteProbabilityDistribution
i2 : density_X 2

      5
o2 = --
     11

o2 : QQ
i3 : probability_X 3

     65
o3 = --
     66

o3 : QQ
i4 : quantile_X 0.4

o4 = 2
i5 : random X

o5 = 3

Caveat

Probability texts often use the total number of balls (our m + n) as one of the parameters of this distribution. Our definition is consistent with R.

Ways to use hypergeometricDistribution :

For the programmer

The object hypergeometricDistribution is a method function.