()
| 196 | return [...arguments].reduce((a, b) => new BigNumber(a).plus(b)) |
| 197 | } |
| 198 | average() { |
| 199 | const summed = this.sum(...arguments); |
| 200 | const average = new BigNumber(summed).div(arguments.length); |
| 201 | return average |
| 202 | } |
| 203 | correlation(array1, array2) { |
| 204 | if (array1.length != array2.length) { |
| 205 | throw "[TheoremJS]: Correlation error, arrays are not the same size" |
no test coverage detected