public static double calculateIntermediate(
      long count, double sum, double value, double variance) {
    double t = count * value - sum;
    variance += (t * t) / ((double) count * (count - 1));
    return variance;
  }
Compute the variance. This class is extended by: GenericUDAFVarianceSample
GenericUDAFStd GenericUDAFStdSample
ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFVariance.java