Now that the World Cup is getting interesting, let's take a closer look at those...
Pustam | पुस्तम | পুস্তম🇳🇵 @pustam_egr@mathstodon.xyz
Now that the World Cup is getting interesting, let's take a closer look at those famous xG (Expected Goals). ⚽️🥅
The concept isn't new at all, but in recent years the models have been refined by incorporating player positioning data and thousands of contextual variables.
Let's dive into the probabilistic model (which is what we're here for).
The first thing xG does is assign each shot a probability between 0 and 1 of ending up as a goal.
If a shot has xG = 0.30, it means that, historically, similar shots have resulted in a goal 30% of the time.
It doesn't matter whether that specific shot actually went in or not. It simply measures the statistical quality of the chance.
How is it calculated?
A model is trained (traditionally using logistic regression, though gradient boosting is now also common) on hundreds of thousands of well-labeled historical shots (goal / no goal).
The main inputs include:
• Distance to goal
• Shooting angle
• Body part used (head, stronger foot, belly button...)
• Type of assist (cross, through ball, counterattack...)
• Positional context
The model outputs P(goal) for every shot.
A team's total xG is simply the sum of all those probabilities.
From a mathematical standpoint, each shot is treated as a Bernoulli trial.
The total expected goals is therefore the expected value of the sum of those trials.