Added MD (average deviation about mean) calculations