DistKind

it.grypho.scala.leonardo.probability.DistKind
See theDistKind companion object
enum DistKind extends Keyworded

The distribution families this package knows.

An enum rather than one case class per family: every family shares the same shape — a short parameter vector plus four kernels — so a single carrier keeps Session display, :save serialization and the parser to one case each instead of five.

Attributes

Companion
object
Graph
Supertypes
trait Enum
trait Serializable
trait Product
trait Equals
trait Keyworded
class Object
trait Matchable
class Any
Show all

Members list

Type members

Enum entries

case BetaDist extends DistKind

betadist(a, b) — parameters (a, b), both strictly positive (F_0050).

betadist(a, b) — parameters (a, b), both strictly positive (F_0050).

Spelled betadist, not beta: beta is kept free as a variable name, which is the reason the function is capitalised Beta, and a distribution keyword could not take the lower-case spelling either. The conjugate prior of the binomial.

Attributes

case Binomial extends DistKind

binomial(n, p) — parameters (n, p), with n a non-negative integer, p in [0,1].

binomial(n, p) — parameters (n, p), with n a non-negative integer, p in [0,1].

Attributes

case ChiSquared extends DistKind

chisq(k) — parameter (k), the degrees of freedom, with k > 0.

chisq(k) — parameter (k), the degrees of freedom, with k > 0.

Attributes

case Exponential extends DistKind

exponential(lambda) — parameter (lambda), with lambda > 0.

exponential(lambda) — parameter (lambda), with lambda > 0.

Attributes

case FDist extends DistKind

fdist(d1, d2) (F_0131) — Fisher-Snedecor's F, the ratio of two independent chi-squared variables over their degrees of freedom, d1, d2 > 0. fdist, not f: a one-letter name is far too plausible a variable to reserve.

fdist(d1, d2) (F_0131) — Fisher-Snedecor's F, the ratio of two independent chi-squared variables over their degrees of freedom, d1, d2 > 0. fdist, not f: a one-letter name is far too plausible a variable to reserve.

Attributes

case GammaDist extends DistKind

gammadist(k, rate) — shape and rate, both strictly positive (F_0050).

gammadist(k, rate) — shape and rate, both strictly positive (F_0050).

Shape–rate rather than shape–scale, stated because the literature splits and a silent choice makes every result wrong for half its readers: rate is the form in which the Gamma–Poisson update is additive, (k, rate) → (k + Σx, rate + n). The conjugate prior of the Poisson. gammadist, not gamma, for the betadist reason.

Attributes

case Geometric extends DistKind

geometric(p) (F_0132) — the number of trials up to and including the first success, support 1, 2, …, with 0 < p ≤ 1. Stated because the literature splits: some books count the failures before it, from 0; this one counts as Introductory Statistics 2e does.

geometric(p) (F_0132) — the number of trials up to and including the first success, support 1, 2, …, with 0 < p ≤ 1. Stated because the literature splits: some books count the failures before it, from 0; this one counts as Introductory Statistics 2e does.

Attributes

case Hypergeometric extends DistKind

hypergeometric(N, K, n) (F_0132) — the successes in n draws without replacement from N items of which K are successes; whole numbers with 0 ≤ K ≤ N and 0 ≤ n ≤ N.

hypergeometric(N, K, n) (F_0132) — the successes in n draws without replacement from N items of which K are successes; whole numbers with 0 ≤ K ≤ N and 0 ≤ n ≤ N.

Attributes

case Normal extends DistKind

normal(mu, sigma) — parameters (mu, sigma), with sigma > 0.

normal(mu, sigma) — parameters (mu, sigma), with sigma > 0.

Attributes

case Poisson extends DistKind

poisson(lambda) — parameter (lambda), with lambda > 0.

poisson(lambda) — parameter (lambda), with lambda > 0.

Attributes

case StudentT extends DistKind

studentt(nu) — parameter (nu), the degrees of freedom, with nu > 0.

studentt(nu) — parameter (nu), the degrees of freedom, with nu > 0.

Attributes

case Uniform extends DistKind

uniform(a, b) — parameters (a, b), with b > a.

uniform(a, b) — parameters (a, b), with b > a.

Attributes