update snippets 0-All
This commit is contained in:
committed by
Agamemnon Zorbas
parent
6bedb8fba4
commit
0c129cdd02
@ -14,6 +14,9 @@ const standardDeviation = (arr, usePopulation = false) => {
|
||||
.reduce((acc, val) => acc + val, 0) / (arr.length - (usePopulation ? 0 : 1))
|
||||
);
|
||||
};
|
||||
// standardDeviation([10,2,38,23,38,23,21]) -> 13.284434142114991 (sample)
|
||||
// standardDeviation([10,2,38,23,38,23,21], true) -> 12.29899614287479 (population)
|
||||
```
|
||||
|
||||
```js
|
||||
standardDeviation([10,2,38,23,38,23,21]) -> 13.284434142114991 (sample)
|
||||
standardDeviation([10,2,38,23,38,23,21], true) -> 12.29899614287479 (population)
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user