quantileInt

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

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

Finds the smallest number of successes k such that the cumulative probability of k or fewer successes is at least p. Uses a linear search over the support from 0 to trials, accumulating PMF values.

Return

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

Parameters

p

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