Next: Negative Binomial Random Variable, Previous: Discrete Uniform Random Variable, Up: Functions and Variables for discrete distributions [Contents][Index]
The hypergeometric distribution is a discrete probability distribution.
Let \(n_1\) be the number of objects of a class \(A\) and \(n_2\) be the number of objects of class \(B\). We take out \(n\) objects, without replacment. Then the hypergeometric distribution is the probability that exactly \(k\) objects are from class \(A\). Of course \(n \leq n_1 + n_2\).
Returns the value at x of the probability function of a \({\it Hypergeometric}(n1,n2,n)\)
random variable, with \(n_1\), \(n_2\) and \(n\) non negative integers and \(n\leq n_1+n_2\). Being \(n_1\) the number of objects of class A, \(n_2\) the number of objects of class B, and \(n\) the size of the sample without replacement, this function returns the probability of event "exactly x objects are of class A".
To make use of this function, write first load("distrib")
.
The pdf is
Returns the value at x of the distribution function of a \({\it Hypergeometric}(n1,n2,n)\)
random variable, with \(n_1\), \(n_2\) and \(n\) non negative
integers and \(n\leq n_1+n_2\).
See pdf_hypergeometric
for a more complete description.
To make use of this function, write first load("distrib")
.
The cdf is
Returns the q-quantile of a
\({\it Hypergeometric}(n1,n2,n)\)
random
variable, with n1, n2 and n non negative integers
and \(n\leq n1+n2\); in other words, this is the inverse of cdf_hypergeometric
. Argument q must be an element of \([0,1]\). To make use of this function, write first load("distrib")
.
Returns the mean of a discrete uniform random variable
\({\it Hypergeometric}(n_1,n_2,n)\)
, with \(n_1\), \(n_2\) and \(n\) non negative integers and \(n\leq n_1+n_2\). To make use of this function, write first load("distrib")
.
The mean is
Returns the variance of a hypergeometric random variable
\({\it Hypergeometric}(n_1,n_2,n)\)
, with \(n1\), \(n2\) and \(n\) non negative integers and \(n<=n1+n2\). To make use of this function, write first load("distrib")
.
The variance is
Returns the standard deviation of a
\({\it Hypergeometric}(n_1,n_2,n)\)
random variable, with \(n_1\), \(n_2\) and \(n\) non negative integers and \(n\leq n_1+n_2\). To make use of this function, write first load("distrib")
.
The standard deviation is
Returns the skewness coefficient of a
\({\it Hypergeometric}(n1,n2,n)\)
random variable, with \(n_1\), \(n_2\) and \(n\) non negative integers and \(n\leq n1+n2\). To make use of this function, write first load("distrib")
.
The skewness coefficient is
Returns the kurtosis coefficient of a
\({\it Hypergeometric}(n_1,n_2,n)\)
random variable, with \(n_1\), \(n_2\) and \(n\) non negative integers and \(n\leq n1+n2\). To make use of this function, write first load("distrib")
.
The kurtosis coefficient is
where \(C(k) = n_1+n_2-k\) .
Returns a
\({\it Hypergeometric}(n1,n2,n)\)
random variate, with n1, n2 and n non negative integers and \(n<=n1+n2\). Calling random_hypergeometric
with a fourth argument m, a random sample of size m will be simulated.
Algorithm described in Kachitvichyanukul, V., Schmeiser, B.W. (1985) Computer generation of hypergeometric random variates. Journal of Statistical Computation and Simulation 22, 127-145.
To make use of this function, write first load("distrib")
.