Student[Statistics] - Maple Programming Help

Home : Support : Online Help : Education : Student Package : Statistics : Random Variable Distributions : Student/Statistics/HypergeometricRandomVariable

Student[Statistics]

 HypergeometricRandomVariable
 hypergeometric random variable

 Calling Sequence HypergeometricRandomVariable(M, X, m)

Parameters

 M - population size X - number of successes in population m - number of trials from population

Description

 • The hypergeometric random variable is a discrete probability random variable with probability function given by:

$f\left(t\right)=\mathrm{piecewise}\left(t<0,0,X

 subject to the following conditions:

$0\le M,m\le M,X\le M,0\le m,0\le X,M::\mathrm{integer},X::\mathrm{integer},m::\mathrm{integer}$

 • The hypergeometric random variable is a consequence of a sequence of repeated trials (such as drawing balls from an urn) whereby items drawn are not replaced after each trial.  In each trial, there is assumed to be a certain number of successes remaining that could be obtained.  This random variable measures the probability of achieving a certain number of successes after all trials are complete.

Notes

 • The Quantile and CDF functions applied to a hypergeometric distribution use a sequence of iterations in order to converge upon the desired output point.  The maximum number of iterations to perform is equal to 100 by default, but this value can be changed by setting the environment variable _EnvStatisticsIterations to the desired number of iterations.

Examples

 > $\mathrm{with}\left(\mathrm{Student}[\mathrm{Statistics}]\right):$
 > $X≔\mathrm{HypergeometricRandomVariable}\left(5,z,m\right):$
 > $\mathrm{ProbabilityFunction}\left(X,u\right)$
 ${{}\begin{array}{cc}{0}& {u}{<}{0}\\ {0}& {z}{<}{u}\\ \frac{{\mathrm{binomial}}{}\left({z}{,}{u}\right){}{\mathrm{binomial}}{}\left({5}{-}{z}{,}{m}{-}{u}\right)}{{\mathrm{binomial}}{}\left({5}{,}{m}\right)}& {\mathrm{otherwise}}\end{array}$ (1)
 > $\mathrm{ProbabilityFunction}\left(X,2\right)$
 ${{}\begin{array}{cc}{0}& {z}{<}{2}\\ \frac{{\mathrm{binomial}}{}\left({z}{,}{2}\right){}{\mathrm{binomial}}{}\left({5}{-}{z}{,}{m}{-}{2}\right)}{{\mathrm{binomial}}{}\left({5}{,}{m}\right)}& {\mathrm{otherwise}}\end{array}$ (2)
 > $\mathrm{Mean}\left(X\right)$
 $\frac{{1}}{{5}}{}{m}{}{z}$ (3)
 > $\mathrm{Variance}\left(X\right)$
 $\frac{{1}}{{20}}{}{m}{}{z}{}\left({1}{-}\frac{{1}}{{5}}{}{z}\right){}\left({5}{-}{m}\right)$ (4)
 > $Y≔\mathrm{HypergeometricRandomVariable}\left(10,3,7\right):$
 > $\mathrm{ProbabilityFunction}\left(Y,x,\mathrm{output}=\mathrm{plot}\right)$
 > $\mathrm{CDF}\left(Y,x\right)$
 ${\sum }_{{i}{=}{0}}^{{\mathrm{max}}{}\left({-}{1}{,}{\mathrm{floor}}{}\left({x}\right)\right)}\phantom{\rule[-0.0ex]{5.0px}{0.0ex}}\frac{{1}}{{120}}{}{\mathrm{binomial}}{}\left({3}{,}{i}\right){}{\mathrm{binomial}}{}\left({7}{,}{7}{-}{i}\right)$ (5)
 > $\mathrm{CDF}\left(Y,3,\mathrm{output}=\mathrm{plot}\right)$

References

 Evans, Merran; Hastings, Nicholas; and Peacock, Brian. Statistical Distributions. 3rd ed. Hoboken: Wiley, 2000.
 Johnson, Norman L.; Kotz, Samuel; and Balakrishnan, N. Continuous Univariate Distributions. 2nd ed. 2 vols. Hoboken: Wiley, 1995.
 Stuart, Alan, and Ord, Keith. Kendall's Advanced Theory of Statistics. 6th ed. London: Edward Arnold, 1998. Vol. 1: Distribution Theory.

Compatibility

 • The Student[Statistics][HypergeometricRandomVariable] command was introduced in Maple 18.