Getting Started | Documentation | Glish | Learn More | Programming | Contact Us |
Version 1.9 Build 1556 |
|
Package | utility | |
Module | mathematics | |
Tool | randomnumbers |
The hypergeometric function will generate numbers that follow a hyper-geometric distribution. I cannot find a mathematical definition of a probability density function that represents the output produced by this function.
The variance must be a positive number and the mean must be non-zero and less than the square-root of the variance. The result will be floating point numbers in the range 0 < x < if the mean is positive and in the range - < x < 0 if it is negative. The shape can be either an integer or a vector of integers where all the values are greater than zero. The default value of one will produce a scalar output.
mean | in | Mean of the distribution | |
Allowed: | double | ||
Default: | 0.5 | ||
variance | in | Variance of the distribution | |
Allowed: | double | ||
Default: | 1.0 | ||
shape | in | Shape of the output array | |
Allowed: | integer or a vector of integers | ||
Default: | 1 |
include 'randomnumbers.g' rand := randomnumbers(); numbers := rand.hypergeometric(2, 8, 1E3); rand.done()This example will calculate a thousand hypergeometric random numbers.