quantile
v1.0.2
Published
Computes a quantile for sorted array of numbers
Downloads
540
Readme
quantile
Computes a quantile for sorted array of numbers. Don't do anything else. Extremely easy.
Install
npm i quantile
Usage
quantile(sortedArray, probability);
quantile
does not check if array is sorted, if it contains only numbers or if 0 <= probability >= 1
. Use correct params.
Example
const quantile = require('quantile');
console.log(quantile([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12], 0.9));
License
MIT