If you've ever looked at sportsbook odds and wondered "what does the bookmaker actually think the probability is?" — the number you see is not it. It's inflated by the vig (a.k.a. juice / margin), the cut the book bakes into every market. Here's the math to recover the fair number, with drop-in JS you can paste into any project.
1. Odds → implied probability
Decimal odds D map to an implied probability:
const impliedProb = 1 / D; // D = 2.00 -> 0.50 (50%)
The catch: in a 2-way market the two implied probabilities sum to more than 100%. That overround is the vig.
// 1.91 / 1.91 market
const pa = 1 / 1.91; // 0.5236
const pb = 1 / 1.91; // 0.5236
const overround = pa + pb; // 1.0471 -> 4.71% margin
2. Stripping the vig (normalisation method)
The simplest devig is proportional normalisation — divide each side by the overround:
const fairA = pa / (pa + pb); // 0.50 -> the "fair" no-vig probability
Now fairA is the market's actual estimate, vig removed. (There are fancier methods — Shin, logarithmic, power — but normalisation is the honest baseline.)
3. Expected Value: is it a value bet?
A bet only makes long-run sense if your probability estimate beats the offered odds:
const EV = yourProb * D - 1; // > 0 means positive expectation
4. Sizing it with Kelly
The Kelly criterion gives the bankroll fraction that maximises long-run growth:
// b = D - 1, p = win prob, q = 1 - p
const kelly = (b * p - q) / b;
// most people use half- or quarter-Kelly to cut variance
That's the entire toolkit — four formulas. You can wire them into a single form in ~100 lines of vanilla JS with zero dependencies.
The hard part isn't the math
Every formula above takes your estimated win probability as input — and that estimate is the whole game. Turning raw signals (Elo ratings, expected goals, market consensus, recent form) into one calibrated probability is where the real modelling happens.
If you want to see how a multi-signal model documents that process, this write-up of a five-signal fusion approach is a solid reference: OkayAI's methodology. For the expected-goals piece specifically, this xG explainer covers how shot quality becomes a probability — it comes from OddsForge, the analysis platform OkayAI is built on.
Educational only — the vig means the long-run edge is against you unless you consistently find genuine value. Bet responsibly.
Top comments (0)