diff --git a/lib/bp.js b/lib/bp.js index ea62434..ee22825 100644 --- a/lib/bp.js +++ b/lib/bp.js @@ -64,7 +64,7 @@ bp.Statistics.calculateStandardDeviation = function(sample, mean) { sample.forEach(function(x) { deviation += Math.pow(x - mean, 2); }); - deviation = deviation / (sample.length -1); + deviation = deviation / sample.length; deviation = Math.sqrt(deviation); return deviation; };