Modern Fitba's Expected Goal Guide - Part 1
Written by: Christian Wulff @ahellofabeating
This season all the analysts at Modern Fitba will use the same Expected Goals model and values to analyse the SPFL Premiership. Previously we’ve used slightly different values, while some other media outlets have worked with Expected Goals values provided by analysts and companies who don’t primarily cover Scottish football.
With Modern Fitba moving to one common Expected Goals model, shaped and adopted to the SPFL, Scottish football is now a big step closer to operating with one uniformed model and xG value, ensuring consistency and hopefully an increased acceptance of this stat.
But what the hell is Expected Goals!?
Often shortened to xG, Expected Goals has over the last couple of years become the metaphorical hill to die on when it comes to how football should be viewed, analysed and discussed, an imaginary front line in the battle between the traditionalists and progressives, the dinosaurs against the nerds, the luddites versus the destroyers of the soul of football.
As the most commonly known concept from the emerging field of advanced statistical football analysis, xG took its first, proper steps into the mainstream with its introduction on Match of the Day at the start of last season, with it now being ridiculed, mocked, defended and hailed in (almost) equal measures.
There are plenty of great in-depth articles on xG, how it works and why statistical analysts use it to such a large degree. Some of the best and most important pieces can be found at the bottom of this article and they are all worth a read if you’re interested in emersing yourself in the subject.
Over two articles, I will try to set out the essence of xG and why we use it.
In this first part I will look at what Expected Goals is and how we at Modern Fitba calculate it for the SPFL. The second part will look at why xG is used, mainly on how it is the best predictor of future performance of any currently available stats.
What do you mean, ‘’Expected’’ Goals!?
The name itself, be it the ‘expected’ part or its abbreviation 'xG', is often a source of confusion and can be misleading at first glance.
My advice is when you hear the terms Expected Goals or xG, instead just think: ‘Chance Quality’.
That’s xG: An attempt at measuring the quality of a chance.
The argument behind this is simple and one known to anyone who watches football: all shots and headers are not equal, but they are still counted as such in traditional football stats. A team may have had a lot more shots than their opponent, but that only says so much about their performance - how big were these chances, how likely were they to result in a goal?
With xG, each attempt on goal is given a value between 0 and 1, based on the likelihood of that attempt being scored. If easier, think of it in percentage terms; if an attempt is given an xG value of 0.24, it had a 24% chance of being scored.
Measuring the chance quality of each attempt may paint quite a different picture then just counting all shots and headers as the same.
For example, last September St. Johnstone faced Hamilton Academicals at home in the Premiership. While St. Johnstone won 2-1, Hamilton had 16 attempts to Saints’ 9, also dominating the shots on target tally (7 to 3). So a lucky St. Johnstone win?
Expected Goals told another story, giving St. Johnstone a combined xG value of 2.07 from their 9 shots, with Accies only accumulating 1.42 from their 16. On the basis of the quality of their chances, the home side probably deserved the win after all.
So what kind of black magic is needed to get the xG value?
This is where the term ‘expected’ perhaps causes the greatest confusion, as xG isn’t as much about what is going to happen, rather what has happened in the past. In simple terms, the xG value given to an attempt reflects how many times in the past a similar attempt has been scored.
When you see xG values on Match of the Day, on Twitter or discussed other places, the values for the same match might vary slightly. This comes down to the fact that while the concept of xG is the same (how likely is this attempt to be scored?) the models analysts use to come to that figure are slightly different.
I won’t get too technical in this article, but data companies such as Opta (who provide the Match of the Day values) and Statsbomb, together with the most prominent individual analysts such as Michael Caley and Sander of 11Tegen11, all use data modelling to some degree. Essentially, they put a lot of different information about attempts taken in the past (location, body part used, speed of attack, type of pass etc.) and then their data program calculates an xG value based on how the model is set up.
The model we use at Modern Fitba is slightly different in a couple of ways. First of all, the attempts used in the models above will mostly be from the top five leagues in Europe. At Modern Fitba we use the Strata data we have from 19 different countries, including Scotland. These are all of a standard below the top five leagues (full list in the notes section below), and will be closer in quality to the Scottish game, making the data more relevant when it comes to calculating xG values for the SPFL. The other difference with our model is that we don’t use data modelling; we simply look at what has happened in the past.
Remember, the principle of xG is how likely an attempt is to be scored, based on how many times a similar attempt has been scored in the past. With the data from Strata we have a detailed record of over 183,000 attempts from April 2016 to May 2018.
We group these attempts into similar ‘Chance Categories’ and calculate how big a percentage of attempts in each of these chance categories have been scored – this percentage is our xG value.
Okay – but how can you say one chance is identical to another?
We can’t. There are so many different variable factors that make up a scoring chance in football that we have to settle for ‘similar’. It’s the first reminder that xG and all other stats are never flawless or without error. However, we’re not looking for perfection, we’re looking for something better than what we currently have: simple tallies of many shots and headers there were in a game.
So we try to group these chances into as many and as similar categories as possible.
Some splits are obvious:
- Shots and headers are separated, as the former is more likely to result in a goal than the latter, if taken from the same location.
- We put penalties and attempts directly from a free-kick or directly from a corner (there are some!) into its own categories
- Location of the attempt: Strata’s data gives the position of each attempt to within 10 inches. With this we split the pitch into 19 different zones (see illustration below); 10 inside the penalty box and 9 outside.
This is a good start. We now have 49 different chance categories:
- Shots and headers from the 19 different zones (no, there aren’t many headers from outside the box!)
- Direct free-kicks from nine different zones (no headers attempted from these…)
- Shots directly from corners.
However, we need more.
You might have noticed that we don’t distinguish between attempts from open play and attempts that have come from a set-piece (unless it’s directly from a penalty, direct free-kick or direct corner)
The reason is that the likely characteristics from such situations (a crowded penalty box after a corner etc.) is covered in the next two parameters we’re adding to our model.
Get out of the way!
In their data, Strata note how many defensive players were between the ball and the goal when an attempt was made. This tells us how many opponents covered at least some angle of the goal at this moment. We know this is crucial information in determining the quality of a chance both through simply watching games (it’s fairly obvious!) and also looking at how many goals were scored when a certain amount of opponents were in the way.
Within our 183,000+ attempts, a goal was scored 75% of the time when there were no opponents between the ball and the goal. If we add in one opponent (so covering mostly 1 on 1 situations with the goalkeeper, a goal was scored 31% of the time). Add another opponent in and we are down to a 10% scoring rate, and with three opponents it decreases further to 7%. When the amount of opponents in front of the ball determines the scoring percentage so much, it needs to play a crucial part in our model.
However, we also need to think about sample size; too many chance categories would mean a very limited amount of shots in each category, which is likely to give us unreliable results. So for our model we group the amount of opponents in front of the ball into three categories.
- No opponent
- One opponent
- Two or more opponents
That we don’t split this into more categories is a trade-off for having decent sample sizes in each chance category.
We don’t apply the number of opponents to penalties, direct free-kick or direct corners, instead we threat all these attempts the same (except for the location of direct free-kicks).
Now you might – justifiably – say that there would be a lot of difference between having two or 11 players between the ball and the goal when it comes to determine the quality of a chance.
However, there are two factors that will help further differentiate the quality of such a chance. One is the location (you are not very likely to have 8 players between the ball and the goal if you take a shot from 6 yards), and the other is the last crucial part of the Modern Fitba xG model: defensive pressure
For each attempt, Strata assign a rating between 0 and 5 to illustrate the amount of pressure a player was under when taking a shot or a header. 0 would indicate no defensive pressure with nobody trying to block the shot, while 5 is intensive defensive pressure, such as being held when taking a shot, several defenders making a tackle or being very crowded when challenging for a header. Again, to make sure we don’t have too many chance categories, we group these 6 different levels of pressure into 3 categories:
- 0 and 1 (Low Pressure)
- 2 and 3 (Medium Pressure)
- 4 and 5 (High Pressure)
With opponents in front of the ball and defensive pressure on the attacker added, we have arrived at a grand total of 353 different chance categories:
- Headers and shots from 19 different location zones, each with one with nine different opponents / pressure combinations (342 categories)
- Direct-free kicks from nine different location zones
- Direct corners
The xG value can now easily be calculated: the percentage of attempts within each chance category that was scored.
A shot from the 6 yards out in the middle of the goal, with only the keeper to beat but with medium pressure on the attacker? In these situations a goal has been scored 51% of the time according to our database. So any attempt in the SPFL Premiership next season that fits into that chance category will be assigned an xG value of 0.51.
And that, ladies and gentlemen, is how you get your xG.
I’ve got a fault to point out!
Don’t worry, we have plenty too.
Is xG the perfect way of measuring chance quality? No.
Are there many gaps and potential errors that may occur with this model? Absolutely.
One of the most frequent questions on using xG to measure the quality of chance is along the lines of ‘certainly it is a bigger chance if the ball falls to Cristiano Ronaldo’s feet than a giant centre-back with absolutely no technique?'
In one way, yes; if a chance falls to an exceptionally talented finisher, he is more likely to score than a clumsy defender.
It comes down to what you want to measure; the best use of xG as advocated by Modern Fitba and most other analysts is as a measurement of chance quality; while the likelihood of a single chance being score will rise if it falls to a great finisher, the main objective is to measure a team (and players’) ability to create and restrict chances, both the amount and quality of those chances.
And even with the most prolific goalscorers what we usually find is that they don’t actually have many more goals than expected goals: A large part of the reason why they score many goals is simply down to their ability to get to a lot of chances.
Some good SPFL examples are Leigh Griffith and Kris Boyd, maybe two of the best ‘natural’ finishers in the league. Over the last two league seasons they both have a total of 20 goals when you exclude dead-ball situations like penalties and direct free-kicks. Griffiths’ expected goal value in the same period is 18.3, while Boyd’s is 18.5 – so even for these very good finishers we find that the actual goals they score closely match the quality and quantity of chances they get to (as measured by xG).
Another point that is often made is that xG might not capture those instances where an attacker is *just* too late to meet a cross or simply hits fresh air rather than the ball when in a good position; in both cases no shot is recorded and no xG would usually be assigned to what in reality was a big chance. The good news is that our model does include such instances for team xG.
Strata record those type of situations as a ‘dangerous moment’, and we attribute the same xG value to them as if the attacker had managed to get a shot or header off. As mentioned above we want to measure the quality of the chance created (or conceded), and this would definitely come under that definition.
While there will be plenty of holes to pick with our and other xG models, nobody is more aware of this than the analysts themselves. And as with all stats, extra caution should be taken when looking at xG over a smaller sample of games (my Modern Fitba colleague Matt Rhein have written about why this is and how we try to mitigate this when looking at xG from single games).
But as mentioned earlier, advanced statistics and expected goals isn’t first and foremost about finding the perfect, faultless model. It’s about creating something that is better than what we currently have.
So we at Modern Fitba and other analysts use and promote Expected Goals not because it’s flawless, but because it is the best metric available and it is proven to be a much better indicator of future performances than more traditional stats (even goals scored).
In the second part of this series we’ll look in more detail on why we can be confident the xG tells us more than other, more traditional stats, and why it should play a part in the both the decision making process within clubs and help shape the media narrative around a team’s performance.
Here’s your reading homework for the Expected Goal Exam
Sander from @11tegen11
The 19 leagues that the 183,000+ attempts in our database is taken from:
Top flight division in:
Lower league divisions:
Germany 2. Bundesliga
England League One