Markets coveredMatch OddsCorrect ScoreOver / UnderFirst HalfSecond Half
Statometrics
Model Library · Ratings and regression

Expected goals (xG)

A model that gives every shot a probability of being scored, so team and player quality can be judged on chances rather than noisy goals.

Intermediatepre-matchin-playevaluation

In one sentence

Expected goals (xG) is the probability that a shot becomes a goal, estimated from thousands of similar past shots, and summed to measure the quality of chances a team creates.

How it works

Goals are rare and luck plays a big part: a team can dominate and lose 1-0. xG looks past the scoreline to the chances. A penalty is worth about three-quarters of a goal; a speculative 30-yard shot might be worth 0.03.

Each shot's value comes from a model, usually logistic regression or gradient boosting, trained on past shots. Inputs include distance, angle, body part, type of assist and whether it was a set piece. Richer versions add defender positions and goalkeeper location.

For betting, xG totals over several matches are a steadier guide to attacking and defensive strength than goals, and they feed goal models that price over/under and match odds.

The maths

xGshot=11+e−(β0+β1x1+⋯+βkxk)xG_{\text{shot}} = \frac{1}{1 + e^{-(\beta_0 + \beta_1 x_1 + \dots + \beta_k x_k)}} xGteam=∑shotsxGshot,P(at least one goal)=1−∏shots(1−xGshot)xG_{\text{team}} = \sum_{\text{shots}} xG_{\text{shot}}, \qquad P(\text{at least one goal}) = 1 - \prod_{\text{shots}} (1 - xG_{\text{shot}})
  • x_1 to x_k: shot features such as distance, angle and header or foot.
  • β values: weights learned from historical shots.
  • xG_team: expected goals from all the team's shots.
  • The product term: the chance every shot misses, assuming shots are independent.

In words: each shot gets a scoring probability from its features, and adding them up tells you how many goals the chances were worth.

Worked betting example

Part one, a single match. A team takes five shots worth 0.76 (penalty), 0.12, 0.05, 0.31 and 0.08.

  1. Team xG = 0.76 + 0.12 + 0.05 + 0.31 + 0.08 = 1.32.
  2. Chance of scoring at least once = 1 − (0.24 × 0.88 × 0.95 × 0.69 × 0.92) ≈ 87.3%.

Part two, pricing. From recent xG form, you estimate the home side will generate 1.55 expected goals and the away side 1.15.

  1. Total expected goals λ = 2.70. Treating goals as Poisson, P(3 or more goals) ≈ 50.6%. Fair price for over 2.5 ≈ 1.97.
  2. Betfair offers 2.10 on over 2.5. £10 stake, 2% commission: a win pays £11 × 0.98 = £10.78. EV ≈ 0.506 × £10.78 − 0.494 × £10 ≈ +£0.51.

A small edge like this can vanish with a modest error in either team's xG estimate.

Where it's good

  • Rating teams early in a season when goal tallies are dominated by luck.
  • Spotting teams whose results outrun their chances, a common sign of regression to come.
  • Feeding Poisson and Dixon-Coles models with steadier attack and defence inputs.
  • In-play, judging whether a scoreline reflects the run of play.
  • Player scorer markets, where shot volume and quality matter more than recent goals.

Limitations and pitfalls

  • Different providers give different xG for the same shot; do not mix sources.
  • Basic models ignore defender and keeper positions, so they undervalue open goals and overvalue crowded shots.
  • xG ignores chances with no shot, such as a cross that just evades a striker.
  • Finishing skill exists for some elite players, but it is small and hard to prove from limited shots.
  • Game state distorts xG: a team leading 2-0 may sit back and concede many low-value shots.
  • xG is now mainstream and bookmakers and exchange traders use it, so obvious xG-versus-goals gaps are often already priced.
  • Summing independent shot probabilities misstates rebounds; many models group shots from the same move.

How to build it

  • Python: scikit-learn or lightgbm for the shot model, statsmodels for logistic regression; mplsoccer for plotting.
  • Data: event data with shot locations and types, from providers such as StatsBomb (some free open data) or Opta.
  • Check calibration: across all shots rated around 0.10, about 10% should be goals.
  • Tip: use rolling, time-weighted xG for and against, and blend with actual goals rather than discarding them.
Learn it step by step
18+ only. Educational content, not financial or betting advice. Past results do not guarantee future returns. If gambling stops being fun, get free, confidential help at BeGambleAware.org.
Members