Created
November 28, 2023 07:28
-
-
Save neysidev/f85763b2639c52f72341321b7f9cfb06 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function getStd(array) { | |
| const n = array.length; | |
| const mean = array.reduce((a, b) => a + b) / n; | |
| return Math.sqrt( | |
| array.map(x => Math.pow(x - mean, 2)).reduce((a, b) => a + b) / n | |
| ); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment