Generate random numbers with various distributions. Also provide some common probability functions for such distributions.
Work in Progress. Untested
- Expose fast integer random generator with proper range reduction
- Use most novel and fast algorithms for all kind of distributions
- Support random variable generators and its statistic functions like PDF, CDF, stddev and etc
- All input parameters are valid and don't throw exceptions
- All distributions in integer namespace (Randomi32 / Randomi64)
don't use floating point arithmetics
import { Randf64 } from "as-random";
const rndSample = Randf64.normal();
const pdfSample = Randf64.normal.pdf(0.5);
const cdfSample = Randf64.normal.cdf(0.5);
const median1 = Randf64.normal.quantile(0.5);
const median2 = Randf64.normal.median();
- Uniform (in interval)
- Bernoulli
- Boolean
- Uniform (in interval)
- Alpha-Stable
- Bernoulli
- Beta
- Beta-Prime
- Binominal
- Cauchy
- Chi
- Chi-Square
- Exponential
- von Mises (von Mises-Fisher with d = 2)
- Frechet
- Gamma
- Geometric
- Gumbel
- Laplace
- Log-Normal
- Logistic
- Maxwell (Maxwell-Boltzmann)
- Normal (Gaussian)
- Pareto
- Poisson
- Rayleigh
- Snedecor's F
- Student's T
- Triangular
- Weibull