Random Numbers

  • RAND a random number between zero and one
  • RANDBERNOULLI random variate from a Bernoulli distribution
  • RANDBETA random variate from a Beta distribution
  • RANDBETWEEN a random integer number between and including bottom and top
  • RANDBINOM random variate from a binomial distribution
  • RANDCAUCHY random variate from a Cauchy or Lorentz distribution
  • RANDCHISQ random variate from a Chi-square distribution
  • RANDDISCRETE random variate from a finite discrete distribution
  • RANDEXP random variate from an exponential distribution
  • RANDEXPPOW random variate from an exponential power distribution
  • RANDFDIST random variate from an F distribution
  • RANDGAMMA random variate from a Gamma distribution
  • RANDGEOM random variate from a geometric distribution
  • RANDGUMBEL random variate from a Gumbel distribution
  • RANDHYPERG random variate from a hypergeometric distribution
  • RANDLANDAU random variate from the Landau distribution
  • RANDLAPLACE random variate from a Laplace distribution
  • RANDLEVY random variate from a Lévy distribution
  • RANDLOG random variate from a logarithmic distribution
  • RANDLOGISTIC random variate from a logistic distribution
  • RANDLOGNORM random variate from a lognormal distribution
  • RANDNEGBINOM random variate from a negative binomial distribution
  • RANDNORM random variate from a normal distribution
  • RANDNORMTAIL random variate from the upper tail of a normal distribution with mean 0
  • RANDPARETO random variate from a Pareto distribution
  • RANDPOISSON random variate from a Poisson distribution
  • RANDRAYLEIGH random variate from a Rayleigh distribution
  • RANDRAYLEIGHTAIL random variate from the tail of a Rayleigh distribution
  • RANDSNORM random variate from a skew-normal distribution
  • RANDSTDIST random variate from a skew-t distribution
  • RANDTDIST random variate from a Student t distribution
  • RANDUNIFORM random variate from the uniform distribution from a to b
  • RANDWEIBULL random variate from a Weibull distribution
  • SIMTABLE one of the values in the given argument list depending on the round number of the simulation tool

RAND

RAND a random number between zero and one

Synopsis

RAND()

Microsoft Excel Compatibility

This function is Excel compatible.

See also

RANDBETWEEN.

RANDBERNOULLI

RANDBERNOULLI random variate from a Bernoulli distribution

Synopsis

RANDBERNOULLI(p)

Arguments

p: probability of success

Note

If p < 0 or p > 1 RANDBERNOULLI returns #NUM!

See also

RAND, RANDBETWEEN.

RANDBETA

RANDBETA random variate from a Beta distribution

Synopsis

RANDBETA(a,b)

Arguments

a: parameter of the Beta distribution

b: parameter of the Beta distribution

See also

RAND, RANDGAMMA.

RANDBETWEEN

RANDBETWEEN a random integer number between and including bottom and top

Synopsis

RANDBETWEEN(bottom,top)

Arguments

bottom: lower limit

top: upper limit

Note

If bottom > top, RANDBETWEEN returns #NUM!

Microsoft Excel Compatibility

This function is Excel compatible.

See also

RAND, RANDUNIFORM.

RANDBINOM

RANDBINOM random variate from a binomial distribution

Synopsis

RANDBINOM(p,n)

Arguments

p: probability of success in a single trial

n: number of trials

Note

If p < 0 or p > 1 RANDBINOM returns #NUM! If n < 0 RANDBINOM returns #NUM!

See also

RAND, RANDBETWEEN.

RANDCAUCHY

RANDCAUCHY random variate from a Cauchy or Lorentz distribution

Synopsis

RANDCAUCHY(a)

Arguments

a: scale parameter of the distribution

Note

If a < 0 RANDCAUCHY returns #NUM!

See also

RAND.

RANDCHISQ

RANDCHISQ random variate from a Chi-square distribution

Synopsis

RANDCHISQ(df)

Arguments

df: degrees of freedom

See also

RAND, RANDGAMMA.

RANDDISCRETE

RANDDISCRETE random variate from a finite discrete distribution

Synopsis

RANDDISCRETE(val_range,prob_range)

Arguments

val_range: possible values of the random variable

prob_range: probabilities of the corresponding values in val_range, defaults to equal probabilities

Description

RANDDISCRETE returns one of the values in the val_range. The probabilities for each value are given in the prob_range.

Note

If the sum of all values in prob_range is not one, RANDDISCRETE returns #NUM! If val_range and prob_range are not the same size, RANDDISCRETE returns #NUM! If val_range or prob_range is not a range, RANDDISCRETE returns #VALUE!

See also

RANDBETWEEN, RAND.

RANDEXP

