Statistic constructor

Statistic(
  1. int n,
  2. num mean,
  3. num median,
  4. num min,
  5. num max,
  6. num stdDeviation,
  7. num medianLowerBound,
  8. num medianUpperBound, {
  9. String name = '',
  10. int precision = 2,
})

Direct constructor of a Statistic instance.

You probably want to use Statistic.from instead. But this constructor exists in case you know the statistics (like when you computed them ahead of time) and want to compare them to others.

Implementation

Statistic(int n, this.mean, this.median, this.min, this.max, num stdDeviation,
    this.medianLowerBound, this.medianUpperBound,
    {this.name = '', this.precision = 2})
    : n = n,
      stdDeviation = stdDeviation,
      stdError = stdDeviation / math.sqrt(n);