fromSPT

fun fromSPT(lowerQuantile: Double, median: Double, upperQuantile: Double, alpha: Double = DEFAULT_ALPHA, lowerBound: Double = Double.NEGATIVE_INFINITY, upperBound: Double = Double.POSITIVE_INFINITY, name: String? = null): Metalog3P(source)

Builds a three-term metalog from a symmetric percentile triplet, using the closed form of Keelin (2016) Proposition 1 and its bounded counterparts in Propositions 3 and 4.

The three quantiles correspond to cumulative probabilities of alpha, one half, and one minus alpha. Supplying a finite bound selects the semi-bounded or bounded member, in which case each quantile must lie strictly inside the bounds.

Not every triplet describes a valid distribution. A median too close to either outer quantile demands more skewness than three terms can express, and this function fails in that case. Test a triplet first with the companion predicate, or add terms.

Parameters

lowerQuantile

the quantile at cumulative probability alpha

median

the quantile at cumulative probability one half

upperQuantile

the quantile at cumulative probability one minus alpha

alpha

the probability offset, which must lie strictly within zero and one half

lowerBound

the lower bound, or negative infinity when unbounded below

upperBound

the upper bound, or positive infinity when unbounded above

name

an optional name