public final NumericResultNode getAverage() {
        NumericResultNode sum = (NumericResultNode)this.sum.clone();
        if (count != 0) {
            sum.divide(new IntegerResultNode(count));
        }
        return sum;
    }
Returns the average value of the results. Because the result can be any numeric type, this method returns a
{@link NumericResultNode} object.

@return The average result value.
searchlib/src/main/java/com/yahoo/searchlib/aggregation/AverageAggregationResult.java