iggs-utils - v2.4.0
    Preparing search index...

    Function weightedArithmeticMean

    • Weighted Mean =  Σwx/Σw
      

      The weighted arithmetic mean is similar to an ordinary arithmetic mean, except that instead of each of the data points contributing equally to the final average, some data points contribute more than others. If all the weights are equal, then the weighted mean is the same as the arithmetic mean.

      Parameters

      • value: number[]
      • weight: number[]

      Returns number

      weightedArithmeticMean([[251,0.1], [360, 0.5], [210, 0.7]]);
      // => 270.8461538461539