Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

First decile and last decile #13

Open
Odonno opened this issue Aug 22, 2019 · 0 comments · May be fixed by #14
Open

First decile and last decile #13

Odonno opened this issue Aug 22, 2019 · 0 comments · May be fixed by #14

Comments

@Odonno
Copy link

Odonno commented Aug 22, 2019

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

@Odonno Odonno linked a pull request Aug 25, 2019 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant