This function will calculate the edge of a given bet based on your predicted win probability of the bet and the bet's odds.
Usage
edge_calc(win_prob, odds, type = "us")
Arguments
- win_prob
Your predicted probability for winning the bet (0-1)
- odds
The odds for the given bet
- type
Type of odds. Possible values are:
us
, American Odds
dec
, Decimal Odds
frac
, Fractional Odds
Value
edge The edge that you have for the given bet.
Examples
edge_calc(0.75, -175, type = "us")
#> [1] 0.1136364
edge_calc(0.75, 1.2855, type = "dec")
#> [1] -0.02790743
edge_calc(0.75, 3/7, type = "frac")
#> [1] 0.05
edge_calc(
win_prob = c(0.6, 0.7, 0.52, 0.6),
odds = c(-110, -150, 140, 150),
type = "us"
)
#> [1] 0.07619048 0.10000000 0.10333333 0.20000000