Sfoglia il codice sorgente

Add overround helpers

betbetter 2 giorni fa
parent
commit
95004388ac
1 ha cambiato i file con 6 aggiunte e 0 eliminazioni
  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))