Jelajahi Sumber

Add overround helpers

betbetter 2 minggu lalu
induk
melakukan
ade3852852
1 mengubah file dengan 4 tambahan dan 0 penghapusan
  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]));