docs: @Override
      public double getStdDev() {
          // two-pass algorithm for variance, avoids numeric overflow
  
          if (values.length <= 1) {
              return 0;
          }
  
          final double mean = getMean();
          double variance = 0;
  
          for (int i = 0; i < values.length; i++) {
              final double diff = values[i] - mean;
              variance += normWeights[i] * diff*diff;
          }
  
          return Math.sqrt(variance);
      }