UNIFORMPARMS Function |
%UniformParms(mean,sd) returns a 2-vector with the two parameters (lower and upper bounds) for a uniform distribution with the given mean and standard deviation.
Example
(The SOURCE needs to be done once)
source uniformparms.src
compute uparms=%uniformparms(1.0,4.0)
set u 1 1000 = %uniform(uparms(1),uparms(2))
stats u
draws a series of 1000 independent uniforms from a uniform distribution with mean 1 and standard deviation 4. (The bounds are roughly -6 and +8).
Copyright © 2025 Thomas A. Doan