quantileInt

open override fun quantileInt(p: Double): Int(source)

Returns the quantile (inverse CDF) for the given probability p as an Int.

Uses a linear search from zero, accumulating PMF values until the cumulative probability meets or exceeds p. Includes a safety bound to prevent infinite loops.

Return

the smallest integer k at which cdf(k) >= p.

Parameters

p

the cumulative probability, must be in [0, 1].