fredrick / gauss

JavaScript statistics, analytics, and data library - Node.js and web browser ready
https://npmjs.org/package/gauss
Other
433 stars 29 forks source link

Streaming variance is NaN after pushing into empty Vector #7

Closed fredrick closed 12 years ago

fredrick commented 12 years ago
set = new Vector();
set.push(1, 2, 3);
> [1, 2, 3]
set.sum(); // Correct
> 6
set.product(); // Correct
> 6
set.variance(); // Incorrect
> NaN