node-stats-lite
node-stats-lite copied to clipboard
A light statistical package that operates on Arrays.
Hi, thanks for the useful lib! This PR adds another histogram parameter for a specific use case I have (multiple sets of values that should all be visualized with the...
Fixes #13
It could be interesting to provide `firstDecile` and `lastDecile` functions which are often used in statistics. I already wrote something like that: ```ts const decile = (array, decile) => percentile(array,...
Indead, I suppose that when `mean` is used with an empty array, it divides by 0 and so it returns NaN. I think it would be more appropriate to return...
I'm wondering if there's a way to do this without storing the number array in memory. It would be a nice addition to create a streaming api. Something like: ```js...
Hey, we're using your lib at VTEX and we are TypeScript hardcore fans :) so we forked this to add types, feel free to merge or not. Cheers and thanks...
Hi! Found your lib which was exactly what I needed - a small stats package with histogram support. I needed some support to remove outliers, so here is the PR....
The current method of calculating variance (and, by extension, standard deviation) is intended for sets that form the _whole_ population. When dealing with a sample, i.e. you pick _n_ elements...
https://codesandbox.io/p/sandbox/jr25j2?file=%2Fsrc%2FApp.tsx%3A10%2C82 Sample cases when the expected result is Set, but the function returns Array. ``` mode([1, 2]) mode([1, 2, 3, 4]) ``` there on line 88, a Set should be...