Reference · Pipes, rules and solving
percentileInfunction
Where value stands among sorted quantiles, 0 to 1: how far through them it is, by the share of the way between neighbours.
Import it
import { percentileIn } from "@johnmorrisdotca/suido";
Definition
function percentileIn(quantiles: readonly number[], value: number): number
Parameters
| Name | Type | Description |
|---|---|---|
quantiles | readonly number[] | Ordered reference quantiles. |
value | number | The measurement to rank among the quantiles. |
Returns
number
Where value stands among sorted quantiles, 0 to 1: how far through them it is, by the share of the way between neighbours.
Examples
import { percentileIn } from "@johnmorrisdotca/suido";
console.log(percentileIn([0,10,20],15));0.75What it prints (run when this page was built)