RANDEXP random variate from an exponential distribution

Synopsis

RANDEXP(b)

Arguments

b: parameter of the exponential distribution

See also

RAND, RANDBETWEEN.

RANDEXPPOW

RANDEXPPOW random variate from an exponential power distribution

Synopsis

RANDEXPPOW(a,b)

Arguments

a: scale parameter of the exponential power distribution

b: exponent of the exponential power distribution

Description

For b = 1 the exponential power distribution reduces to the Laplace distribution.

For b = 2 the exponential power distribution reduces to the normal distribution with σ = a/sqrt(2)

See also

RAND.

RANDFDIST

RANDFDIST random variate from an F distribution

Synopsis

RANDFDIST(df1,df2)

Arguments

df1: numerator degrees of freedom

df2: denominator degrees of freedom

See also

RAND, RANDGAMMA.

RANDGAMMA

RANDGAMMA random variate from a Gamma distribution

Synopsis

RANDGAMMA(a,b)

Arguments

a: shape parameter of the Gamma distribution

b: scale parameter of the Gamma distribution

Note

If a ≤ 0, RANDGAMMA returns #NUM!

See also

RAND.

RANDGEOM

RANDGEOM random variate from a geometric distribution

Synopsis

RANDGEOM(p)

Arguments

p: probability of success in a single trial

Note

If p < 0 or p > 1 RANDGEOM returns #NUM!

See also

RAND.

RANDGUMBEL

RANDGUMBEL random variate from a Gumbel distribution

Synopsis

RANDGUMBEL(a,b,type)

Arguments

a: parameter of the Gumbel distribution

b: parameter of the Gumbel distribution

type: type of the Gumbel distribution, defaults to 1

Note

If type is neither 1 nor 2, RANDGUMBEL returns #NUM!

See also

RAND.

RANDHYPERG

RANDHYPERG random variate from a hypergeometric distribution

Synopsis

RANDHYPERG(n1,n2,t)

Arguments

n1: number of objects of type 1

n2: number of objects of type 2

t: total number of objects selected

See also

RAND.

RANDLANDAU

RANDLANDAU random variate from the Landau distribution

Synopsis

RANDLANDAU()

See also

RAND.

RANDLAPLACE

RANDLAPLACE random variate from a Laplace distribution

Synopsis

RANDLAPLACE(a)

Arguments

a: parameter of the Laplace distribution

See also

RAND.

RANDLEVY

RANDLEVY random variate from a Lévy distribution

Synopsis

RANDLEVY(c,α,β)

Arguments

c: parameter of the Lévy distribution

α: parameter of the Lévy distribution

β: parameter of the Lévy distribution, defaults to 0

Description

For α = 1, β=0, the Lévy distribution reduces to the Cauchy (or Lorentzian) distribution.

For α = 2, β=0, the Lévy distribution reduces to the normal distribution.

Note

If α ≤ 0 or α > 2, RANDLEVY returns #NUM! If β < -1 or β > 1, RANDLEVY returns #NUM!

See also

RAND.

RANDLOG

RANDLOG random variate from a logarithmic distribution

Synopsis

RANDLOG(p)

Arguments

p: probability

Note

If p < 0 or p > 1 RANDLOG returns #NUM!

See also

RAND.

RANDLOGISTIC

RANDLOGISTIC random variate from a logistic distribution

Synopsis

RANDLOGISTIC(a)

Arguments

a: parameter of the logistic distribution

See also

RAND.

RANDLOGNORM

RANDLOGNORM random variate from a lognormal distribution

Synopsis

RANDLOGNORM(ζ,σ)

Arguments

ζ: parameter of the lognormal distribution

σ: standard deviation of the distribution

Note

If σ < 0, RANDLOGNORM returns #NUM!

See also

RAND.

RANDNEGBINOM

RANDNEGBINOM random variate from a negative binomial distribution

Synopsis

RANDNEGBINOM(p,n)

Arguments

p: probability of success in a single trial

n: number of failures

Note

If p < 0 or p > 1 RANDNEGBINOM returns #NUM! If n < 1 RANDNEGBINOM returns #NUM!

See also

RAND, RANDBETWEEN.

RANDNORM

RANDNORM random variate from a normal distribution

Synopsis

RANDNORM(μ,σ)

Arguments

μ: mean of the distribution

σ: standard deviation of the distribution

Note

If σ < 0, RANDNORM returns #NUM!

See also

RAND.

RANDNORMTAIL

RANDNORMTAIL random variate from the upper tail of a normal distribution with mean 0

Synopsis

RANDNORMTAIL(a,σ)

Arguments

a: lower limit of the tail

σ: standard deviation of the normal distribution

Note

