浏览代码

Add overround helpers

betbetter 2 周之前
父节点
当前提交
ade3852852
共有 1 个文件被更改,包括 4 次插入 和 0 次删除
  1. 4 0
      overround.js

+ 4 - 0
overround.js

@@ -0,0 +1,4 @@
+// Overround and fair odds (MIT). Data: https://betbetter.world/studies/state-of-the-vig-2026
+const overround = (odds) => odds.reduce((s, o) => s + 1 / o, 0) - 1;
+const fair = (odds) => { const b = overround(odds) + 1; return odds.map((o) => o * b); };
+console.log(overround([1.80, 2.05]), fair([1.80, 2.05]));