•distribution — Distributions

params •distribution name returns the distribution called name, with parameters params. •distribution name uses the distribution's standard parameters, listed in the table below. A distribution is a keyed vector of four functions:

d←•distribution "normal"
d.cdf 0                         ⍝ 0.5
b←10 0.5 •distribution "binomial"
b.quantile 0.5                  ⍝ 5ₓ

Parameters are finite real units or vectors. Scale, shape, rate and degrees of freedom are positive, except where the table says otherwise. Distributions shows distributions in use.

NameParametersStandard
"normal"μ σ: mean, standard deviation0 1
"uniform"a b: lower and upper bounds, a < b0 1
"bernoulli"p ∈ [0,1]
"binomial"n p: integer trials n ≥ 0, p ∈ [0,1]
"poisson"λ ≥ 0: mean
"beta"α β: shapes
"gamma"k θ: shape, scale, with mean kθ
"inversegamma"α β: shape, scale, with density ∝ x⁻⁽ᵅ⁺¹⁾ exp(−β/x)
"exponential"λ: rate, with mean 1/λ1
"chisquared"ν: degrees of freedom
"student"ν: degrees of freedom, with location 0 and scale 1
"fisher"ν₁ ν₂: degrees of freedom
"cauchy", "laplace", "logistic"location, scale0 1
"lognormal"μ σ: mean and standard deviation of log(X)0 1
"weibull"k λ: shape, scale

Errors: DOMAIN for an unknown name, a name that isn't a string, a monadic call for a distribution with no standard parameters, invalid parameters (binomial trials or a Poisson rate past 2⁵³ among them) or non-real inputs; LENGTH for the wrong number of parameters; RANK for matrix parameters or shapes; SYNTAX for a dyadic call to density, cdf or quantile; LIMIT for oversized shapes. A quantile of a probability outside [0,1] gives NaN.