Expand description
Continuous distributions (docs/semantics.md, section 13): densities, CDFs, quantiles and moments, and drawing from them.
Drawing uses its own generator and libm rather than the platform’s math
library, so that a seed gives the same numbers everywhere (section 14).
Structs§
- Mixture
- Moments, CDF and quantiles of a mixture of numbers and continuous distributions, each with its probability.
- Rng
- xoshiro256++, seeded through SplitMix64.
Enums§
Constants§
- Z95
- The 95% quantile of the standard normal: an estimate’s 90% interval is this many standard deviations on each side of its centre.
Functions§
- beta_
cdf - The regularized incomplete beta function I_x(a, b), by its continued fraction (Numerical Recipes, section 6.4).
- gamma_
cdf - The regularized lower incomplete gamma function P(a, x): its series below a + 1, its continued fraction above (Numerical Recipes, 6.2).
- invert
- The x in
lo..hiwhere a non-decreasingfreachesp(the smallest such x), by bisection. - ln_beta
- ln B(a, b), the logarithm of the beta function. For large arguments,
the log gammas it’s made of are huge and nearly cancel, so it’s computed
from their Stirling series instead, as R’s
lbetais. - std_
normal_ cdf - std_
normal_ quantile - Φ⁻¹(p): a rational approximation (Abramowitz and Stegun 26.2.23, error below 4.5e-4), polished by Newton’s method on the exact CDF.