node-faststats icon indicating copy to clipboard operation
node-faststats copied to clipboard

.iqr() bug ?

Open pascalmartin opened this issue 10 years ago • 1 comments

Some time when a use iqr on stats will return empty stats object it is correct or is a bug ?

Exemple : var s1 = new Stats().push(22.437, 22.437, 2.437, 22.437, 22.437, 22.5, 22.5, 22.5, 22.5, 22.5, 22.5, 22.5, 22.5, 22.5, 22.5, 22.5, 22.5, 22.5, 22.5, 22.5, 22.5, 22.5, 22.5, 22.5, 22.5, 22.5, 22.5, 22.5, 22.5, 22.5 ); var s2 = s1.iqr();

console.log(s1.length); // Output 30 console.log(s2.length); // Output 0

I want to calculate the average without outliers s1.iqr().amean() but its not always work

pascalmartin avatar Mar 08 '14 18:03 pascalmartin

I'll look into it.

bluesmoon avatar Mar 08 '14 18:03 bluesmoon