in , , , ,

Getting expected goals or xG into FM19: FM Statistics Lab

FM19 FM20 Expected Goals xG

Football Manager 19 introduced a huge range of match stats and analysis for us to use, and with FM20 soon upon us it’s probably safe to say that the new features will add even more to our experience. Despite all the improvements, the player pathways, development hub and even the club vision there are certain details that are probably yet to make an appearance even in FM20. Match statistics like shots on target might be our FM bread and butter but a key statistic we are really missing is xG – our expected goals! From the Premier League down to the lower leagues xG is becoming an increasingly important statistic for anlaysts and coaches. In this article we will cover what xG is, why it might be useful, and how to actually extract that data from your own FM.

What is xG?

xG or expected goals is basically a measure of chance quality. This is a very brief and clumsy explanation but every chance in a match can be given a value representing how likely a shot from that position or situation is to result in a goal. This is normally a value between 0 and 1, with 0 obviously being no chance and 1 being a 100% chance, or 0 being no goal expected and 1 being a certain goal. A shot from a position with a .1 value would suggest a 10% chance of goal from that position.

This is a much better explanation than mine…

There are lots of different models of xG that take into account different factors when considering how likely a shot is to result in a goal. The most commonly considered factors are the position of the shot and the angle, though some models consider the type of pass leading to the shot and the number of defenders between the attacker and the goal.

Once you have an idea of how likely certain shots are to go in you can use this baseline to determine the goals a team might expect to score. Over the course of the match all the values can be totalled give a number of expected goals for the that match. The higher number the more chances, or the better the quality of the chances.

Why would you even care about xG in FM19?

Or at all? It can be a useful stat in determining whether a team is producing lots of good chances or just lots of poor shots. A team could have 20 shots compared to another team’s 5 but if those shots are all outside the box and have a low success rate generally then you would expect fewer goals than 5 shots taken in the goal mouth.

Using some real word examples from Understat.com you can see that in a recent game between Manchester City and Watford in the EPL that City had an xG of 6.63 from their shots, compared to Watfords 0.34. The 8-0 final scoreline doesn’t seem too far off what the stats would suggest. Eight – nil wasn’t a lucky score line, Manchester City were in fact only over performing slightly.

Manchester City Watford EPL FM19 FM20
A painful but predictable score line (Getty Images)

With xG in mind we can use it to see if a team is over or underperforming in terms of goals (xG compared to actual goals), whether they are creating much at all (Huddersfield’s average xG per game of 0.88 suggested serious issues long before the relegation happened last season) and if a change in tactic has had an impact on the quality of chances created.

This change in tactic use is probably the most useful for Football Manager, along with being able to determine how often a player gets into good attacking positions. The problem we have though, is xG doesn’t exist as a statistic in the game and we don’t have an FM baseline to compare against.

Getting xG into FM19

Before we use xG we need to actually have the xG values for shots from various positions on pitch. Despite all the match stats FM19 provides it is lacking in this respect.

Our first step is to get our baseline xG data. The second step is to apply that to our matches. There are three main ways we can approach xG in Football Manager.

Stage 1: Getting the baseline xG data

Quick and Dirty: Method 1

If we want a quick and easy way of doing xG we can create a really crude measure. The game gives us shots, shots on target and goals. We can break this down and create a rough idea of an average shots per goal.

FM19 FM20 Expected Goals xG
goal conversion shots on target
We can see the rough conversion rates for shots here for the EPL in 2042 – Hold on Everton Fans…

From this we can crunch the numbers and work out that the conversion rate for the EPL is approximately 10%. 1 in 10 shots result in a goal.

However, you’ve probably already spotted the issue with this. It’s rough. It doesn’t actually take into account position or angle, or anything that even approaches an actual xG model. Ten shots from outside the area in this approach have the same conversion rate as ten within as we have not taken into account any details. The margin of error is huge for this, and the precision is low. But it is quick and something that can be done easily based on the stats we do have. Very little extra work is needed.

Not so quick but still Dirty: Method 2

Lots of models already exist, based on real world data. These models are quite complex and use a variety of factors but they all tend to break down chances/shots into pitch areas that are quite useful.

FM19 FM20 Expected Goals xG shots chances zones opta
From Rathke (2017)

