Darwin Help

Back to Index

Normal_Rand

Function Normal_Rand - Generate random normally distributed numbers

Calling Sequence  Rand(Normal)
Rand(Normal(m,s2))
Normal_Rand()
Parameters
NameTypeDescription

m numericexpected value of the variable
s2 nonnegativevariance of the variable
Return Type  numeric
Globals Normal_Rand_2,
Synopsis This function returns a random number normally distributed with average 0 and variance 1. Normal_Rand uses Rand() which can be seeded by either the function SetRand or SetRandSeed. An normal variable with average m and variance s2 is obtained with the expression sqrt(s2)*Rand(Normal) + m or with Rand(Normal(m,s2)).
References Handbook of Mathematical functions, Abramowitz and Stegun, 26.1.26 and 26.2
Examples
> Normal_Rand();
-1.1226
> [Rand(Normal),Rand(Normal)];
[1.3331, -3.4745]
> Rand(Normal(10,0.001));
9.9347
See also Beta_Rand,   Binomial_Rand,   ChiSquare_Rand,   CreateRandSeq,   Cumulative,   Exponential_Rand,   FDist_Rand,   GammaDist_Rand,   Geometric_Rand,   Graph_Rand,   Multinomial_Rand,   Poisson_Rand,   SetRand,   SetRandSeed,   Shuffle,   StatTest,   Std_Score,   Student_Rand,   Zscore