Edit Array#average method