Calculation of new average