Calculation of Mean Absolute Deviation