Ebb-and-flow: Using xPG to capture soccer’s momentum swings

By Cheuk Hei Ho (@tacticsplatform), Eliot McKinley (@etmckinley), and Jamon Moore (@jmoorequakes)

Recently we introduced Expected Possession Goals (xPG) as an experimental metric. In our latest article, we introduced four uses of xPG. Like any good experiment, things are subject to change as you take input. To help xPG be a little easier to consume, we’re updating some of the terms to be more understandable:

Chance xPG (formerly called Positive xPG) is the total value of a possession based on weighted values gained from actions such as ball-winning actions, passes, dribbles and shots. It is assigned to all the players involved in a possession. A player or team with high Chance xPG is getting the ball into higher opportunity areas for a shot. Chance xPG is expressed in a positive value.

Shot xPG (formerly called Successful xPG) is the total Chance xPG earned by possessions ending in a shot. Players and teams with a high Shot xPG relative to Chance xPG are ones which are good at turning chances into shots. Easy, right?

Risk xPG (formerly called Negative xPG) is a bit trickier. It represents the risk a team takes on based on offensive actions such as passes and shots being performed in areas where their opponent could get a good chance if they were to win the ball. A player or team with high Risk xPG is often playing out of the back or being pressured in their own half. Managing risk is an important skill for a team or player to have. Although Risk xPG is not inherently bad, Risk xPG is expressed in a negative value.

Mistake xPG (no name change) represents the value of the opponent’s possession after they win the ball. It is assigned only to the player who made the errant pass or lost the ball. There is no Mistake xPG if a player takes a bad shot, only if they lose the possession for their team. Mistake xPG is expressed in a negative value.

With that out of the way, let’s get going.

Making the Most of Your Chances

Everyone understands the importance of momentum in sports. Every team wants to seize the momentum, create better scoring opportunities, and put pressure on their opponent. Momentum is extremely important in soccer. You know it because you can just “feel that goal was coming” or that one team is outplaying the other, even if the goal hasn’t come yet. The flow of the game is what gives us this feeling. Fans in the stadium intuitively understand it as well. As a team gets closer to a goal, the quality of the opportunities are expressed through the fans as their anticipation and noise level builds.

We created Expected Possession Goals (xPG) primarily to help us express the scoring opportunity for each possession. Every action a team makes with the ball is intended to increase the likelihood of scoring, and xPG captures this. As a team gets closer to the opponent’s goal, their chance to create a shot grows and as such, their Chance xPG grows as well. Chance xPG is calculated minute-by-minute for each team to create a visualization like this:

We call this xPG GameFlow. xPG GameFlow captures the changing momentum of a match. For each minute, the difference between the home team’s Chance xPG and the away team’s Chance xPG is expressed in a bar (home value minus away value). When the home team is creating higher Chance xPG the bar is positive and negative when the away team has higher Chance xPG. The match featured above was a 3-to-2 comeback victory by Sporting Kansas City. Houston was left lamenting not making the most of their chances (see what we did there?) in between their two goals and again in the 53rd minute, which was the highest momentum minute of the match for either team. xPG GameFlow clearly shows Houston had the most valuable opportunities in the first half, but then SKC woke up and mostly controlled the match after the 38th minute. Overall, SKC won the quality-of-chances battle 8.6 to 5 on Chance xPG.

Sometimes there are disruptive events in a soccer match, which change the momentum. Goals often change momentum, so do red cards. Check out this game from earlier in the season between Real Salt Lake and DC United:

Note for goal types: CK = corner kick, SP = set piece, FK = free kick and PEN = penalty kick

DC United got off a hot start with a Paul Arriola goal in the 9th minute. Following DC’s goal, RSL created a bit of their own momentum, and following a goal from Corey Baird, you can see Joseph Mora was given a red card in the 22nd minute on the xPG GameFlow. This killed DC United’s momentum, and RSL effectively dominated for the next 30 minutes, scoring two more goals before DC United finally created some momentum of their own and got a goal from Steve Birnbaum. Not even watching this game, we can feel the momentum swings using Chance xPG and xPG GameFlow. DC United’s momentum in the final 30 minutes was so strong that they won the Chance xPG battle 7.5 to 7.1. You can envision both coaches telling the press they had the better chances on the day, but only one coach would be right.

Beyond a simple possession percentage statistic, we believe Chance xPG is more useful to determine who had control of a match. Minute-by-minute Chance xPG difference captures the flow of a soccer game, and also shows who had the better quality chances and by how much. In contrast Expected Goals (xG) shows who “took their chances” or “who made the most of the chances they had”. Sometimes you will hear someone say xG shows who had the better chances. This isn’t actually correct, because it doesn’t show those times a team was near the goal and didn’t take a shot. xPG GameFlow using Chance xPG does this.

How xPG is Calculated

For those interested in how xPG works and haven’t read our earlier articles, here’s a quick overview. The four xPG uses at the beginning of the article are based on Expected Goals (xG) action weighting, using a method called Non-shot Expected Goals (NSxG). NSxG takes the value a team would have received if they had taken a shot from a spot on the pitch and assigns it to actions which are not shots. The values are higher the closer the action is to goal. Risk xPG and Mistake xPG inverts the xG “map” and assigns negative values to all actions.

We covered this in our last article where we were referring to Chance xPG as “Positive xPG”, but here is more detail about how Chance xPG is calculated.

The map above contains a 9x18 set of zones (standard 18 pitch zones with 9 sub-zones each). The value in each zone is the average xG value of all shots in that zone since ASA started tracking it. We call this the Positive NSxG Map (there is a Negative NSxG Map, but Chance xPG doesn’t use it).

Chance xPG accumulates based on the zone value as successful actions occur in them, shown in blue above. There is no NSxG value for the first two passes in this example as they are too far away from goal to result in a shot of any value. The third pass has a NSxG = 0.004, and then an unsuccessful pass ends the possession earning no NSxG. Thus the total Chance xPG for this possession is 0.004.

Conclusion

Taking just one of our four xPG variants we have come up with an interesting way to examine the flow of a game. Unlike a simple possession percentage statistic that doesn’t tell you what a team did with the ball, Chance xPG measures the quality of the time with the ball. You can dominate possession but not create good chances (hello, Messi and Argentina). xPG GameFlow is also better than other proprietary momentum scores, as you don’t know what you are looking at other than the up and down of bars. But for xPG GameFlow, you know exactly what you are reading: a value that measures how close the ball is to the goal and therefore, how likely a goal can be scored from that position. Like possession percentage, however, xPG GameFlow also accumulates to a higher value when one team controls the ball for a longer period of time. A counter-attacking team may accumulate less Chance xPG because they have fewer touches per possession, so it would be interesting to evaluate Chance xPG per minute of possession. In the future, we may supplement xPG GameFlow with other xPG variants such as Risk xPG or Shot xPG to describe a match’s development in a more comprehensive manner.

There is good reason to believe the total Chance xPG of a match may indicate its excitement level. The more a match stays in the center of the pitch, the less Chance xPG will accumulate. Other than cards and theatrics, fans like matches which are played to the edges of the pitch where they can anticipate goals whether they come or not. It could be that next match you say was the “most exciting 0-0 draw I’ve ever seen” had the highest total Chance xPG as well.

You can see xPG GameFlow graphs for MLS games by following @GameFlowxPG on Twitter.

Stay tuned to American Soccer Analysis in the coming weeks for more about the many uses of Expected Possession Goals.