Add the average calculator for statistics output