Count Data
A tale of Poisson and predicting football results
© V. Gayle
Professor Vernon Gayle [email protected]
@Profbigvern https://github.com/vernongayle
Count Data
• How many times did you go to the cinema last year?
• How many people has your best friend slept with?
• How many goals have your favourite football team scored this season?
https://en.wikipedia.org/wiki/Sim%C3%A9on_Denis_Poisson
Home Team Away Team
Clyde v Berwick
Cowdenbeath v Annan Athletic
Montrose v Elgin City
Peterhead v Edinburgh City
Stirling Albion v Stenhousemuir
Predictions
Home Team Away Team
Clyde v Berwick
Cowdenbeath v Annan Athletic
Montrose v Elgin City
Peterhead v Edinburgh City
Stirling Albion v Stenhousemuir
Predictions
Fan
(i)
Home Team Away Team
Clyde v Berwick (2-1)
Cowdenbeath v Annan Athletic (0-0)
Montrose v Elgin City (2-0)
Peterhead v Edinburgh City (3-0)
Stirling Albion v Stenhousemuir (2-2)
Predictions
Fan Dice
(i) (ii)
Home Team Away Team
Clyde v Berwick (2-1) (2-2)
Cowdenbeath v Annan Athletic (0-0) (5-3)
Montrose v Elgin City (2-0) (1-4)
Peterhead v Edinburgh City (3-0) (3-1)
Stirling Albion v Stenhousemuir (2-2) (6-5)
Goals Goals
Team Played Won Drawn Lost For Against Points
Montrose 35 23 7 5 59 34 76
Peterhead 35 23 4 8 77 38 73
Stirling Albion 35 16 6 13 60 51 54
Stenhousemuir 35 15 8 12 55 46 53
Clyde 35 14 9 12 51 48 51
Elgin City 35 14 6 15 53 60 48
Annan Athletic 35 11 11 13 47 41 44
Berwick 35 8 10 17 29 58 34
Edinburgh City 35 7 9 19 36 60 30
Cowdenbeath 35 4 10 21 23 54 22
Goals Goals
Team Played Won Drawn Lost For Against Points
Montrose 35 23 7 5 59 34 76
Peterhead 35 23 4 8 77 38 73
Stirling Albion 35 16 6 13 60 51 54
Stenhousemuir 35 15 8 12 55 46 53
Clyde 35 14 9 12 51 48 51
Elgin City 35 14 6 15 53 60 48
Annan Athletic 35 11 11 13 47 41 44
Berwick 35 8 10 17 29 58 34
Edinburgh City 35 7 9 19 36 60 30
Cowdenbeath 35 4 10 21 23 54 22
Goals Goals
Team Played Won Drawn Lost For Against Points
Montrose 35 23 7 5 59 34 76
Peterhead 35 23 4 8 77 38 73
Stirling Albion 35 16 6 13 60 51 54
Stenhousemuir 35 15 8 12 55 46 53
Clyde 35 14 9 12 51 48 51
Elgin City 35 14 6 15 53 60 48
Annan Athletic 35 11 11 13 47 41 44
Berwick 35 8 10 17 29 58 34
Edinburgh City 35 7 9 19 36 60 30
Cowdenbeath 35 4 10 21 23 54 22
Attack Strength –
how good is the team at scoring goals
Goals Goals
Team Played Won Drawn Lost For Against Points
Montrose 35 23 7 5 59 34 76
Peterhead 35 23 4 8 77 38 73
Stirling Albion 35 16 6 13 60 51 54
Stenhousemuir 35 15 8 12 55 46 53
Clyde 35 14 9 12 51 48 51
Elgin City 35 14 6 15 53 60 48
Annan Athletic 35 11 11 13 47 41 44
Berwick 35 8 10 17 29 58 34
Edinburgh City 35 7 9 19 36 60 30
Cowdenbeath 35 4 10 21 23 54 22
The average number of
goals scored by each team
in the league is 49
(i.e. the 10 teams have scored 490 goals in total)
Goals Goals
Team Played Won Drawn Lost For Against Points
Montrose 35 23 7 5 59 34 76
Peterhead 35 23 4 8 77 38 73
Stirling Albion 35 16 6 13 60 51 54
Stenhousemuir 35 15 8 12 55 46 53
Clyde 35 14 9 12 51 48 51
Elgin City 35 14 6 15 53 60 48
Annan Athletic 35 11 11 13 47 41 44
Berwick 35 8 10 17 29 58 34
Edinburgh City 35 7 9 19 36 60 30
Cowdenbeath 35 4 10 21 23 54 22
Attack Strength –
how good is the team at scoring goals
Stirling Albion 60/49 = 1.22
Stenhousemuir 55/49 = 1.12
Defensive Weakness –
how bad is the team is at defending
(measured by conceding goals)
The average number of
goals conceded by each
team in the league is 49
(i.e. the 10 teams have conceded 490 goals in total)
Defensive Weakness –
how bad is the team is at defending
(measured by conceding goals)
Stirling Albion 51/49 = 1.04
Stenhousemuir 46/49 = 0.94
Two more measures…
Home Average –
The average number of goals home teams score
Away Average –
The average number of goals away teams score
Goals For Games Goals For Games
Team Points Home Played Home Away Played Away
Montrose 76 30 17 29 18
Peterhead 73 35 17 42 18
Stirling Albion 54 29 17 31 18
Stenhousemuir 53 32 18 23 17
Clyde 51 22 17 29 17
Elgin City 48 31 18 22 17
Annan Athletic 44 24 18 23 17
Berwick 34 21 18 8 17
Edinburgh City 30 19 18 17 18
Cowdenbeath 22 12 17 11 18
Totals 255 175 235 175
Home Average –
The average number of goals home teams
score
The average number of goals that home teams score
in a league game is 1.46 (255/175)
Goals For Games Goals For Games
Team Points Home Played Home Away Played Away
Montrose 76 30 17 29 18
Peterhead 73 35 17 42 18
Stirling Albion 54 29 17 31 18
Stenhousemuir 53 32 18 23 17
Clyde 51 22 17 29 17
Elgin City 48 31 18 22 17
Annan Athletic 44 24 18 23 17
Berwick 34 21 18 8 17
Edinburgh City 30 19 18 17 18
Cowdenbeath 22 12 17 11 18
Totals 255 175 235 175
Away Average –
The average number of goals away teams
score
The average number of goals that away teams
score in a league game is 1.34 (235/175)
Expect Goals
Stirling Albion v Stenhousemuir
Home Team
Average Goals Attack Defensive Expected Goals
per match home Strength Weakness
1.46 1.22 0.94 1.67
Away Team
Average Goals Attack Defensive Expected Goals
per match away Strength Weakness
1.34 1.12 1.04 1.56
Expected Goals
Average Goals Attack Defensive Expected Goals
per match home Strength Weakness
1.46 1.22 0.94 1.67
Average Goals Attack Defensive Expected Goals
per match away Strength Weakness
1.34 1.12 1.04 1.56
The Poisson Distribution
&
Expected Goals
https://fluffypool.wordpress.com/tag/poisson-distribution/
Pr = e -l (l k / k!)
Pr = e -l (l k / k!)
l is the expected number of goals
e = 2.71828
(this Euler’s number which is a mathematical constant)
Pr = e -l (l k / k!)
k is the number of events
(in this example 0 through to 6 goals)
k! is k factorial
Pr = e -l (l k / k!)
Plugging the information for
Stirling Albion into this formula…
For one goal the probability is
Pr = 2.71828 -1.67 (1.671 / (1)) = 0.31
Plugging the information for
Stirling Albion into this formula…
For two goals the probability is
Pr = 2.71828 -1.67 (1.672 / (1 x 2)) = 0.26
Number of Goals Predicted
0 1 2 3 4 5 6
Stirling Albion 0.19 0.31 0.26 0.15 0.06 0.02 0.01
Number of Goals Predicted
0 1 2 3 4 5 6
Stirling Albion 0.19 0.31 0.26 0.15 0.06 0.02 0.01
Stenhousemuir 0.21 0.33 0.26 0.13 0.05 0.02 0.00
Number of Goals Predicted
0 1 2 3 4 5 6
Stirling Albion 0.19 0.31 0.26 0.15 0.06 0.02 0.01
Stenhousemuir 0.21 0.33 0.26 0.13 0.05 0.02 0.00
Predictions
Statistical
Fan Dice Method
(i) (ii) (iii)
Home Team Away Team
Clyde v Berwick (2-1) (2-2)
Cowdenbeath v Annan Athletic (0-0) (5-3)
Montrose v Elgin City (2-0) (1-4)
Peterhead v Edinburgh City (3-0) (3-1)
Stirling Albion v Stenhousemuir (2-2) (6-5) (1-1)
Predictions
Statistical
Fan Dice Method
(i) (ii) (iii)
Home Team Away Team
Clyde v Berwick (2-1) (2-2) (1-0)
Cowdenbeath v Annan Athletic (0-0) (5-3)
Montrose v Elgin City (2-0) (1-4)
Peterhead v Edinburgh City (3-0) (3-1)
Stirling Albion v Stenhousemuir (2-2) (6-5) (1-1)
Predictions
Statistical
Fan Dice Method
(i) (ii) (iii)
Home Team Away Team
Clyde v Berwick (2-1) (2-2) (1-0)
Cowdenbeath v Annan Athletic (0-0) (5-3) (0-1)
Montrose v Elgin City (2-0) (1-4)
Peterhead v Edinburgh City (3-0) (3-1)
Stirling Albion v Stenhousemuir (2-2) (6-5) (1-1)
Predictions
Statistical
Fan Dice Method
(i) (ii) (iii)
Home Team Away Team
Clyde v Berwick (2-1) (2-2) (1-0)
Cowdenbeath v Annan Athletic (0-0) (5-3) (0-1)
Montrose v Elgin City (2-0) (1-4) (2-1)
Peterhead v Edinburgh City (3-0) (3-1)
Stirling Albion v Stenhousemuir (2-2) (6-5) (1-1)
Predictions
Statistical
Fan Dice Method
(i) (ii) (iii)
Home Team Away Team
Clyde v Berwick (2-1) (2-2) (1-0)
Cowdenbeath v Annan Athletic (0-0) (5-3) (0-1)
Montrose v Elgin City (2-0) (1-4) (2-1)
Peterhead v Edinburgh City (3-0) (3-1) (2-0)
Stirling Albion v Stenhousemuir (2-2) (6-5) (1-1)
Predictions
Statistical
Fan Dice Method
(i) (ii) (iii)
Home Team Away Team
Clyde v Berwick (2-1) (2-2) (1-0)
Cowdenbeath v Annan Athletic (0-0) (5-3) (0-1)
Montrose v Elgin City (2-0) (1-4) (2-1)
Peterhead v Edinburgh City (3-0) (3-1) (2-0)
Stirling Albion v Stenhousemuir (2-2) (6-5) (1-1)
More Complex Models
• Emphasis on recent results
• Different home advantage than the league average
• The composition of individual teams (e.g. new players; injuries etc.)
• Weather
• State of the pitch
• Expert knowledge
Predictions
Statistical
Fan Dice Method Result
(i) (ii) (iii) (iv)
Home Team Away Team
Clyde v Berwick (2-1) (2-2) (1-0)
Cowdenbeath v Annan Athletic (0-0) (5-3) (0-1)
Montrose v Elgin City (2-0) (1-4) (2-1)
Peterhead v Edinburgh City (3-0) (3-1) (2-0)
Stirling Albion v Stenhousemuir (2-2) (6-5) (1-1)
Predictions
Statistical
Fan Dice Method Result
(i) (ii) (iii) (iv)
Home Team Away Team
Clyde v Berwick (2-1) (2-2) (1-0) (1-2)
Cowdenbeath v Annan Athletic (0-0) (5-3) (0-1)
Montrose v Elgin City (2-0) (1-4) (2-1)
Peterhead v Edinburgh City (3-0) (3-1) (2-0)
Stirling Albion v Stenhousemuir (2-2) (6-5) (1-1)
Predictions
Statistical
Fan Dice Method Result
(i) (ii) (iii) (iv)
Home Team Away Team
Clyde v Berwick (2-1) (2-2) (1-0) (1-2)
Cowdenbeath v Annan Athletic (0-0) (5-3) (0-1) (0-2)
Montrose v Elgin City (2-0) (1-4) (2-1)
Peterhead v Edinburgh City (3-0) (3-1) (2-0)
Stirling Albion v Stenhousemuir (2-2) (6-5) (1-1)
Predictions
Statistical
Fan Dice Method Result
(i) (ii) (iii) (iv)
Home Team Away Team
Clyde v Berwick (2-1) (2-2) (1-0) (1-2)
Cowdenbeath v Annan Athletic (0-0) (5-3) (0-1) (0-2)
Montrose v Elgin City (2-0) (1-4) (2-1) (1-1)
Peterhead v Edinburgh City (3-0) (3-1) (2-0)
Stirling Albion v Stenhousemuir (2-2) (6-5) (1-1)
Predictions
Statistical
Fan Dice Method Result
(i) (ii) (iii) (iv)
Home Team Away Team
Clyde v Berwick (2-1) (2-2) (1-0) (1-2)
Cowdenbeath v Annan Athletic (0-0) (5-3) (0-1) (0-2)
Montrose v Elgin City (2-0) (1-4) (2-1) (1-1)
Peterhead v Edinburgh City (3-0) (3-1) (2-0) (2-1)
Stirling Albion v Stenhousemuir (2-2) (6-5) (1-1)
Predictions
Statistical
Fan Dice Method Result
(i) (ii) (iii) (iv)
Home Team Away Team
Clyde v Berwick (2-1) (2-2) (1-0) (1-2)
Cowdenbeath v Annan Athletic (0-0) (5-3) (0-1) (0-2)
Montrose v Elgin City (2-0) (1-4) (2-1) (1-1)
Peterhead v Edinburgh City (3-0) (3-1) (2-0) (2-1)
Stirling Albion v Stenhousemuir (2-2) (6-5) (1-1) (1-1)
The Outcomes
Stats method 1 / 5 correct scores 3 / 5 correct results
Fan 0 / 5 correct scores 2 / 5 correct results
Dice 0 / 5 correct scores 1 / 5 correct results
We do not advocate
using these methods for gambling
• Simple Poisson models only a few terms
(i.e. home advantage x attack strength x defensive weakness)
• But we could extend these models as I have noted above
• You may have also thought about some additional measures!
0 1 2 3 4 5 6
0
1
2
3
4
5
6
Analysing
Social Science Data
Left Hand Side = Right Hand Side + Error
Yi = b0+b1X1i +…+ bkXki + ei
https://stats.idre.ucla.edu/other/dae/
How to cite this video
Gayle, V. (2020) Count Data - A tale of Poisson and predicting football results.
Available at: https://www.ncrm.ac.uk (Accessed: day month year)
Count Data
A tale of Poisson and predicting football results
Professor Vernon Gayle
[email protected] @Profbigvern
https://github.com/vernongayle
© V. Gayle