Skip to content

Naive Bayes Match Predictor

Start from how often each result happens, then let every clue shift the odds. Switch between three separate clues and one combined clue to see what counting the same news twice does.

HomeAway Points from the last 5 games Points this season Games played this season Points last season

Last season's points are over 38 games. Promoted side? Use about 45, what a newly promoted side usually earns.

That makes the gaps for recent form, this season and last season, in points per game.

Clues

Try an example

How to read it

  • Enter what each side has done: points from its last five games, this season so far, and last season. A league table and the last few results have all of it.
  • The model only sees the gaps, home side minus away side. It doesn't know who is playing, just how far apart they've been.
  • The three chances add up to 100%. A 60% home win still means the home side fails to win four times in ten.
  • It knows only results. Injuries, suspensions, transfers and a new manager are invisible to it.
  • Change one number at a time to see which ones the model cares about.
Home win
Draw
Away win

Clue by clue

HomeDrawAway

Try the Rangers v Motherwell example with three clues, then one. Each clue repeats much of the last, so three separate clues push the forecast far too high. Motherwell won 3–2.

How it works

Each result starts at its base rate, and each clue multiplies in how typical that gap is of matches with that result:

$$\begin{aligned} &P(\text{home} \mid \text{clues}) \\ &\quad \propto P(\text{home}) \times P(c_1 \mid \text{home}) \times \dots \end{aligned}$$

In plain football

  • The base rates come from the 3,900 training matches, 2001/02 to 2020/21: home wins 43.8%, draws 23.4%, away wins 32.8%.
  • How typical a gap is comes from a bell curve fitted to that gap in matches with each result. Home wins came with a this-season gap of +0.31 a game on average; away wins with −0.39.
  • The strength clue is the average of the this-season and last-season gaps, the mix that scored best on held-back seasons. With it, naive Bayes scored a log loss of 0.951 on the five test seasons, level with logistic regression; with three separate clues, 1.020.

Where it goes wrong

  • Three clues counted separately make it overconfident: when it said a home win was 80% likely or more, it averaged 92%, and 80% happened.
  • It knows only results. Injuries, suspensions, transfers and new managers are invisible to it.
  • It sees gaps, not teams, and it was fitted on the Scottish Premiership, where two clubs have usually been far ahead of the rest.

How it was built and tested: Clue by clue. Naive Bayes, and the danger of counting twice

These figures come from a statistical model and are for analysis and education. Football remains uncertain and model predictions will frequently be wrong.