A 2017 paper by Rathke uses zones as you can see above. For each zone these sources give the likelihood of a goal being scored. Across the board shots in the goal mouth are much more likely to go in than those outside the area. Those at extreme angles are also less likely to go in.

FM19 FM20 Expected Goals xG EPL Premier League
Table 1: From Rathke’s EPL data we can see Zone 1 and 3 tend to have the better chances

Using the values from Table 1 above, we can apply this to our own data. We can use this as our baseline for how likely a shot from a particular zone is to go in, and then look at our own matches and calculate what our xG would be based on this.

With this method someone has already done the work for us and created a model. The keen eyed and FM experienced amongst you might have spotted an issue. This is real complex data. FM is not real, and for all FMs strengths it is not as complex. A lot of match stats in FM are slightly skewed as it is a simulation. More goals are scored on average in an active FM league than the real world equivalent, a full length match in FM doesn’t actually last 90 minutes, and the injury rates tend to be different (lower) than real life.

We can use the models based on real world data but we have to bear in mind the conversion rates might be a little different to FM’s actual baseline.

Slow, Dirty and Painful: Method 3

We’ve seen in FM that sometimes our match stats don’t match up with the real world. So we need our own baseline data to be accurate. This is the slow and painful method, but it is also the most thorough method.

If we go to a completed match in FM we can go the the team page of the analysis and see the map for the shots.

FM19 FM20 Expected Goals xG match analysis
Match Report – Analysis – Team

Once we have the map of the shots for both teams we can than catergorise the shots based on zone, and record whether they were on target, were a goal, were saved etc.

FM19 FM20 Expected Goals xG analysis
Stage 1 – Taken from a match in my Tahiti save. We do this for every match, for every team…

Zone 5 in the example match has 6 shots, with 4 on target and 0 goals.

We then do this for every zone, for every match until we build up our data set. This is why it is slow and painful as it has to be a manual task for each match.

FM19 FM20 Expected Goals xG EPL data football manager
Table 2: Data from FM19 EPL half season

Luckily I’ve done this for you. It is only just over half a seasons worth of data from the Premier League in one of my FM19 saves. The more data you have the more refined it will be but with FM20 around the corner I thought I’d restrain myself.

It was useful though as there as some differences between FM19’s xG baseline and the EPL’s.

FM19 FM20 Expected Goals xG EPL data real world
Table 3: Comparison of Rathke’s real world data on the left with FM19’s data

The conversion rates in FM19 are generally a little higher than the real world, which fits with the general consensus that it is a little easier to score in FM. Even if it doesn’t always feel like it. Really big differences can be found in zones 6 and 8. The zones that are further out. Suggesting long shots, especially those central and just outside the area, are easier to convert in FM than real life.

Stage 2: Getting the xG for your team in FM19

We have the base line. Now to use it. We take the base line xG for each zone and give work out the overall xG of our shots for a match.

FM19 FM20 Expected Goals xG analysis calculate
Stage 2 – We work out how many shots in each zone, multiply the base xG to get the actual xG for that zone in our match. And then total it.

We apply the zones suggested in Method 2, and used in Method 3, to work out how many of your chances fall into those zones. We can then do the maths. One thing to bear in mind here is that we are ignoring headed attempts and penalty kicks for all of our data…

In the above example we had 10 shots in zone 6. 10 x .12 gives us an xG of 1.2 for that zone. We do this for all of the zones and get a total xG of 2.76.

That means in a match with those shots we would expect 2.76 goals to be scored on average. A reasonably creative match with a good amount of goal scoring chances. In fact in the final match 4 goals were scored, so the team out performed the xG slightly.

How to use it?

It can be used to determine if you team is creative over the course of a season, and whether you are under or over performing in terms of xG. Essentially do you need to make changes to tactics or personel to improve the xG and your points haul next season?

Another area to look at would be breaking it down by player to determine which players are good at getting into great goal scoring positions, and which are trying to fire in wasteful shots from distance. You don’t want a player who gets lots of shots, even shots on target. You want a player getting into positions for good chances – so a high xG.

The area I’m going to demonstrate though relates to tactics. Specifically evaluating whether a change in tactic has actually resulted in better chances. You can and should watch games to get a feel of this but xG really helps quantify this. Especially if you’re looking to make marginal gains on an already successful tactic.

