So I’ve been writing for Dictate the Game for nearly a year now and I’ve decided to take what I want to do in the future and apply it to my writing. I’m just about to start University, studying mathematics and I’ve also done some programming in the past. This gives me a nice challenge of trying to combine the two. I recently read the bok “Soccermatics: Mathematical Adventures in the Beautiful Game Pro-Edition” by David Sumpter which looks at how Mathematics interacts with Football and visa-versa.
In the book, David discusses how ‘expected goals’ are used in football, in a press conference last year, the Arsenal manager actually mentioned the term which suggested that a mathematical view of the game is becoming less alien. Also in the latest Football Manager game, you can hire ‘Data Analysts’ who will analyse your matches in a similar way.
One of the chapters of the book looked at predicting football matches, and I tried to create my own formula for predicting matches and the guidelines were as follows:
- Each team was given an ‘attack score’ and ‘defence score’. The attack score was measure by how many goals a team expected to score per 90 minutes based on last years league. So last year Chelsea scored 85 goals in 38 matches, giving them an attack score of 2.236. Defence score was worked out with the same logic but with goals conceded (Chelsea’s defence score was 0.868).
- For the teams who were promoted, I used extrapolation from previous teams and how they had fared in their first season after promotion. This gave me an expected Goals For and Against for the three new teams which meant I could give them scores too.
- When teams played each other, I averaged a teams attack score with the others defence score to estimate how many goals they were likely to score in that match and did the same for both teams.
- I then simulated the match (90 mins, each minute there is an x% chance of scoring) for both teams to create a final score
- Simulate the match thousands of times
- Average the whole thing
The code wasn’t too long, and once I’d written out the main match playing code, the rest just needed new numbers. I managed to get it working before the first game of the season and I plan to use it to predict the entire season, and I’ll share the results of the first week and how I plan to adapt the code.
So here are my results from the first week.
Arsenal 2-1 Leicester (was 4-3)
Watford 2-2 Liverpool (was 3-3)
Chelsea 2-0 Burnley (was 2-3)
Crystal Palace 2-0 Huddersfield (was 0-3)
Everton 2-1 Stoke (was 1-0)
Southampton 2-1 Stoke (was 0-0)
West Brom 1-1 Bournemouth (was 1-0)
Newcastle 1-2 Tottenham (was 0-2)
Man Utd 2-1 West Ham (was 4-0)
Brighton 1-3 Man City (was 0-2)
Notice of the 10 games I got no scores exactly right, but 6 outcomes were correct and a lot of games were ‘very close’. I predicted narrow wins for Arsenal and Everton, and dominant wins for the Manchester teams. Not a bad start, but I’m hoping to improve the code.
Things I’m looking to implement to make the code better:
- Include a home/away advantage for teams, which can often make an impact on games.
- Take into account recent form, both in terms of goal scoring and conceding.
I will be hoping to update you on how my code progresses and how much predictions (hopefully) improve!