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

Linear regression

Predicts a number, such as total corners or runs, as a weighted sum of inputs, fitted by minimising squared errors.

Beginnerpre-matchin-playevaluation

In one sentence

Linear regression predicts a quantity, like total corners or runs, by adding up inputs each multiplied by a weight learned from past data.

How it works

Picture a scatter plot of past matches: combined corner averages along the bottom, actual corners up the side. Linear regression draws the straight line that sits closest to all the points, measured by squared vertical distances. With several inputs it does the same in more dimensions.

Each weight tells you how much the prediction moves when that input rises by one, holding the others fixed. The leftover scatter around the line, the residual spread, tells you how uncertain any single prediction is.

For betting, the prediction gives you the centre of the likely outcomes, and the residual spread gives you a probability for an over/under line. That second step matters as much as the first.

The maths

y=β0+β1x1+β2x2+⋯+βkxk+ε,ε∼N(0,σ2)y = \beta_0 + \beta_1 x_1 + \beta_2 x_2 + \dots + \beta_k x_k + \varepsilon, \qquad \varepsilon \sim N(0, \sigma^2) β^=arg⁡min⁡β∑i(yi−y^i)2\hat{\beta} = \arg\min_{\beta} \sum_{i} \left(y_i - \hat{y}_i\right)^2
  • y: the outcome you want to predict (for example, total corners).
  • x_1 to x_k: the inputs (features).
  • β_0: the baseline; β_1 to β_k: the weights.
  • ε: random error, assumed normal with spread σ.
  • ŷ: the model's prediction.

In words: the best weights are the ones that make the squared prediction errors as small as possible on past data.

Worked betting example

A corners model fitted on past league matches (illustrative weights):

corners = 2.1 + 0.55 × (combined corners-won average) + 0.48 × (combined corners-conceded average) − 0.9 × (heavy favourite flag). Residual spread σ = 3.1.

  1. Tonight: combined corners-won average 9.4, combined conceded average 8.0, and one side is a heavy favourite (flag = 1).
  2. Prediction: 2.1 + 0.55 × 9.4 + 0.48 × 8.0 − 0.9 = 10.21 corners.
  3. Line: over/under 10.5. Treating the total as normal with spread 3.1, P(over 10.5) ≈ 46.3%, so P(under) ≈ 53.7%. Fair prices: over ≈ 2.16, under ≈ 1.86.
  4. Both sides trade at 1.95. Backing under with £10 at 2% commission: a win pays £9.50 × 0.98 = £9.31. EV ≈ 0.537 × £9.31 − 0.463 × £10 ≈ +£0.37.

That edge is thin: a small error in σ or in the prediction wipes it out. The normal assumption is also rough for a count like corners.

Where it's good

  • Continuous or near-continuous targets: runs in cricket, match totals, finishing times, speed figures.
  • Estimating standard times and going allowances in racing.
  • Quick, interpretable first models to test whether a feature matters at all.
  • Ratings systems such as Massey, which are linear regression in disguise.

Limitations and pitfalls

  • Assumes straight-line relationships; real effects often curve or level off.
  • Counts (goals, corners, cards) are skewed and cannot go negative, so a Poisson or negative binomial GLM often fits better.
  • A normal residual spread may be wrong: variance often grows with the prediction, and cricket totals have fat tails.
  • Correlated inputs make individual weights unstable and hard to interpret.
  • Many features and little data overfit quickly; use regularisation and walk-forward testing.
  • Predicting the average well is not enough for over/under betting; the tails decide the edge.

How to build it

  • Python: statsmodels OLS for summaries and diagnostics, scikit-learn LinearRegression for pipelines; R: lm.
  • Data: one row per match with target and features computed only from information available before kick-off.
  • Check residual plots and whether spread varies with the prediction.
  • Tip: estimate σ from out-of-sample errors, not in-sample, or your probabilities will be overconfident.
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