%mathpiper,def="HypergeometricDistribution"

/* Guard against distribution objects with senseless parameters
   Anti-nominalism */

HypergeometricDistribution(N_IsRationalOrNumber, M_IsRationalOrNumber, n_IsRationalOrNumber)_(M > N Or n > N)
   <-- Undefined;

%/mathpiper




%mathpiper_docs,name="HypergeometricDistribution",categories="User Functions;Statistics & Probability"
*CMD HypergeometricDistribution --- Hypergeometric distribution
*STD
*CALL
	HypergeometricDistribution(N, M, n)

*PARMS

{N} -- number, a finite population
{M} -- number of items from N that fall into a class of interest
{n} -- number of items drawn from N

*DESC

A discrete probability distribution that describes the number of successes in a sequence of
draws from a finite population without replacement.  The hypergeometric distribution is the
probability model which is used for selecting a random sample of n items without replacement 
from a lot of N items, M of which are nonconforming or defective.

*E.G.

/%mathpiper,title=""

PDF(HypergeometricDistribution(100,5,10),0);

/%/mathpiper

    /%output,preserve="false"
      Result: 0.5837523670
.   /%/output



/%mathpiper,title=""

CDF(HypergeometricDistribution(100,5,10),1);

/%/mathpiper

    /%output,preserve="false"
      Result: 0.9231432779
.   /%/output

*SEE BinomialDistribution, BernoulliDistribution, ChiSquareDistribution, DiscreteUniformDistribution, ExponentionalDistribution, GeometricDistribution, NormalDistribution, PoissonDistribution, tDistribution
%/mathpiper_docs

    %output,preserve="false"
      
.   %/output

