4.3.0 • Published 1 year ago

grosso-modo v4.3.0

Weekly downloads
3
License
MIT
Repository
github
Last release
1 year ago

grosso-modo

random number generator for specified confidence interval note that this uses a gaussian Z as seed and not the usual uniform U to facilitate the generation of correlated variables

ExampleAPILicense

Example

import {norm, logn} from 'grosso-modo'

const n = norm(2, 4)(),      // normal distribution with 50% of values between 2 and 4
      l = logn(2, 4, 0.9)(), // lognormal distribution with 90% of values between 2 and 4

API

All distribution take lower and upper bounds along with a probability confidence interval that defaults to 50%.

MethodArgumentsReturnsNotes
.normlow, high [,prob]rndNumberGeneratorNormal distribution
.lognlow, high [,prob]rndNumberGeneratorLognormal distribution
.uniformlow, high [,prob]rndNumberGeneratorUniform distribution
.weibulllow, high [,prob]rndNumberGeneratorWeibull distribution
.stepfail,succ [,prob]rndNumberGeneratorBernouilli trial P(X == succ)
.dicemin, maxrndNumberGeneratorUniform discrete distribution
.dagumlow, high [,prob]rndNumberGeneratorDagum distribution of shape p=1
.gumbellow, high [,prob]rndNumberGeneratorGumbel distribution
Returned FunctionArgumentsReturnsNotes
rndNumberGenerator[zSeed]NumberRandom number

Where zSeed is an optional unit normal distribution number

License

MIT © Hugo Villeneuve