How Ranking Reflects Quality