function getMean(sample) {
    return reduce(sample, function(sum, x) {
      return sum + x;
    }, 0) / sample.length || 0;
  }
Computes the arithmetic mean of a sample.
@private
@param {Array} sample The sample.
@returns {Number} The mean.