Matchday Math

15 July, 2025

“..the ultimate game of our planet”, these were some of the words by the poet of football commentry – Peter Dury during the commencement of the 2022 FIFA World Cup. It really is a big game and like many I am a big fan. But, what does really make this game so popular? The answer can be rivalries, history, fans, the players, the clubs, but the rational answer to this is unpredictability. But it has been slowly losing that unpredictable nature and so its popularity. More so, we could quantify the predictability to know this. Let’s see if we really can?

In the realm of football, a striking parallel emerges with society's process of gentrification. As wealthier leagues ascend, a deterministic trend takes hold: superior teams clinch victories more frequently, subsequently amassing wealth, enabling them to recruit top-tier players from an increasingly global talent pool. This cycle fortifies their dominance, fostering predictability within the realm of professional football, particularly in the higher echelons of the sport. (shoutout to the oil-money clubs).

Anfield, the home of Liverpool Football Club, by far considered one of the most difficult stadiums to win at for any other team. The home advantage as they call it is quite significant. This can actually be mathematically expressed in terms of equations. We can determine the score gap between two teams in any match following the Nth encounter. With (T - N) matches and their respective results and score gaps for both models, we proceed to employ logistic regression. This involves modelling the outcome (a categorical variable, y) based on the score differences as per equation. To maintain generality, we consistently compute the point differential as \( x = \text{home team score} - \text{away team score} \), and assign \( y = 1/0 \) if the home/away team emerges victorious.

\[ P(y = 1 \mid x) = \frac{1}{1 + e^{-\mu(x - s)}} \]

where \( \mu \) and \( s \) are model parameters that can be obtained by ordinary least-squares methods.

\[ E = \frac{h}{h + a} \]

In monetary terms, \( h \) represents the winnings for a home team victory, and \( a \) represents the winnings for an away team victory. An experienced gambler understands that, in reality, the total of the probabilities for all possible outcomes in any betting house's game does not equal 1. This indicates that the game offered by the betting houses is not entirely fair.

One of the most explored and rather followed ways of ranking teams/players within a tournament based not only on their winnings and defeats, but also considering how hard were those matches expected to be, I mean, its obviously gonna be hard the Spurs to win against Real Madrid given the current squad. But what about teams like Manchester City or even PSG. Now I may just have said some super controversial stuff as a football fan, but come one isn’t Real Madrid literally ruling football, its not fair, but it also wasn’t an overnight thing, go back a few paragraphs and read again what I said about a team hiring superb players and winning and re-iterating the same thing, that’s what Real did, rather, mastered it, and as a result, Kings of Europe for the 15th time.

But can we really predict the match outcome? Its not always that Real is going to win, or is it?

Here comes the Elo ranking system to our help, it might not be the best in use, but helps us out pretty well in this case.

Before each match, we calculate the expected outcome for each team \( E_i \). This is a quasi-normal function based on the difference between the teams' current rankings \( R_i \) and \( R_j \).

\[ E_i = \frac{1}{1 + 10^{(R_j - R_i)/400}} \]

Once the match concludes, the rankings are updated, given the difference between the expected outcome and the real one.

\[ R_i^{\text{new}} = R_i + K(S_i - E_i) \]

In this context, \( S_i \) represents the binary outcome of the match between teams/players \( i \) and \( j \), while \( E_i \) is the expected outcome for team/player \( i \) as determined by equation above. A K-factor is introduced as a weight, influencing how significantly the match result affects the new rating for the teams/players. Elo initially suggested two K-values for chess player rankings: 16 for chess masters and 32 for lower-ranked players. Although the rating itself involves a prediction, we applied the same methodology used for analyzing previous models: we calculated the ratings for both teams before each match and used the difference between these ratings (home minus away) to fit a logistic curve, with 1 representing a home win and 0 an away win.

But how do you measure how accurate the predictions are? Here comes in the Brier function. The Brier score is a loss function used to measure the accuracy of probabilistic predictions. It applies to tasks where predictions must assign probabilities to a set of mutually exclusive discrete outcomes. These outcomes can be either binary or categorical, and the assigned probabilities must sum to one, with each individual probability ranging from 0 to 1.

Now, I don’t wish to bore you with a lot of equations, but please stay with me, lets just have some look at these –

Suppose that on each of \( t \) occasions, an event can occur in only one of \( r \) possible classes or categories. On a particular occasion \( i \), the forecast probabilities are \( f_{i1}, f_{i2}, \ldots, f_{ir} \), representing the likelihood that the event will occur in classes 1, 2, ….., r, respectively. These r classes are mutually exclusive and exhaustive, meaning that the sum of the forecast probabilities for each occasion equals one, i.e., \( \sum_{j=1}^{r} f_{ij} = 1 \), for \( i = 1, 2, 3,… t \). Thus, the Brier score is defined as follows:

\[ \text{BS} = \frac{1}{t} \sum_{i=1}^{t} \sum_{j=1}^{r} (f_{ij} - o_{ij})^2 \]

Where \( o_{ij} \) takes the value of 1 or 0, according to whether the event occurred in class \( j \) or not. In our case, we have \( r = 2 \) classes: either the home team wins or does not win. There are \( (1 - n)T \) matches to be predicted, which transforms equation (5) into:

\[ \text{BS} = \frac{1}{(1 - n)T} \sum_{i=1}^{(1 - n)T} (f_i - o_i)^2 \]

We see, from equation (6), how the Brier score is an averaged measure over all the predicted matches, i.e. each league–season combination will have its own single Brier score, so if you do some math, the lower your brier score is, the more better prediction can be made.

I just want to let you know, if you made it till here of this article, you are either a probability and statistics enthusiast or a die hard football fan, both would be rare. We went through a lot of mathematical equations, trying to model the perfect prediction model for identifying the winning team, but, all this still might not be able to explain Leicester City’s 2016 Premier League win. Nothing can, I guess.

References

  1. Elo, A. E. (1978). *The Rating of Chessplayers, Past and Present.* Arco Pub.
  2. Brier, G. W. (1950). "Verification of forecasts expressed in terms of probability." *Monthly Weather Review.*
  3. Wikipedia contributors. "Elo rating system." Wikipedia, The Free Encyclopedia.
  4. Various sports analytics and betting sites for match prediction data.