quantile

Computes a quantile for sorted array of numbers


Keywords
quantile
License
MIT
Install
npm install quantile@1.0.2

Documentation

quantile

Computes a quantile for sorted array of numbers. Don't do anything else. Extremely easy.

Build Status NPM version

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