(vector)
| 68 | // Returns: |
| 69 | // The arithmetic mean. |
| 70 | function mean(vector) { |
| 71 | let sum = 0; |
| 72 | for (const x of vector) { |
| 73 | sum += x; |
| 74 | } |
| 75 | return sum / vector.length; |
| 76 | } |
| 77 | |
| 78 | // Calculate the standard deviation of a vector. |
| 79 | // |
no outgoing calls
no test coverage detected