项目作者: papagorgio23

项目描述 :
R Package for Sports betting
高级语言: R
项目地址: git://github.com/papagorgio23/bettoR.git
创建时间: 2020-07-12T04:06:51Z
项目社区:https://github.com/papagorgio23/bettoR

开源协议:Other

下载


bettoR

" class="reference-link">

GitHub release (latest by
date)
R-CMD-check
Lifecycle:
experimental
Twitter
Follow

Tools for Sports Betting

This package contains tools and functions to help sports bettors make
more money!

Installation

You can install bettoR from
GitHub with:

  1. # install.packages("devtools")
  2. devtools::install_github("papagorgio23/bettoR")

Examples

Implied Probability

Implied probabilities, or break-even win percentage, can easily be found
with this function. Here is an example with given odds of -350 (US
Odds), 180 (US Odds), 2.5 (Decimal Odds), 4.9 (Decimal Odds), 6-1
(Fractional Odds), 2/7 (Fractional Odds).

  1. implied_prob(-350, type = "us")
  1. ## [1] 0.7777778
  1. implied_prob(180, type = "us")
  1. ## [1] 0.3571429
  1. implied_prob(2.5, type = "dec")
  1. ## [1] 0.4
  1. implied_prob(4.9, type = "dec")
  1. ## [1] 0.2040816
  1. implied_prob(6/1, type = "frac")
  1. ## [1] 0.1428571
  1. implied_prob(2/7, type = "frac")
  1. ## [1] 0.7777778

Odds from Probabilities

Let’s say you believe a bet has a 75% chance to cover, what would the
price be? Using the implied odds function can give you the price based
on your probability.

  1. implied_odds(0.75, type = "us")
  1. ## [1] -300
  1. implied_odds(0.75, type = "frac")
  1. ## [1] 1/3
  1. implied_odds(0.75, type = "dec")
  1. ## [1] 1.333333
  1. implied_odds(0.75, type = "all")
  1. ## Decimal American Fraction Implied.Probability
  2. ## 1 1.333333 -300 1/3 0.75

Converting Odds

Let’s say you want to convert the American Odds you see on the screen
(-175) to another type.

  1. convert_odds(-175)
  1. ## Decimal American Fraction Implied_Probability
  2. ## 1 1.571429 -175 4/7 0.6363636

Calculate Sportsbook’s hold

Betting into a market is difficult enough as is but some sportsbooks
skew the odds even more in their favor. (-110, -110) is the industry
standard. The hold, or vig/juice, for this bet can be found like this:

  1. hold_calc(-110, -110)
  1. ## [1] 0.04545455

Some sportsbooks in newly legalized states are taking advantage of
bettors with lines (-125, -125)

  1. hold_calc(-125, -125)
  1. ## [1] 0.1

The increase in juice for this is:

  1. (hold_calc(-125, -125) - hold_calc(-110, -110)) / hold_calc(-110, -110)
  1. ## [1] 1.2

120% increase in price.

Special Thanks