The method is based on Marsaglia's famous rectangle-wedge-tail algorithm (Ann Math Stat 32, 894-899 (1961)), with this aspect explained in Knuth, v2, 3rd ed, p139, 586 (exercise 11).

See also

RAND.

RANDPARETO

RANDPARETO random variate from a Pareto distribution

Synopsis

RANDPARETO(a,b)

Arguments

a: parameter of the Pareto distribution

b: parameter of the Pareto distribution

See also

RAND.

RANDPOISSON

RANDPOISSON random variate from a Poisson distribution

Synopsis

RANDPOISSON(λ)

Arguments

λ: parameter of the Poisson distribution

Note

If λ < 0 RANDPOISSON returns #NUM!

See also

RAND, RANDBETWEEN.

RANDRAYLEIGH

RANDRAYLEIGH random variate from a Rayleigh distribution

Synopsis

RANDRAYLEIGH(σ)

Arguments

σ: scale parameter of the Rayleigh distribution

See also

RAND.

RANDRAYLEIGHTAIL

RANDRAYLEIGHTAIL random variate from the tail of a Rayleigh distribution

Synopsis

RANDRAYLEIGHTAIL(a,σ)

Arguments

a: lower limit of the tail

σ: scale parameter of the Rayleigh distribution

See also

RAND, RANDRAYLEIGH.

RANDSNORM

RANDSNORM random variate from a skew-normal distribution

Synopsis

RANDSNORM(𝛼,𝜉,𝜔)

Arguments

𝛼: shape parameter of the skew-normal distribution, defaults to 0

𝜉: location parameter of the skew-normal distribution, defaults to 0

𝜔: scale parameter of the skew-normal distribution, defaults to 1

Description

The random variates are drawn from a skew-normal distribution with shape parameter 𝛼. When 𝛼=0, the skewness vanishes, and we obtain the standard normal density; as 𝛼 increases (in absolute value), the skewness of the distribution increases; when 𝛼 approaches infinity the density converges to the so-called half-normal (or folded normal) density function; if the sign of 𝛼 changes, the density is reflected on the opposite side of the vertical axis.

Note

The mean of a skew-normal distribution with location parameter 𝜉=0 is not 0. The standard deviation of a skew-normal distribution with scale parameter 𝜔=1 is not 1. The skewness of a skew-normal distribution is in general not 𝛼. If 𝜔 < 0, RANDSNORM returns #NUM!

See also

RANDNORM, RANDSTDIST.

RANDSTDIST

RANDSTDIST random variate from a skew-t distribution

Synopsis

RANDSTDIST(df,𝛼)

Arguments

df: degrees of freedom

𝛼: shape parameter of the skew-t distribution, defaults to 0

Note

The mean of a skew-t distribution is not 0. The standard deviation of a skew-t distribution is not 1. The skewness of a skew-t distribution is in general not 𝛼.

See also

RANDTDIST, RANDSNORM.

RANDTDIST

RANDTDIST random variate from a Student t distribution

Synopsis

RANDTDIST(df)

Arguments

df: degrees of freedom

See also

RAND.

RANDUNIFORM

RANDUNIFORM random variate from the uniform distribution from a to b

Synopsis

RANDUNIFORM(a,b)

Arguments

a: lower limit of the uniform distribution

b: upper limit of the uniform distribution

Note

If a > b RANDUNIFORM returns #NUM!

See also

RANDBETWEEN, RAND.

RANDWEIBULL

RANDWEIBULL random variate from a Weibull distribution

Synopsis

RANDWEIBULL(a,b)

Arguments

a: scale parameter of the Weibull distribution

b: shape parameter of the Weibull distribution

See also

RAND.

SIMTABLE

SIMTABLE one of the values in the given argument list depending on the round number of the simulation tool

Synopsis

SIMTABLE(d1,d2,…)

Arguments

d1: first value

d2: second value

Description

SIMTABLE returns one of the values in the given argument list depending on the round number of the simulation tool. When the simulation tool is not activated, SIMTABLE returns d1.

With the simulation tool and the SIMTABLE function you can test given decision variables. Each SIMTABLE function contains the possible values of a simulation variable. In most valid simulation models you should have the same number of values dN for all decision variables. If the simulation is run more rounds than there are values defined, SIMTABLE returns #N/A error (e.g. if A1 contains `=SIMTABLE(1)' and A2 `=SIMTABLE(1,2)', A1 yields #N/A error on the second round).

The successive use of the simulation tool also requires that you give to the tool at least one input variable having RAND() or any other RAND<distribution name>() function in it. On each round, the simulation tool iterates for the given number of rounds over all the input variables to reevaluate them. On each iteration, the values of the output variables are stored, and when the round is completed, descriptive statistical information is created according to the values.