forked from papagorgio23/bettoR
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME.Rmd
139 lines (86 loc) · 3.58 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
---
title: "*bettoR*"
output: github_document
---
# <img src="man/figures/bettoR.png" width = "150" align="right" />
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
library(bettoR)
library(knitr)
```
<!-- badges: start -->
![GitHub release (latest by date)](https://img.shields.io/github/v/release/papagorgio23/bettoR)
[![R build status](https://github.com/papagorgio23/bettoR/workflows/R-CMD-check/badge.svg)](https://github.com/papagorgio23/bettoR/actions)
[![Travis build status](https://travis-ci.com/papagorgio23/bettoR.svg?branch=master)](https://travis-ci.com/github/papagorgio23/bettoR)
<!--[![Coverage Status](https://img.shields.io/coveralls/github/papagorgio23/bettoR)](https://img.shields.io/coveralls/github/papagorgio23/bettoR)
https://img.shields.io/codecov/c/github/papagorgio23/bettoR?style=plastic&token=4dcb468f-32ee-42a9-b610-92f9a6d0c896
[![Coverage Status](https://img.shields.io/codecov/c/github/ellessenne/rsimsum/master.svg)](https://codecov.io/github/ellessenne/rsimsum?branch=master)
[![Coverage Status](https://img.shields.io/codecov/c/github/papagorgio23/bettoR?style=plastic&token=4dcb468f-32ee-42a9-b610-92f9a6d0c896)](https://codecov.io/github/papagorgio23/bettoR?branch=master)-->
[![Lifecycle: experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://www.tidyverse.org/lifecycle/#experimental)
[![Twitter Follow](https://img.shields.io/twitter/follow/theFirmAISports?style=social)](https://twitter.com/theFirmAISports)
<!-- badges: end -->
## Tools for Sports Betting
This package contains tools and functions to help sports bettors make more money!
## Installation
You can install bettoR from [GitHub](https://github.com/a-i-sports/bettoR) with:
```{r installs, eval=FALSE}
# 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).
```{r}
implied_prob(-350, type = "us")
```
```{r}
implied_prob(180, type = "us")
```
```{r}
implied_prob(2.5, type = "dec")
```
```{r}
implied_prob(4.9, type = "dec")
```
```{r}
implied_prob(6/1, type = "frac")
```
```{r}
implied_prob(2/7, type = "frac")
```
#### 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.
```{r}
implied_odds(0.75, type = "us")
```
```{r}
implied_odds(0.75, type = "frac")
```
```{r}
implied_odds(0.75, type = "dec")
```
```{r}
implied_odds(0.75, type = "all")
```
#### Converting Odds
Let's say you want to convert the American Odds you see on the screen (-175) to another type.
```{r}
convert_odds(-175)
```
#### 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:
```{r}
hold_calc(-110, -110)
```
Some sportsbooks in newly legalized states are taking advantage of bettors with lines (-125, -125)
```{r}
hold_calc(-125, -125)
```
The increase in juice for this is:
```{r}
(hold_calc(-125, -125) - hold_calc(-110, -110)) / hold_calc(-110, -110)
```
133% increase in price.
## Special Thanks
* To the entire [A.I. Sports](https://aisportsfirm.com/home/our-team/) team!