Foundations of the Theory of Performance-Based Ranking