This is the fourth of a series of expository posts on matrix-theoretic sports ranking methods. This post discusses the Elo rating.
This system was originally developed by Arpad Elo (Elo (1903-1992) was a physics professor at Marquette University in Milwaukee and a chess master, eight-time winner of the Wisconsin State Chess Championships.) Originally, it was developed for rating chess players in the 1950s and 1960s. Now it is used for table tennis, basketball, and other sports.
We use the following version of his rating system.
As above, assume all the $n$ teams play each other (ties allowed)
and let denote the rating of Team , .
Let denote an $n\times n$ matrix of score results:
As in the previous post, the matrix associated to the example of the Patriot league is the adjacency matrix of a diagraph.
- Initialize all the ratings to be : .
- After Team plays Team , update their rating using the formula
In the example of the Patriot league, the ratings vector is
This gives the ranking
Lafayette Army Lehigh Bucknell Holy Cross Navy.
This gives a prediction failure rate of .
Some SageMath code for this:
def elo_rating(A): """ A is a signed adjacency matrix for a directed graph. Returns elo ratings of the vertices of Gamma = Graph(A) EXAMPLES: sage: A = matrix(QQ,[ [0 , -1 , 1 , -1 , -1 , -1 ], [1, 0 , -1, 1, 1, -1 ], [-1 , 1 , 0 , 1 , 1 , -1 ], [1 , -1 , -1, 0 , -1 , -1 ], [1 , - 1 , - 1 , 1 , 0 , - 1 ], [1 , 1 , 1 , 1 , 1 , 0 ] ]) sage: elo_rating(A) (85.124, 104.79, 104.88, 85.032, 94.876, 124.53) """ n = len(A.rows()) RR = RealField(prec=20) V = RR^n K = 10 r0 = 100 # initial rating r = n*[r0] for i in range(n): for j in range(n): if ij and A[i][j]==1: S = 1 elif ij and A[i][j]==-1: S = 0 else: S = 1/2 mu = 1/(1+e^(-(r[i]-r[j])/400)) r[i] = r[i]+K*(S-mu) return V(r)