API
Sym
The Sym module provides functions to create some common symbolic distributions.
All these functions match the functions for creating sample set distributions, but produce symbolic distributions instead. Symbolic distributions won't capture correlations, but are more performant than sample distributions.
normal
Sym.normal(Number, Number) => SymbolicDist
Sym.normal({p5: Number, p95: Number}) => SymbolicDist
Sym.normal({p10: Number, p90: Number}) => SymbolicDist
Sym.normal({p25: Number, p75: Number}) => SymbolicDist
Sym.normal({mean: Number, stdev: Number}) => SymbolicDist
Sym.normal(5, 1)
Sym.normal({ p5: 4, p95: 10 })
Sym.normal({ p10: 4, p90: 10 })
Sym.normal({ p25: 4, p75: 10 })
Sym.normal({ mean: 5, stdev: 2 })
lognormal
Sym.lognormal(Number, Number) => SymbolicDist
Sym.lognormal({p5: Number, p95: Number}) => SymbolicDist
Sym.lognormal({p10: Number, p90: Number}) => SymbolicDist
Sym.lognormal({p25: Number, p75: Number}) => SymbolicDist
Sym.lognormal({mean: Number, stdev: Number}) => SymbolicDist
Sym.lognormal(0.5, 0.8)
Sym.lognormal({ p5: 4, p95: 10 })
Sym.lognormal({ p10: 4, p90: 10 })
Sym.lognormal({ p25: 4, p75: 10 })
Sym.lognormal({ mean: 5, stdev: 2 })
uniform
Sym.uniform(Number, Number) => SymbolicDist
Sym.uniform(10, 12)
beta
Sym.beta(Number, Number) => SymbolicDist
Sym.beta({mean: Number, stdev: Number}) => SymbolicDist
Sym.beta(20, 25)
Sym.beta({ mean: 0.39, stdev: 0.1 })
cauchy
Sym.cauchy(Number, Number) => SymbolicDist
Sym.cauchy(5, 1)
gamma
Sym.gamma(Number, Number) => SymbolicDist
Sym.gamma(5, 1)
logistic
Sym.logistic(Number, Number) => SymbolicDist
Sym.logistic(5, 1)
exponential
Sym.exponential(Number) => SymbolicDist
Sym.exponential(2)
bernoulli
Sym.bernoulli(Number) => SymbolicDist
Sym.bernoulli(0.5)
pointMass
Point mass distributions are already symbolic, so you can use the regular pointMass
function.
Namespace optional
Sym.pointMass(Number) => SymbolicDist
pointMass(0.5)
triangular
Sym.triangular(Number, Number, Number) => SymbolicDist
Sym.triangular(3, 5, 10)