Beet the Bookies

Beet the Bookies

Have you ever taken a punt on the footy? Have you ever made much money from it?

Here in Australia it is believed about 38% of people gamble on a weekly basis. See a great breakdown of some the research here

As with most sports way more bet on Australian Rules Football than actually playing it here in Australia.

And whilst I’ve been living here I found ignoring the bookkeepers pretty much impossible

Coming from the UK I was used to having several betting shops on every high street.

You could usually walk past them and avoid the urge to make a bet on who would win this weekend’s game.

Here and now in Australia though, most of my mates have several betting shops in their pocket, by which I mean they have mulitple betting shop apps on their phone (maybe this may well be true back in the UK now too).

It can be hard to walk past push notifications encouraging you to go for it.

While gambling on horse racing is actually more common. That “sport” is just a heinous display of man’s disregard for the welfare of other creatures, so I’ve never got into it.

AFL however is far more engaging, and instead revels in man’s disregard for the welfare of other men.

It is extremely athletic with players regularly running the equivalent of half-marathons during games.

It combines energising periods of seemingly endless battles and scrapes with heart stopping moments of nerve wracking tension.

So I’d be lying to say I hadn’t started to enjoy the game, and eventually put the odd bet or two on.

But even when I’ve been right I’ve ever made much profit. Often the games you have a prediction for the odds just don’t seem worth it.

I think this is because despite being a fairly new sport, it is actually a fairly predictable one.

One factor in this is that the scoring system gives 6 points for a goal and 1 a behind ( just missing or not scoring a clean goal) ensuring ties/draws are extremely rare.

Barring famous examples like the 2010 Grand Final, draws are uncommon.

Another factor might be several teams have had patch where they are terrible for years. To fans of these teams I’m sorry but for most of the 2010’s you could bet against Carlton, St Kilda and Melbourne and the 2 new expansion teams Gold Coast and GWS and be pretty confident they’d lose.

Because the league doesn’t have relegation like the European football leagues, you also know that the team at the bottom will be back next year.

And while they get support in terms of draft picks, it can take years for this to have an impact that helps turn the teams fortunes.

For these reasons and others you can adopt fairly obvious rules of thumb when trying to guess who will win a game and have a fairly good chance of being correct.

Simply looking which teams are playing, where they’re playing and most importantly the odds given to the teams can give you predictions that are right 70-80% of the time.

But the bookmakers know this and even being able to call the results of games correctly 80+% of the time is sometimes not enough to make money on head-to-head bets on AFL games.

They have priced all the likelihoods into their starting odds and then adjust these constantly to ensure there is always a margin for them to take home.

Beet the bookies is an online tool I started working on to help me demonstrate this.

Please know I’m not particularly knowledgeable in maths, statistics or probabilities, so I welcome any feedback around how the results are interpreted.

The ultimate goal to dissuade people from gambling by highlighting in the long term the bookmakers set the odds to ensure the house always wins.

It allows you to set a few details about the game, the teams, the location and the odds. Then you set the amount you would wager and then calculates the return or more likely loss you would stand to make.

Find give it a try here: Beet the bookies


How it’s made Link to heading

Why I started looking into this side project Link to heading

I decided to make Beet the Bookies in part due to my growing obsession with AFL and especially how predictive the odds betting companies set out for games were of results.

This was around 2018, and I’d recently started my first year of “Footy tipping”, this is where you go to the pub and get a free beer for predicting the winner of this weeks AFL games. I was looking for an easy way for me, someone who new bugger all about AFL, to put in a decent showing while I drank my beer. So I started to explore more around predicting AFL games and ended up exploring the odds bookmakers gave. ( I actually ended up coming joint second in the tipping that year, in a pub that is extremely close to the MCG inhabited by footy fanatics however all but 1 of them did worse than me, simply picking the favourite in every game.)

One other big motivation was for me to have a side project that would allow me to explore several technologies I was interested in but not able to work with in my role at the time.

Some considerations about what technologies to use Link to heading

At the time I was working in an organisation that used Google Cloud, I’d used lots of the different tools in that platform. But I knew that AWS was more widely adopted and I wanted to see what it was like. I wanted to first-hand see what its differences, strengths and weaknesses were. I was also predominantly working on an server-side application that actually didn’t have any real data storage, no database or nothing. So I decided I wanted to try out

  • Lambda functions, because:
    • I wanted to gain some exposure to the serverless approach.
    • I knew they required very little overhead. I wouldn’t need to manage the infrastructure, just write the code and this could be iterated on quickly.
    • They have a “pay as you go” cost model. While basic server costs are low, I knew I was probably going to be the only one using the tool, so they were likely to be idle the vast majority of the time.
  • DynamoDB because:
    • I wanted to gain experience with NoSQL databases as use of these for web applications was growing.
    • I knew I would need to work with a dataset of historic information, likely to be “semi-structured” but I didn’t want to have to change my table schemas all the time as I was developing as I might with an SQL DB.
    • I hoped that the low latency of the DynamoDB would help provide good response times for retrieving data.

I also knew that simply building an API wasn’t likely to encourage others to use it. (I didn’t think a basic probably not super accurate API for predicing AFL games was likely to go viral on HackerNews) I wanted to build some UI interface to show I’m “Full Stack” or “T-Shaped” or what ever the term is currently. So I wanted to make a basic UI with some sort of cross platform framework like:

  • React/ React Native
  • Flutter

Note: This page is still under construction, more to come soon.