binomialInvCDF

Returns the quantile associated with the supplied probability, x assumes that distribution's range is {0,1, ..., n} Uses the recursive logarithmic algorithm

Return

the quantile associated with the supplied probability

Parameters

x

The probability that the quantile is needed for

n

The number of trials

p

The probability of success, must be in range [0,1)


fun binomialInvCDF(x: Double, n: Int, p: Double, recursive: Boolean): Int

Returns the quantile associated with the supplied probability, x assumes that distribution's range is {0,1, ...,n}

Return

the quantile associated with the supplied probability

Parameters

x

The probability that the quantile is needed for

n

The number of trials

p

The probability of success, must be in range [0,1)

recursive

true indicates that the recursive logarithmic algorithm should be used