docs: @SuppressWarnings("WeakerAccess")
      public static double compareChi2(TDigest dist1, TDigest dist2, double[] qCuts) {
          double[][] count = new double[2][];
          count[0] = new double[qCuts.length + 1];
          count[1] = new double[qCuts.length + 1];
  
          double oldQ = 0;
          double oldQ2 = 0;
          for (int i = 0; i <= qCuts.length; i++) {
              double newQ;
              double x;
              if (i == qCuts.length) {
                  newQ = 1;
                  x = Math.max(dist1.getMax(), dist2.getMax()) + 1;
              } else {
                  newQ = qCuts[i];
                  x = dist1.quantile(newQ);
              }
              count[0][i] = dist1.size() * (newQ - oldQ);
  
              double q2 = dist2.cdf(x);
              count[1][i] = dist2.size() * (q2 - oldQ2);
              oldQ = newQ;
              oldQ2 = q2;
          }
  
          return llr(count);
      }