Gaining an edge in betting often boils down to intelligent data analysis, but faced with daunting amounts of data it can be hard to know where to start. If this sounds familiar, R – an increasingly popular statistical programming language widely used for data analysis – could be just what you’re looking for.
What is R?
R is a statistical programming language that is used to visualise and analyse data. This may sound a little intimidating but actually it isn’t as scary as it may appear. Its creators – two professors from New Zealand – wanted an intuitive statistical platform that their students could use to slice and dice data and create interesting visual representation like 3D graphs.
Given its relative simplicity but endless scope for applications R has steadily gained momentum amongst the world’s brightest statisticians and data scientists. Pinnacle's Trading Director, Marco Blume, has spoken at length about how R can be used for sports betting modelling. Outside of betting, Facebook have used R for statistical analysis of status updates and many of the complex word clouds you might see online are powered by R.
There are now thousands of user created libraries to enhance R functionality and given how much successful betting boils down to effective data analysis, packages are being created to perform betting related analysis and strategies.
So R is a language – designed to largely be intuitive, mirroring the way people think – which can be used to perform specific data tasks; the tasks are achieved by applying the language through what are known as packages.
R can be used for anything from basic calculations to advanced statistics. Here are examples of both:
The sum of 2 and 2
>2 + 2 = 4
The probability of that a coin tossed 100 times is fair if lands on heads 40 times
>pbinom(40, 100, 0.5) = 0.028
If you've got this far into the article, you are probably interested enough to start experimenting with R, so here is a step-by-step guide:
Step 1 – Download R Console – This is the R language engine.
Step 2 – Download R Studio – This is an interface to run the packages.
Step 3 – Install packages - Packages can be installed from the main repository which is called CRAN.
You can actually miss out step two and install packages straight into the R Console but Studio provides a much richer and user-friendly interface.
Betting analysis with R
There are thousands of data manipulation, statistical models, and charts available free of charge within the CRAN repository, so R could allow you to manipulate player statistics, historical performance and betting data in order to gain that edge you’ve been looking for without having to employ a team of statisticians to do the leg-work.
This opens the door to analysis of betting odds movement, historical performance and player statistics to individuals without expert knowledge of data modeling or statistical analysis.
R packages from Pinnacle
One of things that sets Pinnacle apart from other bookmakers is our willingness to share knowledge and help educate bettors. With this have previously shared two of the first R packages that our R&D Team have developed - simply click on the images below to download the R package.
R for odds conversion & fair markets
This package – odds.converter - provides an elegant solution for a common task – odds conversion. It is a perfect way to get into R if you have no prior knowledge.
It supports all the popular odds types. Hong Kong odds, American odds, Decimal odds, Indonesian odds, Malaysian odds and raw probability are covered in this package. It also has a very useful function for calculating the fair (margin free) odds for a vector of odds.
Package name for installing in R Studio: odds.converter
R for applying betting strategies based on our API odds feed
Package name for installing in R Studio: pinnacle.API
The potential applications R endless
If you are looking to take your betting analysis to the next level, then R is certainly worth looking into. The possibilities are limited only to your imagination, and if you start coming up with profitable betting strategies through our own packages, that isn’t a problem because Winners are Welcome at Pinnacle.