Betting Odds Conversion

Conversion between the most common odds types for sports betting. Hong Kong odds, US odds, Decimal odds, Indonesian odds, Malaysian odds, and raw Probability are covered in this package.

This package includes functions to transform sports betting odds from one format into another.

These betting odds formats are covered in odds.converter at the moment

• US Odds (shortform us)
• Decimal Odds (shortform dec)
• Probability (shortform prob)
• Honk Kong Odds (shortform hk)
• Malaysian Odds (shortform malay)
• Indonesian Odds (shortform indo)

Fractional Odds commonly used by bookmakers in the U.K. are not included as the transformation of these Odds is not very well defined and Fractional Odds are not used outside of the U.K and have been largely replaced by Decimal Odds.

Usage

Transform specific odds into specific odds

The package contains functions to transform one specific odds type into another specific odds type. These functions are called:

odds.Shortform2Shortform

For example

Transform specific odds into all other odds format

To transform a specific odds type into all other odds type use the functions that are called odds.Shortform2all

For example

Calculating the implied probability (fair value) of betting odds

Bookmakers will include a margin to their betting odds that will increase the total probability of the offered odds above 100%. If a bookmaker would offer a coin flip instead of offering 50% for heads and 50% for tails the bookmaker would have 51% for heads and 51% for tails for example thus guaranteeing that they would make a small profit for every wager on the coin flip.

To calculate the margin that bookmaker offers convert the odds into probability and sum them.

Betting Odds:

Manchester United Decimal Odds 1.3 Arsenal Decimal Odds 9.0 Draw Decimal Odds 4.0

The build margin is slightly over 13%

To calculate the real implied probability use the function odds.fv()

Example: Calculate the implied probability of the above match without margin added

Example: Calculate the implied probability of the above match without margin added

Example: Calculate the implied probability of a data.frame containing Home and Away odds

It is also possible to submit vectors as input to calculate the implied Probability

Example: Calculate the implied probablity of home and away lines with dplyr

As rowwise() slows down the calculation and the calculation of fair values for Home and Away odds is a common use case odds.fv() has an option (Vectorized2wayOutput1stElement = TRUE), which can speed up the computation significantly for this specific use case.

Calculate Parlays

To calculate the fair price for a parlay input the betting odds of each of the parlay legs and use odds.parlay()

odds.converter v1.4.8 (Release date: 2018-05-28)

Changes:

• Refactored odds.fv and added odds.vig to calculate the overround directly. Thanks to bkmontgom for the pull request!

odds.converter v1.4.7 (Release date: 2018-05-01)

Changes:

• Replaced ifelse to speed up the code execution. Thanks to bkmontgom for the pull request!

odds.converter v1.4.6 (Release date: 2017-6-23)

Changes:

• Reintroduced Vectorized2wayOutput1stElement to odds.fv()

odds.converter v1.4.5 (Release date: 2017-6-23)

Changes:

• Updated documentation
• reverted the changed introduced in 1.4

odds.converter v1.4 (Release date: 2017-1-11)

Changes:

• Added Vectorized2wayOutput1stElement to odds.fv to speed up the calculation in dplyr chains

odds.converter v1.4 (Release date: 2016-3-1)

Changes:

• Added odds.parlay to convert odds into parlay odds

odds.converter v1.3 (Release date: 2015-10-17)

Changes:

• Added functionality to odds.fv(). It can now handle data.frames as input and vectors

odds.converter v1.2 (Release date: 2015-09-25)

Changes:

• Added odds.dec2all and similar functions to allow the conversion into all odds formats

Reference manual

install.packages("odds.converter")

1.4.8 by Marco Blume, 3 years ago

Browse source code at https://github.com/cran/odds.converter

Authors: Marco Blume , Sascha Thomsen

Documentation:   PDF Manual