percentile
Computes the p-th percentile of the Long values.
Values are converted to Double internally. Long values whose absolute value exceeds 2^53 (9,007,199,254,740,992) may lose precision in the least-significant digits.
Example:
listOf(1L, 2L, 3L, 4L, 5L).percentile(50.0) // 3.0Return
the p-th percentile of the Long values as a Double.
Parameters
the percentile to compute, in 0, 100.
the quantile estimation method. Defaults to QuantileMethod.LINEAR (HF7).
Computes the p-th percentile of the Int values.
Values are converted to Double internally. The conversion is exact for all Int values.
Example:
listOf(1, 2, 3, 4, 5).percentile(50.0) // 3.0Return
the p-th percentile of the Int values as a Double.
Parameters
the percentile to compute, in 0, 100.
the quantile estimation method. Defaults to QuantileMethod.LINEAR (HF7).
Computes the p-th percentile of the values in this iterable.
The percentile indicates the value below which a given percentage of observations fall. For example, the 50th percentile is the median. Delegates to quantile after converting the percentile (0–100 scale) to a quantile (0–1 scale).
Example:
listOf(1.0, 2.0, 3.0, 4.0, 5.0).percentile(50.0) // 3.0
listOf(1.0, 2.0, 3.0, 4.0, 5.0).percentile(25.0, QuantileMethod.WEIBULL) // 1.5Return
the p-th percentile value.
Parameters
the percentile to compute, in 0, 100.
the quantile estimation method. Defaults to QuantileMethod.LINEAR (HF7).
Computes the p-th percentile of the values in this array.
The percentile indicates the value below which a given percentage of observations fall. For example, the 50th percentile is the median. Uses introselect (expected O(n) time) instead of a full sort.
Example:
doubleArrayOf(1.0, 2.0, 3.0, 4.0, 5.0).percentile(50.0) // 3.0
doubleArrayOf(1.0, 2.0, 3.0, 4.0, 5.0).percentile(25.0, QuantileMethod.WEIBULL) // 1.5Return
the p-th percentile value.
Parameters
the percentile to compute, in 0, 100.
the quantile estimation method. Defaults to QuantileMethod.LINEAR (HF7).
Computes the p-th percentile of the values in this sequence.
The sequence is materialized internally. See DoubleArray.percentile for details.
Return
the p-th percentile value.
Parameters
the percentile to compute, in 0, 100.
the quantile estimation method. Defaults to QuantileMethod.LINEAR (HF7).
Deprecated
Use the overload with QuantileMethod instead.
Replace with
percentile(p, interpolation.toQuantileMethod())Computes the p-th percentile of the Long values.
Values are converted to Double internally. Long values whose absolute value exceeds 2^53 (9,007,199,254,740,992) may lose precision in the least-significant digits.
Return
the p-th percentile of the Long values as a Double.
Parameters
the percentile to compute, in 0, 100.
the interpolation mode.
Deprecated
Use the overload with QuantileMethod instead.
Replace with
percentile(p, interpolation.toQuantileMethod())Computes the p-th percentile of the Int values.
Values are converted to Double internally. The conversion is exact for all Int values.
Return
the p-th percentile of the Int values as a Double.
Parameters
the percentile to compute, in 0, 100.
the interpolation mode.
Deprecated
Use the overload with QuantileMethod instead.
Replace with
percentile(p, interpolation.toQuantileMethod())Computes the p-th percentile of the values in this iterable.
Return
the p-th percentile value.
Parameters
the percentile to compute, in 0, 100.
the interpolation mode.
Deprecated
Use the overload with QuantileMethod instead.
Replace with
percentile(p, interpolation.toQuantileMethod())Computes the p-th percentile of the values in this array.
Return
the p-th percentile value.
Parameters
the percentile to compute, in 0, 100.
the interpolation mode.
Deprecated
Use the overload with QuantileMethod instead.
Replace with
percentile(p, interpolation.toQuantileMethod())Computes the p-th percentile of the values in this sequence.
Return
the p-th percentile value.
Parameters
the percentile to compute, in 0, 100.
the interpolation mode.