Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Predicting Football 
Using R 
Martin Eastwood
£1Billion! 
bet on 2014 World Cup in UK 
According to http://www.theguardian.com/sport/2014/jun/02/cashing-in-world-cup-pr...
70%! 
of all sports betting world wide ! 
is football 
According to http://www.bbc.co.uk/sport/0/football/24354124
Not ! 
everybody ! 
loses to the 
bookmaker
The odds often reflect the! 
market rather than the true! 
probability 
According to http://www.bbc.co.uk/sport/0/football...
Load The Data Into R
Average Goals Scored
Average Goals Conceded
Home Advantage
Goal Distribution
Goal Distribution
Creating The Model 
! 
Xi,j ~ Poisson(ɑiβjƔ)! 
! 
Yi,j ~ Poisson(ɑjβi)
Munge The Data
Fit The Model
Predicting Fixtures
Calculate Probability ! 
Per Goal
Calculate Probability ! 
Of Scores
Win / Loss / Draw
Over / Under
How well does it 
work?
Poor Accuracy For Low Scores
Poisson model assumes 
scores are independent of 
each other! 
! 
Doesn’t account for teams 
motivation - e.g. playing for...
Applying the Dixon & 
Coles Adjustment 
x=y=0: 1-λμρ& 
x=0, y=1: 1+λρ& 
x=1, y=0: 1+μρ& 
x=1, y=1: 1-ρ& 
otherwise: 1
Man City Vs Man Utd 
Man City = 1.88 (53%)& 
Draw = 4.13 (24%)& 
Away = 4.45 (23%)
Conclusions 
Poisson model with the Dixon & Coles 
adjustment is simple yet relatively 
accurate! 
! 
! 
Other parameters,...
Questions?
Predicting Football Using R
Predicting Football Using R
Upcoming SlideShare
Loading in …5
×

Predicting Football Using R

26,091 views

Published on

Presentation I gave to the Manchester R User Group about predicting results of football matches using R

Published in: Data & Analytics
  • Would you mind sharing with us your complete code for the model?
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • Hello! Get Your Professional Job-Winning Resume Here - Check our website! https://vk.cc/818RFv
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • @Rahul Bhat me too. Were you able to resolve this? Thanks.
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • Error in apply(df, 1, function(row) { : dim(X) must have a positive length.....I am getting error when i am doing the same???? why???
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • Its a simple and concise model to describe the Dixon&Coles1996...
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here

Predicting Football Using R

  1. 1. Predicting Football Using R Martin Eastwood
  2. 2. £1Billion! bet on 2014 World Cup in UK According to http://www.theguardian.com/sport/2014/jun/02/cashing-in-world-cup-profit-brazil
  3. 3. 70%! of all sports betting world wide ! is football According to http://www.bbc.co.uk/sport/0/football/24354124
  4. 4. Not ! everybody ! loses to the bookmaker
  5. 5. The odds often reflect the! market rather than the true! probability According to http://www.bbc.co.uk/sport/0/football/24354124
  6. 6. Load The Data Into R
  7. 7. Average Goals Scored
  8. 8. Average Goals Conceded
  9. 9. Home Advantage
  10. 10. Goal Distribution
  11. 11. Goal Distribution
  12. 12. Creating The Model ! Xi,j ~ Poisson(ɑiβjƔ)! ! Yi,j ~ Poisson(ɑjβi)
  13. 13. Munge The Data
  14. 14. Fit The Model
  15. 15. Predicting Fixtures
  16. 16. Calculate Probability ! Per Goal
  17. 17. Calculate Probability ! Of Scores
  18. 18. Win / Loss / Draw
  19. 19. Over / Under
  20. 20. How well does it work?
  21. 21. Poor Accuracy For Low Scores
  22. 22. Poisson model assumes scores are independent of each other! ! Doesn’t account for teams motivation - e.g. playing for a draw
  23. 23. Applying the Dixon & Coles Adjustment x=y=0: 1-λμρ& x=0, y=1: 1+λρ& x=1, y=0: 1+μρ& x=1, y=1: 1-ρ& otherwise: 1
  24. 24. Man City Vs Man Utd Man City = 1.88 (53%)& Draw = 4.13 (24%)& Away = 4.45 (23%)
  25. 25. Conclusions Poisson model with the Dixon & Coles adjustment is simple yet relatively accurate! ! ! Other parameters, such as weather, injuries, can be added to improve accuracy! ! ! Needs combining with an effective staking strategy though
  26. 26. Questions?

×