Skip to content

First decile and last decile #13

@Odonno

Description

@Odonno

It could be interesting to provide firstDecile and lastDecile functions which are often used in statistics.

I already wrote something like that:

const decile = (array, decile) => percentile(array, decile / 10); // if percentile is between 0 and 1
const firstDecile = (array) => decile(array, 1);
const lastDecile = (array) => decile(array, 9);

Also, notice that I would have expect percentile parameter to be between 0 and 100, like explained in the wikipedia documentation: https://en.wikipedia.org/wiki/Percentile#The_nearest-rank_method

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions