weighted average of values
double weightedAverage(List<num> vals) { double acc = 0; for (int i = 0; i < vals.length; i++) { acc += vals[i] * (i + 1); } return acc / smallGauss(vals.length); }