quantile
Computes the q-th quantile of the values in this iterable.
The quantile at q is the value below which a fraction q of the data falls. For example, quantile(0.5) is the median. The estimation method determines how positions between data points are handled — see QuantileMethod for the nine standard Hyndman and Fan methods.
Example:
listOf(1.0, 2.0, 3.0, 4.0, 5.0).quantile(0.5) // 3.0
listOf(1.0, 2.0, 3.0, 4.0, 5.0).quantile(0.25, QuantileMethod.MEDIAN_UNBIASED) // 1.75Return
the q-th quantile value.
Parameters
the quantile to compute, in 0, 1.
the quantile estimation method. Defaults to QuantileMethod.LINEAR (HF7).
Computes the q-th quantile of the values in this array.
The quantile at q is the value below which a fraction q of the data falls. For example, quantile(0.5) is the median. Uses introselect (expected O(n) time) instead of a full sort. The estimation method determines how positions between data points are handled — see QuantileMethod for the nine standard Hyndman and Fan methods.
Example:
doubleArrayOf(1.0, 2.0, 3.0, 4.0, 5.0).quantile(0.5) // 3.0
doubleArrayOf(1.0, 2.0, 3.0, 4.0, 5.0).quantile(0.25, QuantileMethod.MEDIAN_UNBIASED) // 1.75Return
the q-th quantile value.
Parameters
the quantile to compute, in 0, 1.
the quantile estimation method. Defaults to QuantileMethod.LINEAR (HF7).
Computes the q-th quantile of the values in this sequence.
The sequence is materialized internally. See DoubleArray.quantile for details.
Return
the q-th quantile value.
Parameters
the quantile to compute, in 0, 1.
the quantile estimation method. Defaults to QuantileMethod.LINEAR (HF7).
Deprecated
Use the overload with QuantileMethod instead.
Replace with
quantile(q, interpolation.toQuantileMethod())Computes the q-th quantile of the values in this iterable.
Return
the q-th quantile value.
Parameters
the quantile to compute, in 0, 1.
the interpolation mode.
Deprecated
Use the overload with QuantileMethod instead.
Replace with
quantile(q, interpolation.toQuantileMethod())Computes the q-th quantile of the values in this array.
Return
the q-th quantile value.
Parameters
the quantile to compute, in 0, 1.
the interpolation mode.
Deprecated
Use the overload with QuantileMethod instead.
Replace with
quantile(q, interpolation.toQuantileMethod())Computes the q-th quantile of the values in this sequence.
Return
the q-th quantile value.
Parameters
the quantile to compute, in 0, 1.
the interpolation mode.