A glowing cyan line for a predicted margin, with fourteen green dots for results scattered above and below it, each joined to the line by a dotted amber tick showing how far it missed.

Article · Nov 10, 2026 · 5 min read

How I test a sports betting model using margin error

When a model says "home by 4", that's a number I can check to the point. Here's the formula I use to grade predicted margins and totals, and what it showed across six leagues.

A probability is one kind of claim. A score is another. When EdgeBet says the home team wins by 4, I can check that to the point, and the formula that does it is the simplest one in this whole series.

This is the second piece on the maths behind EdgeBet. The first one covered log loss and calibration, which grade a probability. This one grades a predicted margin: how far off the score was, in points. The textbook name is mean absolute error. I call it margin error, because that's what it is.

Mean absolute error, in one line

For each game, take the margin the model predicted (home score minus away score), subtract the margin that actually happened, drop any minus sign, and average across every game. Lower is better. It's in points, so it reads like what it is: how far a call missed by on a typical night.

The model saidFinalMargin error
Home by 4Home by 73
Home by 4Home by 13
Home by 4Away by 610
What one game scores. Lower is better.

A miss is a miss: 3 points short counts the same as 3 points long. (There's a cousin, root mean squared error, that squares each miss first, so blowouts count for a lot more. The study used the plain average.) The margin models were also tuned on it: their settings were chosen to make this number as small as possible on older seasons, then locked, then graded on games they'd never seen. Same rules as last time.

Why a point spread prediction needs its own check

You'd think the spread is covered once you've graded the probability. Mostly it isn't.

"Does the home team win by more than a point or two?" sounds like a spread question. In the NBA it has the same answer as "does the home team win?" on 96.5% of games. So a spread probability graded at that line is mostly the moneyline again with a new label.

I found that out the awkward way. In baseball and hockey, the reference line came out at half a run or half a goal on every single game, so "home wins by more than 0.5" was exactly "home wins". On 7,245 MLB games, the spread results were the moneyline results. The independent check caught it, those labels were withdrawn, and baseball and hockey moved to the run line and puck line (win by 2 or more) instead.

Margin error doesn't have that problem. It grades the predicted margin itself, not a yes-or-no question built on top of it.

Beat the dumb answer first (again)

Same idea as part one: a number means nothing until it beats something simple. For margins, the dumb answer is the league's average home margin so far this season, given to every game.

LeagueGamesLeague averageBest team-stats modelCloser by
NCAA football4,95317.8512.964.89
NCAA basketball17,24211.619.202.41
NBA3,96212.7911.171.62
NFL85511.1410.240.90
CFL25811.1610.490.67
Spread: margin error in points on 2023 to 2025 games. Lower is better.
Chart of spread margin error in points by league, league average against the best team-stats model: NCAA football 17.85 to 12.96, NCAA basketball 11.61 to 9.20, NBA 12.79 to 11.17, NFL 11.14 to 10.24, CFL 11.16 to 10.49.
Spread margin error on 2023 to 2025 games, in points: the league average against the best team-stats model.

The best model in every league beat the league average, and none of those gains is a fluke of which games happened to be in the sample. The NBA one, for example, is 1.62 points closer, with a 95% range of 1.37 to 1.88.

The raw numbers look ugly. The best NBA model still misses by 11 points on a typical night. That's not the model being bad. That's basketball: a bench run, a cold quarter, garbage time. Final margins are noisy and no model gets near zero, which is why the comparison is the point and the number alone isn't.

College football gains the most because the gaps between teams are enormous. One league average for every game can't see a top program hosting a much smaller school. Team stats see it right away.

Totals: where it falls flat

Same formula for the total: the predicted combined score against the real one.

LeagueGamesLeague averageBest team-stats modelCloser by
NCAA basketball17,24214.91 points13.371.54
NBA3,96216.17 points14.861.31
NCAA football4,95313.53 points12.930.60
NFL85510.64 points10.390.25
MLB7,2453.56 runs3.560.01, noise
NHL4,1901.86 goals1.860.00, noise
Totals: margin error on 2023 to 2025 games. Lower is better.

Baseball and hockey are the honest part of this table. Nineteen models built from team stats, and not one predicted the total better than the league average. Not one. I'd rather know that than pretend.

College basketball is the one worth a second look. Its totals beat the league line comfortably, and the gain grows as the season goes on. About 360 teams play at very different speeds, and one league average can't see that.

Then the closing line

Margin error has one more use: it puts a model and the market on the same scale. A closing spread is the market's predicted margin, so the same formula grades it.

In college basketball, on the games with a closing line, the close missed the margin by 8.86 points on average. The best team-stats model missed by 9.22. On totals it was 13.01 against 13.40.

Closer than you might expect, and the market still wins. It's the same pattern as part one: team stats get most of the way there, and the price gets a bit further. That's why this stays a check that sits beside each game, not where a position comes from. Trust, but validate.

What it doesn't tell me

Margin error grades the middle of a prediction, not the spread around it. A model can be right on average and still be wrong about how likely a team is to cover, which sends me straight back to calibration. I need both.

Next up: taking the bookmaker's margin out of a price. It sounds like housekeeping. It turned out to decide one of my results. After that, sample size.

None of this makes betting a plan or a sure thing. The record is on the Positions page, win or lose, and if betting stops being fun, here's where to start.