Returns the value at the given percentile in a dataset using linear interpolation.
An array of numeric values.
Percentile (0 to 100).
The value at the specified percentile.
If the array is empty.
If the percentile is out of range.
percentile([1, 2, 3, 4, 5], 50); // returns 3 (median)percentile([10, 20, 30], 25); // returns 15 Copy
percentile([1, 2, 3, 4, 5], 50); // returns 3 (median)percentile([10, 20, 30], 25); // returns 15
Returns the value at the given percentile in a dataset using linear interpolation.