Expected Goals (xG), Explained 
What does it mean when a shot is "worth" 0.2 xG? Why does it matter if a team's xG in a season is less than their actual goals scored?
A thread

What does it mean when a shot is "worth" 0.2 xG? Why does it matter if a team's xG in a season is less than their actual goals scored?
A thread

1/ Expected goals (or "xG") is becoming one of the more mainstream advanced stats in
, but can be applied to similar sports like
as well.
In this thread, I'll focus on its application to
, but much of what can be said about xG in
applies to xG in other sports.


In this thread, I'll focus on its application to


2/ These days, there are a few different types of xG, but the most widely-known variation (the version you might have seen on TV) is "shot-based" xG.
With shot-based xG, everything starts with quantifying the xG value of each individual shot taken.
With shot-based xG, everything starts with quantifying the xG value of each individual shot taken.
3/ The xG value of an individual shot is equal to the probability that the shot will result in a goal:
- A shot with an xG value of 0.3 is a shot with a 30% probability of going in
- A shot with an xG value of 0.05 is a shot with a 5% probability going in
- A shot with an xG value of 0.3 is a shot with a 30% probability of going in
- A shot with an xG value of 0.05 is a shot with a 5% probability going in
4/ How do we calculate these probabilities? We use a statistical model that predicts these probabilities based on the historical success of similar shots.
One type of model for this (but not the only one) is "logistic regression."
You can read more here: https://towardsdatascience.com/logistic-regression-detailed-overview-46c4da4303bc
One type of model for this (but not the only one) is "logistic regression."
You can read more here: https://towardsdatascience.com/logistic-regression-detailed-overview-46c4da4303bc
5/ These models can account for lots of info about a particular shot in order to calculate the xG value, including things like:
- Shot distance
- Goal mouth angle (how tight of an angle the shot is taken from)
- # of defenders in the area
- Whether the shot came from a cross
- Shot distance
- Goal mouth angle (how tight of an angle the shot is taken from)
- # of defenders in the area
- Whether the shot came from a cross
6/ For example:
- Shot A & Shot B are taken from the exact same spot on the field
- Shot A is taken with more defenders in the area than Shot B
The model would recognize that more defenders makes a shot less likely to go in, so Shot B's xG value would be higher than Shot A's.
- Shot A & Shot B are taken from the exact same spot on the field
- Shot A is taken with more defenders in the area than Shot B
The model would recognize that more defenders makes a shot less likely to go in, so Shot B's xG value would be higher than Shot A's.
7/ Once we calculate the xG value of individual shots, we add these values up to calculate a team's total xG for a game.
If Team A takes 3 shots in a game with xG values of 0.2, 0.05, and 0.1...
Team A's total xG for the game would be:
0.2 + 0.05 + 0.1 = 0.35 xG
If Team A takes 3 shots in a game with xG values of 0.2, 0.05, and 0.1...
Team A's total xG for the game would be:
0.2 + 0.05 + 0.1 = 0.35 xG
8/ We can then take this a step further and calculate a team's total xG for a season by adding up the team's xG totals for each game.
If Team A plays 3 games with xG totals of 1.1, 2.0, and 1.3...
Team A's total xG for the season would be:
1.1 + 2.0 + 1.3 = 4.4 xG
If Team A plays 3 games with xG totals of 1.1, 2.0, and 1.3...
Team A's total xG for the season would be:
1.1 + 2.0 + 1.3 = 4.4 xG
9/ How do we interpret this 4.4 xG number?
This number tells us how many goals Team A would have scored *on average* if they had played those three games over and over again and taken the same set of shots.
This number tells us how many goals Team A would have scored *on average* if they had played those three games over and over again and taken the same set of shots.
10/ Why is knowing xG valuable?
Luck plays a big role in
, and xG helps us strip out luck to understand the underlying chance-creating abilities of a team, whether they won or not.
Long-term, teams with higher xG will tend to do better even if they lose in the short-term.
Luck plays a big role in

Long-term, teams with higher xG will tend to do better even if they lose in the short-term.
11/ So, what can xG tell us about a game?
Let's say:
- Team A loses to Team B 1-0
- Team A has 2.1 xG
- Team B has 0.7 xG
This tells us Team A generally created better chances (represented by higher xG) than Team B, despite losing.
Let's say:
- Team A loses to Team B 1-0
- Team A has 2.1 xG
- Team B has 0.7 xG
This tells us Team A generally created better chances (represented by higher xG) than Team B, despite losing.
12/ Why does this matter if Team A still lost?
Because it implies that Team A probably played better (having created better chances) than the result suggests, and Team B played worse than the result suggests.
Because it implies that Team A probably played better (having created better chances) than the result suggests, and Team B played worse than the result suggests.
13/ Over the course of a season, we can also compare a team's total xG to their actual goals scored.
If, through 20 matches, Team A has scored 40 goals but only 25.5 xG, they're probably getting lucky and won't sustain their current form.
If, through 20 matches, Team A has scored 40 goals but only 25.5 xG, they're probably getting lucky and won't sustain their current form.
14/ Knowing if a team is better or worse than results imply can be valuable if you're:
- a technical director and want to know if your team is bad (& in need of signings) or just unlucky
- a gambler, betting on future results
- a fan who cares about long-term performance
- a technical director and want to know if your team is bad (& in need of signings) or just unlucky
- a gambler, betting on future results
- a fan who cares about long-term performance
15/ Quick caveat: simply adding up the individual xG values of each shot is an OK way to calculate a team's total xG in a game, but there are a few issues beyond the scope of this thread.
For more on this, check out this great explainer from @DannyPage: https://medium.com/@dannypage/expected-goals-just-don-t-add-up-they-also-multiply-1dfd9b52c7d0
For more on this, check out this great explainer from @DannyPage: https://medium.com/@dannypage/expected-goals-just-don-t-add-up-they-also-multiply-1dfd9b52c7d0
16/ Other applications:
- xG can also be calculated for an individual player, which can provide insight into the quality and quantity of shots taken by the player
- Expected assists ("xA") can be calculated for an individual player to measure chance-creation skill
- xG can also be calculated for an individual player, which can provide insight into the quality and quantity of shots taken by the player
- Expected assists ("xA") can be calculated for an individual player to measure chance-creation skill
17/ Interested in learning more?
@AnalysisEvolved breaks down their
xG model here: http://www.americansocceranalysis.com/explanation/
@AlexNovet explains @HockeyGraphs's
xG model here: http://hockey-graphs.com/2019/08/12/expected-goals-model-with-pre-shot-movement-part-1-the-model/
@AnalysisEvolved breaks down their

@AlexNovet explains @HockeyGraphs's
