I am trying to get the standard deviation of a user input string. I have as follows, but it returns the wrong value for SD. The calculation should go as follows: Sum values/
This function works and produces the same result as numjs
const st = (numbers) => { const mean = numbers.reduce((acc, item) => acc + item) / numbers.length; return Math.sqrt(numbers.reduce((acc, item) => acc + Math.pow((parseFloat(item) -mean), 2))) }