Build Your Own Football Prediction Model
The data you need, a Poisson model built step by step into a full score grid, the corrections worth adding, walk-forward backtesting that keeps the future out, and the arithmetic that says when a model is not worth the hours.
A football prediction model is a procedure that turns match history into a probability for every scoreline, and from that grid into a price for every market on the coupon. The core of it is one distribution and two numbers per fixture — how many goals each side is expected to score. Everything that follows is data hygiene, corrections and testing, which is where most home-made models quietly fail.
In short.
- You need match-level results with dates and venues, not season averages. Twelve home and twelve away matches per club is the working minimum.
- The base model is Poisson: two expected-goal figures produce a grid of scorelines, and 1X2, totals and GG are all sums of cells in that grid.
- On the worked fixture the grid gives 51.4% home, 24.5% draw, 24.1% away — fair prices of 1.95, 4.08 and 4.14.
- Backtest walk-forward or not at all: any figure computed from the whole season contains the result of the match you are pricing.
- The benchmark is not profit but the market: if your probabilities are no better than the coupon's, no staking plan rescues them.
What the model has to beat
The comparison is not your model against reality but against the price. A three-way coupon typically adds up to about 105%, so the mark-up is roughly five points spread across the outcomes — the calculation is in the guide to bookmaker margin.
That sets the bar. To be worth betting, your probability has to beat the market's by more than the margin on the side you are backing. Being roughly as good as the coupon is a real achievement and still loses money at a steady rate.
The data you actually need
Start with the smallest table that supports the model: every extra column is another thing to keep clean.
| Field | Why it is needed | Common trap |
|---|---|---|
| Kick-off date and time | Orders the data for testing and recency weighting | Sorting by round number instead of date after postponements |
| Home and away club | Splits every figure by venue | Name changes and duplicate spellings creating two clubs |
| Goals for each side | The model's only compulsory output variable | Recording extra-time or penalty scores in cup fixtures |
| Competition | League and cup fixtures behave differently | Blending a domestic league with continental matches |
| Shots and expected goals, if available | A less noisy input than goals themselves | Mixing figures from two providers with different definitions |
| The price you could have taken | Turns a forecast into a testable bet | Storing today's price and pretending it was available then |
Two seasons of one division is enough to build on and one more to test against. Goals are noisy — a side can play well and lose 0-1 — which is why chance-based inputs help once the basic version works: see expected goals explained and the wider list of stats that predict results.
The core model in three steps
Step one — the league's own level. Suppose the division has played 240 matches producing 612 goals: 2.55 a game. Home sides scored 336 of them and away sides 276, so the home baseline is 336 ÷ 240 = 1.40 and the away baseline 276 ÷ 240 = 1.15. Those two numbers already contain home advantage, measured rather than assumed.
Step two — four ratios. For the home club, divide goals scored per home match by 1.40 and goals conceded per home match by 1.15. For the visitors, divide goals scored away by 1.15 and goals conceded away by 1.40. A rating of 1.00 means exactly average at that job.
Step three — two expected-goal figures. Multiply, never add. Say the home side rates 1.30 in attack at home and the visitors 0.91 in defence away; the home figure is 1.40 × 1.30 × 0.91 = 1.65. If the visitors rate 1.05 in attack away and the hosts 0.87 in defence at home, the away figure is 1.15 × 1.05 × 0.87 = 1.05.
The score grid, and what falls out of it
Goal counts follow a Poisson shape closely enough to price with: the chance of exactly k goals when μ are expected is e−μ × μk ÷ k factorial, the formula set out in the goal lines guide. For μ = 1.65 the home side's chances of 0, 1, 2, 3 and 4 goals are 19.2%, 31.7%, 26.1%, 14.4% and 5.9%. For μ = 1.05 the visitors' are 35.0%, 36.7%, 19.3%, 6.8% and 1.8%.
Multiply every home figure by every away figure and you have the grid. Values are percentages; rows are home goals, columns away goals.
| Home / away | 0 | 1 | 2 | 3 | 4 |
|---|---|---|---|---|---|
| 0 | 6.72 | 7.06 | 3.70 | 1.30 | 0.34 |
| 1 | 11.09 | 11.64 | 6.11 | 2.14 | 0.56 |
| 2 | 9.15 | 9.61 | 5.04 | 1.77 | 0.46 |
| 3 | 5.03 | 5.28 | 2.77 | 0.97 | 0.25 |
| 4 | 2.08 | 2.18 | 1.14 | 0.40 | 0.11 |
These twenty-five cells cover 96.9% of outcomes, so compute out to eight or ten goals before summing. Every market is then a sum of cells: below the diagonal is a home win, the diagonal a draw, above it an away win.
Adding the full grid gives 51.4% home, 24.5% draw and 24.1% away. Fair prices are the reciprocals: 1 ÷ 0.514 = 1.95, 1 ÷ 0.245 = 4.08, 1 ÷ 0.241 = 4.14. The same grid says both teams score 52.5% of the time (fair 1.90) and three or more goals arrive 50.6% of the time (fair 1.97), so one calculation prices the whole fixture.
Example. The coupon shows 1.85 / 3.60 / 4.40. Converting those to percentages gives 54.1% + 27.8% + 22.7% = 104.6%, so the book carries 4.6% of mark-up — the method is in turning odds into probability. Against your grid, the home price is dear: 0.514 × 1.85 − 1 = −4.9%, a pass. The away price is not: 0.241 × 4.40 − 1 = +6.0%, which on a ₦500 stake is ₦30 of expected value. Across forty such bets at ₦500 — ₦20,000 staked — that is about ₦1,200, arriving in a very lumpy sequence.
Corrections worth adding, in order
- Recency weighting. A match from last October should not count as much as one from March. Weight each match by a decay factor — halving roughly every thirty matches is a sensible start — rather than a hard cut-off at ten games.
- Shrinkage for small samples. A promoted club with six matches should not carry a 1.60 attack rating. With k matches and a constant of 10, take k ÷ (k + 10) of the raw rating and the rest from the league average.
- The low-score correction. Independent Poisson slightly under-counts 0-0 and 1-1 and over-counts 1-0 and 0-1, because in a real match the two scores are not independent. Nudging those four cells is the standard first refinement.
- Competition splits. Cup ties, dead rubbers and continental fixtures behave differently: model them separately or exclude them.
- Manual overrides, sparingly. A confirmed absent first-choice striker or goalkeeper deserves an adjustment. Two overrides per fixture is a model with a helper; ten is a person guessing with extra steps.
Backtesting without look-ahead bias
Look-ahead bias is any information in your test that you would not have had at the moment of betting. It is silent, it always flatters, and it is why most home-made models look excellent on history and lose money live.
| Shortcut | What it leaks | Effect on the result |
|---|---|---|
| Ratings built from the full season | The result of the match being priced | Flatters heavily; the model half knows the answer |
| Testing on the same data used to choose thresholds | Your own hindsight about which rules worked | Every threshold looks optimal |
| Using closing prices as the price taken | Information that arrived after your bet | Overstates edge, since closing prices are sharper |
| Dropping fixtures with missing data | Usually the abandoned and odd matches | Removes exactly the results that hurt |
| Ordering by round instead of kick-off time | Rearranged fixtures played later | Small but systematic, and always in your favour |
The cure is walk-forward testing. Sort every match by kick-off time; for each fixture rebuild the ratings from matches that finished before it, price it, record the bet the rule would have placed and the price available then, and move on. Keep one season untouched until the model is final, and treat the first result from it as the real one.
Important. Count every bet the rule generates, including the ones you would have talked yourself out of. A backtest that quietly excludes fixtures is not a test of the model but of your memory, and the same discipline applies to the log of your real bets — see tracking your bets.
Calibration: are the percentages honest?
Profit is a slow and noisy measure of a model. Accuracy is faster: take the probability you gave, subtract 1 if the event happened and 0 if it did not, and square the difference. Lower is better, and your average can be compared directly with the market's.
| Fixture | Model | Market | Result | Model error² | Market error² |
|---|---|---|---|---|---|
| 1 | 55% | 50% | Won | 0.2025 | 0.2500 |
| 2 | 40% | 45% | Lost | 0.1600 | 0.2025 |
| 3 | 62% | 58% | Won | 0.1444 | 0.1764 |
| 4 | 30% | 35% | Lost | 0.0900 | 0.1225 |
| 5 | 48% | 52% | Won | 0.2704 | 0.2304 |
| 6 | 25% | 22% | Lost | 0.0625 | 0.0484 |
The model's total is 0.9298 across six fixtures, an average of 0.155; the market's is 1.0302, an average of 0.172. On this handful the model is the more accurate — and six fixtures settle nothing, which is the point. How long a verdict really takes is worked out in variance and sample size.
Run the same measure per band as well. If everything you rate at 60% wins about 60% of the time, the model is calibrated; if the confident band consistently under-delivers, the ratings are being stretched.
When a model is not worth building
Count the hours honestly: forty to build a first version, then two or three a week to keep the data current. Suppose it produces twenty qualifying bets a week at ₦500 with a genuine 3% edge. That is 20 × ₦500 = ₦10,000 of turnover and ₦300 a week of expected value — roughly ₦100 an hour of maintenance, before a single losing month.
Three things make that worse: markets you cannot model, where your data is thinner than the operator's; leagues under heavy professional attention, where the price already contains what your grid knows; and success itself, since an account that keeps beating the price gets its stakes cut — see limited accounts.
A model is worth building if you want a number to argue with rather than a feeling, and can accept that its main product is refusals. For the output without the maintenance, structured analysis of single fixtures gets you most of the way — see how to analyse a match and the divisions on the tournaments page.
FAQ
Do I need programming skills to build this?
Not for the version above. A spreadsheet with one row per match, four ratings per club and a twenty-five-cell grid does everything described here. Code becomes necessary for walk-forward testing across several seasons, because rebuilding ratings by hand before every fixture is impractical.
Why does the model disagree with the market so often?
Usually because it is missing information rather than finding value. Absences, a change of manager, a neutral venue and rotation before a cup tie are all in the price and none are in the grid. Treat a large gap as a prompt to check the inputs, and pass when you cannot explain where it comes from.
Should I use expected goals instead of actual goals as the input?
Once the basic version runs, yes. Goals are a small sample of a noisy process and chance quality stabilises faster, so ratings built on expected goals move less on one freak scoreline. Run both for a season and compare their squared errors before switching.
How much history should the ratings use?
Roughly one and a half seasons with decay, rather than a fixed window. Too short and one 4-0 rewrites a rating; too long and you are describing a squad that no longer exists. Shrink towards the league average whenever fewer than eight matches at the relevant venue support a figure.
This article is for information only and is not an inducement to gamble. Betting involves the risk of losing money — never stake more than you can afford to lose. 18+. If gambling stops being entertainment, read our responsible gambling guide and seek help.