I got the Park Derailleur Alignment Gauge tool and found out that my new bike's derailleur was significantly out of alignment - despite the fact that the bike was new and expensive. I aligned the derailleur, and the shifting is smooth. Thanks for your help.