R8

Linear interpolation of the approximate medians for order statistics. Recommended by H & F.

Functions

Link copied to clipboard
Link copied to clipboard
open override fun oneBasedIndexOfQuantile(p: Double, count: Int): Double

Gives the (1-based) index of the p-quantile for a distribution of size count. If the result h is a whole number, the h'th smallest of the count values is the quantile estimate. If not, h is an estimation of the index of the p-quantile. Rounding or interpolation needs to occur to get the actual quantile estimate.

Link copied to clipboard
open fun quantile(p: Double, values: List<Double>): Double