@elstats/percentile

3.4.0 • Public • Published

Percentile Build Status

Calculate n-th percentile

Installation

npm install @elstats/percentile

Example 1

import percentile from '@elstats/percentile';

// calculate p75
percentile(
    [3, 6, 7, 8, 8, 10, 13, 15, 16, 20],
    75
); // → 15

Example 2

const percentile = require('@esltats/percentile');

function p95() {
    return data => percentile(data, 95);
}

p95([
  10, 13, 15, 16, 20, 3, 6, 7, 7, 15, 19, 13,
  13, 8, 19, 35, 22, 17, 19, 19, 12, 21, 9, 9, 12
]); // → 22

More info

See Nearest Rank Method

License

MIT © Michał Jezierski

/@elstats/percentile/

    Package Sidebar

    Install

    npm i @elstats/percentile

    Weekly Downloads

    27

    Version

    3.4.0

    License

    MIT

    Unpacked Size

    6.78 kB

    Total Files

    9

    Last publish

    Collaborators

    • michal.jezierski