Home › How metrics are calculated
How metrics are calculated
The mechanics behind the numbers: which inputs a model uses, what it ignores and where each metric stops being useful.. No invented numbers.
A model is a claim about what predicts an outcome
An expected-goals model is not a formula handed down from a governing body. It is a claim, fitted to historical data, that a set of observable features predicts how often a shot is scored. Change the features and you change the claim, even if the label on the output stays the same.
That is why two providers can publish different xG values for one match without either of them making an error. They are answering the same question with different evidence, and the honest way to read either number is to ask what went into it.
The pages in this section take one metric at a time and open the machinery: what the training sample looks like, which features carry the weight, how the output is calibrated and where the model stops being trustworthy.
From sample to number
Building a metric model is a sequence of choices, and every choice is visible in the final number. The sequence is stable across xG, xA and the rest; only the outcome being predicted changes.
- Training sample: which competitions, which seasons, and how far back the data is trusted.
- Features: location, angle, body part, assist type, defensive pressure, goalkeeper position.
- Model family: a simple additive model, a tree ensemble, or something more flexible.
- Fitting: how the weights are estimated and how strongly they are penalised.
- Calibration: whether predicted probabilities match observed scoring rates.
- Validation: performance on matches the model never saw during fitting.
How xG models are built follows the list in order; xGOT shows what changes when the outcome being predicted moves from the shot to the placement.
Calibration is the test that matters
A model can rank shots correctly and still be scaled wrongly. Ranking asks whether a better chance receives a higher value; calibration asks whether the values themselves mean what they claim. A model whose shots rated at a given level are scored at roughly that rate is calibrated, and only then can the number be summed across a match.
This is where a single-match xG total earns or loses its licence. If the model is calibrated, adding chances is defensible; if it is only good at ranking, the total is a sorting device dressed as a quantity.
The same discipline applies to the other metrics: xA inherits the shot model it feeds, and PPDA depends on a zone definition rather than a fitted weight.
Why two models disagree on the same match
Disagreement is normal and usually traceable. The table below lists the differences that move a number most, in roughly the order they matter when two published values are compared.
| Difference | What changes | Effect on the number |
|---|---|---|
| Sample window | Seasons and competitions used for fitting | Shifts the baseline scoring rate |
| Location detail | Distance and angle, or a finer grid | Reweights similar-looking shots |
| Extra features | Defenders, goalkeeper, assist type | Separates good positions from good chances |
| Model family | Additive versus flexible | Changes how features interact |
| Calibration target | What the output is fitted against | Moves values up or down as a set |
Overfitting sits behind several of those rows. A flexible model can memorise the training sample, fitting noise as if it were signal, and the cure is restraint: fewer features, stronger penalties, and validation on unseen matches.
The final limit is what no model records. A number built from events cannot see the run that pulled a defender away, and a progression definition or a field tilt share is only as good as the coding underneath it. Mechanics explain the number; they do not turn it into the match.
How is xG calculated? The inputs, logic and limits
What goes into an expected goals model: the shot library behind it, distance and angle, body part, pressure and the reasons two providers disagree.
How xA is calculated: crediting the pass before the shot
Expected assists explained: how a pass inherits the xG of the shot it creates, which pass traits raise the value, and why xA misses the pass before the pass.
How is xGOT calculated? Post-shot models explained
Post-shot expected goals explained: why on-target placement replaces shot location, how goalkeeper position enters the model and how to read the gap with xG.
How PPDA is calculated: passes allowed per defensive action
PPDA explained: the passes allowed per defensive action ratio, which events enter the denominator, why the zone matters and what the number hides.
What is a progressive pass? Definition and thresholds
A progressive pass moves the ball materially closer to goal, but providers draw the line differently. How thresholds work, what is excluded and how to read it.
What is field tilt? Measuring territorial dominance
Field tilt is the share of attacking-third play a team controls. How the ratio is built, which events count, why a low block distorts it and how to read it.