Calculation of Average, Maximum, Minimum, and Sum