Logistic Regression Match Predictor
Three numbers known before kick-off, one model trained on 20 Scottish Premiership seasons. Tell it how much better or worse the home side has been, and it gives a chance for every result.
Each gap is points per game, home side minus away side: over the last five matches, over this season so far, and over last season. Positive means the home side has been better.
Try an example
- Home win
- Draw
- Away win
Try the "hot form" example: a side on a great run but weaker over the season is still the underdog. The model learned that form over five games barely matters once it knows the season.
How it works
Each gap is first measured in standard deviations, so the three are on the same scale. Then each result gets a score. For a home win:
$$\begin{aligned} \text{score}_{\text{home}} = \;&b_{\text{home}} + w_1 \times \text{form} \\ &+ w_2 \times \text{this season} \\ &+ w_3 \times \text{last season} \end{aligned}$$The away win has its own score; the draw's is always 0. Each result's chance is its share of the total, after turning scores into positive numbers:
$$P(\text{home}) = \frac{e^{\text{score}_{\text{home}}}}{e^{\text{score}_{\text{home}}} + 1 + e^{\text{score}_{\text{away}}}}$$In plain football
- The starting value, \(b\), is where home advantage lives: with no gaps at all, the home side is still the likeliest winner.
- The weights, \(w\), say how much each gap matters. This season and last season count about equally; recent form hardly at all.
- The model was trained by gradient descent on every Premiership match from 2001/02 to 2020/21, and tested on the five seasons since.
The weights it learned
| Start | Form | This season | Last season | |
|---|---|---|---|---|
| Home vs draw | +0.52 | +0.04 | +0.37 | +0.29 |
| Away vs draw | +0.18 | −0.01 | −0.21 | −0.36 |
On the five test seasons it scored a log loss of 0.950, against 0.932 for the bookmakers and 1.099 for a model that knows nothing. It never makes a draw the favourite; draws are never quite the single likeliest result.
Where it goes wrong
- It knows only results. Injuries, suspensions, transfers and new managers are invisible to it.
- It sees gaps, not teams: it doesn't know who's playing, only how far apart they've been.
- It was trained on the Scottish Premiership, where two clubs have usually been far ahead of the rest.
These figures come from a statistical model and are for analysis and education. Football remains uncertain and model predictions will frequently be wrong.