Git Product home page Git Product logo

bettor's Introduction

bettoR

GitHub release (latest by date) R build status Travis build status

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:

# install.packages("devtools")
devtools::install_github("a-i-sports/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).

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

implied_odds(0.75, type = "us")
## [1] -300
implied_odds(0.75, type = "frac")
## [1] 1/3
implied_odds(0.75, type = "dec")
## [1] 1.333333
implied_odds(0.75, type = "all")
##   Decimal American Fraction Implied.Probability
## 1  1.3333     -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.

convert_odds(-175)
##   Decimal American Fraction Implied_Probability
## 1  1.5714     -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:

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

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

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

The increase in juice for this is:

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

120% increase in price.

Special Thanks

bettor's People

Contributors

papagorgio23 avatar jimtheflash avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.