Download SIMSCRIPT III Language Manual
Transcript
5.05 Random-Number Generation ________________________________________________________________________ beta.f ( double_arg1, double_arg2, integer_arg ) A double function that returns a random number in the range zero to one from the beta distribution having shape parameters α 1 equal to double_arg1 and α 2 equal to double_arg2, and mean µ equal to α1 , where α1 > 0 and α 2 > 0 . α1 + α 2 Integer_arg must specify a random number stream between 1 and dim.f(seed.v), or a negative stream number to generate the antithetic variate. ________________________________________________________________________ binomial.f ( integer_arg1, double_arg, integer_arg2 ) An integer function that returns a random number in the range zero to n from the binomial distribution having parameters n equal to integer_arg1 and p equal to double_arg, and mean µ equal to np, where n > 0 and p > 0 . The return value represents a random number of successes in n independent trials where p is the probability of success for each trial. Integer_arg2 must specify a random number stream between 1 and dim.f(seed.v), or a negative stream number to generate the antithetic variate. If n equals 1, the binomial distribution is the same as the Bernoulli distribution. ________________________________________________________________________ erlang.f ( double_arg, integer_arg1, integer_arg2 ) A double function that returns a nonnegative random number from the Erlang distribution having mean µ equal to double_arg, shape parameter α equal to integer_arg1, and scale µ , where µ > 0 and α > 0 . Integer_arg2 must specify a random parameter β equal to α number stream between 1 and dim.f(seed.v), or a negative stream number to generate the antithetic variate. ________________________________________________________________________ exponential.f ( double_arg, integer_arg ) A double function that returns a nonnegative random number from the exponential distribution having mean µ equal to double_arg, where µ > 0 . Integer_arg must specify a random number stream between 1 and dim.f(seed.v), or a negative stream number to generate the antithetic variate. ________________________________________________________________________ 63