Term definitions
- Random-number generator: A function that generates numbers that are uniformly distributed over the interval (0,1).
- Random-variate generator: A function that generates numbers whose probability distribution is different from that of the uniform on the interval (0,1).
Random-variate generators
Below is a brief summary of the random-number generators that are available. Click on a function name to see a more detailed explanation.
bernoulli(p:real) : int
, raisesBernoulli
exception, ifp<0.0
orp>1.0
.beta(a:real, b:real) : real
, raisesBeta
exception, ifa<=0.0
orb<=0.0
.binomial(n:int, p:real) : int
, raisesBinomial
exception, ifn<1
orp<0.0
orp>1.0
.chisq(n:int) : real
, raisesChisq
exception, ifn<1
.discrete(a:int, b:int) : int
, raisesDiscrete
exception, ifa>b
.erlang(n:int, r:real) : real
, raisesErlang
exception, ifn<1
orr<=0.0
.exponential(r:real) : real
, raisesExponential
exception, ifr<=0.0
.gamma(l:real, k:real) : real
, raisesGamma
exception, ifk<=0.0
orl<=0.0
.normal(n:real, v:real) : real
, raisesNormal
exception, ifv<0.0
.poisson(m:real) : int
, raisesPoisson
exception, ifm<=0.0
.rayleigh(s:real) : real
, raisesRayleigh
exception, ifs<0.0
.student(n:int) : real
, raisesStudent
exception, ifn<1
.uniform(a:real, b:real) : real
, raisesUniform
exception, ifa>b
.weibull(lambda:real, k:real) : real
, raisesWeibull
exception, iflambda<=0
ork<=0
.
You must be logged in to post a comment.