FM19 FM20 Expected Goals xG fixtures schedule
4-4-1-1 before Feb. 4-4-2 after from Feb onwards

Here we have a decent run of form in my Tahiti save. Before the line we have a team playing a 4-4-1-1, and after we have a 4-4-2. Both aggressive hoofball tactics but with slightly different intstructions and roles.

It is really hard to separate the two. But the picture is different if we look at the xG.

The average xG for the games with 4-4-1-1 was 1.89.

The average xG for the 8 games after with 4-4-2 was 2.7.

EDIT: credit to @afmoldtimer I should mention that the average shots per game for the 4-4-1-1 was approx. 19. For the 4-4-2 the average shots per game went down to 15. We had fewer but better quality shots.

Just using our baseline xG, zones and method above we have been able to objectively determine that the change in tactic has led to an increase in the quality of our chances, and the amount of goals we are likely to score. We also look like we have conceded more as well but if we want to look at that we would have to consider the xG against. And that is another story entirely!


Make sure you follow us on our social media platforms and let us know if this article has helped you:

Other articles you may enjoy

Written by Pelham [FMTahiti]

I like to write about stats, tactics, editing and experiments. I also have a youtube channel under the name FM Tahiti where I have videos about my FM19 career in a semi-fictional French Polynesian/Tahiti database.

5 Comments

Leave a Reply
  1. Interesting article. A stat like this would be very useful for many Football Manager Players from experience, as — and this is my experience too — their Chance Analysis is dreadful (and the CCC in-game don’t help, and certainly not the “HOw did he miss that?” lines of commentary that are randomly awarded to every other shot). Because knowing from watching as well as playing experience what is more and less likely to be a Goal in FM has certainly Always been an Edge. If you wouldn’t have a feel for it, you couldn’t ever efficiently park the bus or Play counter attacking Football yourself.

    Good thing probably you didn’t include headed attempts. AI opponents oft prefer extremely negative tactics, purely sitting back to spoil. In that scenario, set pieces (and headers off them) can add up hugely. Every time I see somebody posting a final match stat where he struggled to score from 15 SOT on target, I know what to watch out for — and it very very rarely disappoints. Set piece attempts don’t pile up like that in Football.

    As to FM we’re at a stage where every time somebody loses to few shots and struggles to score off many he’s considering getting “FM’d”. That’s neither Football, that not the game — it’s not even how the AI works in the game. As soon as it Drops off to spoil, you will have tons of shots by total Default.

  2. As an ado:

    This is even more important considering not merely:

    a) The AI’s arguably too onedimensional match Management. They shut up shop completely very readily, focused purely on making it harder to score; which Underdogs in Football don’t do near as extremily.
    b) The popularity of “download super tactics” used for every minute of the season, and build around very Little Football logic. Oft there’s neither a protection to the d-line, somebody to kill counters, nor is there somebody stretching the pitch in Terms of width and Depth.

    In fact, the most popular Modus Operandi in recent Releases was it to overload the final third by shoving all Players Forward, where they are Holding Hands and make a picnic in front of the Opposition Goal (and are easily engaged, which makes the set pieces pile up even more, depending how the AI lines up). If the AI were actually smart, that stuff would be punished even more.

    • Thanks! I think you’ve hit the nail on the head with your point about super tactics. You are right. There are lots of tactics that work by creating overloads that aren’t quality overloads, just lots of shots and overloads. They get goals because of the sheer number of chances (driving up the xG by having lots of poorer xG chances). Smarter, more realistic tactics I think favour fewer but better quality (higher xG chances).

      The AI in response to the super tactics isn’t as reactive as we as human players would be, you’re right there as well. If you see a team camping outside your area then you know a long ball over the top, on the counter, will destroy them. But the AI doesn’t quite have that edge on us yet. Maybe for FM20!

2 Pings & Trackbacks

  1. Pingback:

  2. Pingback:

Leave a Reply

Your email address will not be published. Required fields are marked *

Brexit - Source - CIGI

Brexit is coming. How could it affect FM20 and British football?

4-1-3-2 Velvet Blitzkrieg Tactic – Recreating the Mighty Czechs