Functions, Operators, Switch Cases and Truth Tables : Predefined Functions : Random Functions

Random Functions

The following table lists the random functions supported by Rational Statemate

.
Accepts two arguments, where n>0 and 0<p<1. The returned random values are real numbers distributed according to a binomial distribution.
Function: X ~ B(n,p)
Returns random real values distributed exponentially by the value t.
Use the syntax x=rand_exponential(t) to make x equal to a randomly generated number. The syntax x=random_exponential
(t) is accepted, but it makes x equal to the first value in an array called random_exponential.
Function: X ~ exp(t)
Returns random integer values distributed according to a uniform distribution in the interval [a,b].
Function: X ~ U[a,b]
Returns random real values distributed according to a normal distribution.
Function: X ~ N[a,b]
Returns random integer values distributed according to a poisson distribution.
Function: X ~ P(r)
Returns random real values distributed according to a uniform distribution in the interval [a,b].
Function: X ~ U[a,b]
Returns a random real value distributed uniformly between 0 and 1.
If the passed argument is not 0, a new sequence of random values, whose seed is the parameter, i, is initialized.
Because Rational Statemate initiates a session with the same seed for random functions, two consecutive executions will behave identically. The advantage to this behavior is that you can reconstruct a particular execution scenario. New scenarios are produced by providing different seeds.