Series odds, two ways
prototypeExact best-of-N series win probability from a per-game edge, checked against a Monte-Carlo run on the server.
The exact number sums a negative-binomial distribution: for a best-of-N series, the first side to reach (N+1)/2 wins takes it, and the formula sums the chance of getting there after every possible number of losses along the way. It only knows the single per-game probability — no home edge, no simulation.
The simulated number runs sims seeded series on the server, adding home_edge to the per-game probability only in home games (the 2-2-1-1-1 pattern). With no home edge the two numbers agree within simulation error. Raise it and they part ways on purpose: the exact sum never sees it, so the growing gap between exact and simulated is exactly what home advantage is worth.
checking sign-in…
example output · p=0.6, best of 7
- exact
- 71.0%
- simulated
- 71.1%
- gap
- 0.1%