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

Generalised linear models (GLMs)

A family of regressions that handle counts, probabilities and skewed data by pairing a linear score with a suitable distribution and link.

Intermediatepre-matchin-playevaluation

In one sentence

A GLM keeps the simple weighted-sum idea of linear regression but lets the outcome follow a distribution that suits it, such as Poisson for goals.

How it works

Linear regression assumes outcomes are bell-shaped around a straight line. Goals, cards and corners are whole numbers that cannot be negative, and win/lose outcomes are yes or no. A GLM handles all of these with two choices.

First, pick a distribution for the outcome: normal for times, binomial for yes/no, Poisson or negative binomial for counts, gamma for skewed positive amounts. Second, pick a link, a function that connects the weighted sum to the average outcome; for counts this is usually the log, which keeps predictions positive.

Logistic regression is a GLM. So is the classic Maher-style football model, where each team's goals are Poisson with a log rate built from attack strength, the opponent's defence and home advantage.

The maths

g(E[Y])=β0+β1x1+⋯+βkxkg\big(E[Y]\big) = \beta_0 + \beta_1 x_1 + \dots + \beta_k x_k Football Poisson GLM:ln⁡λhome=μ+h+ahome−daway,ln⁡λaway=μ+aaway−dhome\text{Football Poisson GLM:} \quad \ln \lambda_{\text{home}} = \mu + h + a_{\text{home}} - d_{\text{away}}, \qquad \ln \lambda_{\text{away}} = \mu + a_{\text{away}} - d_{\text{home}}
  • E[Y]: the average outcome, such as expected goals.
  • g: the link function (log for counts, logit for probabilities).
  • λ: expected goals for a side.
  • μ: league baseline; h: home advantage.
  • a: attack strength; d: defence strength (higher means better defence).

In words: build a score from the inputs, then use the link to turn it into a sensible average for that kind of outcome.

Worked betting example

A fitted Poisson GLM gives μ = 0.10 and h = 0.25. Home side: attack 0.30, defence 0.15. Away side: attack 0.05, defence −0.10.

  1. Home log rate: 0.10 + 0.25 + 0.30 − (−0.10) = 0.75, so λ home = e^0.75 ≈ 2.12 goals.
  2. Away log rate: 0.10 + 0.05 − 0.15 = 0.00, so λ away = e^0 = 1.00 goal.
  3. P(home scores) = 1 − e^(−2.12) ≈ 88.0%. P(away scores) = 1 − e^(−1.00) ≈ 63.2%.
  4. Treating the two as independent, P(both teams to score) ≈ 0.880 × 0.632 ≈ 55.6%. Fair price ≈ 1.80.
  5. Betfair offers 1.85 on BTTS yes. £10 stake at 2% commission: a win pays £8.50 × 0.98 = £8.33. EV ≈ 0.556 × £8.33 − 0.444 × £10 ≈ +£0.19.
  6. At 1.92 EV rises to about +£0.57. At 1.85 the edge is too small to trust once model error is considered.

Where it's good

  • Goals, corners, cards and shots markets, using Poisson or negative binomial GLMs.
  • Team attack and defence ratings with home advantage in one fitted model.
  • Yes/no markets via the binomial (logistic) GLM.
  • Adding context such as weather, referee or rest days as extra terms.
  • A transparent baseline that is hard to beat for many football markets.

Limitations and pitfalls

  • Poisson assumes the variance equals the mean; cards and corners are usually more spread out, so use negative binomial.
  • Independent home and away Poisson goals slightly misprice low scores and draws; Dixon-Coles corrects this.
  • Straight-line effects on the link scale can miss curves; GAMs relax this.
  • Team strengths change through a season; without time weighting the model lags.
  • Many team parameters with few matches overfit early in the season.
  • BTTS and goal markets in top leagues are efficient; a GLM rarely finds big edges there.

How to build it

  • Python: statsmodels GLM (family=Poisson, NegativeBinomial, Binomial), penaltyblog for ready-made football models; R: glm.
  • Data: one row per team per match, with goals, team, opponent and a home flag.
  • Add exponential time decay weights, as in Dixon and Coles (1997), so recent matches count more.
  • Tip: check for overdispersion by comparing the residual deviance to the degrees of freedom before trusting Poisson.
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