deviation(fixed, unconverted) {
    const recorded_values = this.get_recorded_values(unconverted);
    let result = 0;

    if (recorded_values.length > 0) {
      const average = this.average(unconverted);
      let squared_average = 0;
      for (let i = 0, il = recorded_values.length; i < il; i++) {
        squared_average += (recorded_values[i] - average) ** 2;
      }
      result = this._to_fixed(Math.sqrt(squared_average / recorded_values.length), fixed);
    }

    return result;
  }
Calculates the standard deviation for all entries recorded.
@param {Number} [fixed=2] number of digits to appear after the decimal point
@param {Boolean} [unconverted=false] whether to get the raw recorded values
@returns {Number}