The standard deviation monoid in javascript