Răsfoiți Sursa

Add overround helpers

betbetter 2 zile în urmă
părinte
comite
95004388ac
1 a modificat fișierele cu 6 adăugiri și 0 ștergeri
  1. 6 0
      overround.R

+ 6 - 0
overround.R

@@ -0,0 +1,6 @@
+# Overround and fair odds in R (MIT). Reference: https://betbetter.world/studies/state-of-the-vig-2026
+overround <- function(odds) sum(1 / odds) - 1
+fair_odds <- function(odds) { q <- 1 / odds; sum(q) / q }
+tennis <- c(1.80, 2.05)
+print(round(100 * overround(tennis), 2))
+print(round(fair_odds(tennis), 2))