Poisson Prediction
P(k) = (lambda^k) * (e ^ -lambda) / k!
Where P(k) mean the Probability of k goals, Lambda is the average goals per game. e is eulers constant (this is a known constant), k! is k factorial (eg 3! = 3*2*1=6). It's just mathematical notation.
So we have quite a simple way of calculating the probability that a team will score 1 goal in a game, or 2 or 3. And we can calculate likewise for their opponent. We are then calculating the probabilities of football results! The only parameter of the equation that we don't know is lambda. However we can estimate this based on the average goals per match by a team.
First to test the formula we can look at the number of goals each team scored in all games in the 2013/14 season. I am using the usual data that I have collected on the English, Spanish, German, Italian, Turkish, Scottish, Dutch, Belgian, Greek and Portuguese top divisions. Total number of matches used is 4232, so this should be a fine sample space - enough to give a good long run average.
home goals (h) | away goals (a) | outcome | lambda (home) | lambda (away) | Probability of h home goals | Probability of a away goals | P(h) * P(a) | Sum |
0 | 0 | Draw | 1.860 | 1.018 | 0.156 | 0.361 | 0.056 |
0.225
|
1 | 1 | Draw | 1.860 | 1.018 | 0.289 | 0.368 | 0.106 | |
2 | 2 | Draw | 1.860 | 1.018 | 0.269 | 0.187 | 0.050 | |
3 | 3 | Draw | 1.860 | 1.018 | 0.167 | 0.063 | 0.011 | |
4 | 4 | Draw | 1.860 | 1.018 | 0.078 | 0.016 | 0.001 | |
5 | 5 | Draw | 1.860 | 1.018 | 0.029 | 0.003 | 0.000 | |
6 | 6 | Draw | 1.860 | 1.018 | 0.009 | 0.001 | 0.000 | |
7 | 7 | Draw | 1.860 | 1.018 | 0.002 | 0.000 | 0.000 | |
1 | 0 | Man Utd | 1.860 | 1.018 | 0.289 | 0.361 | 0.105 |
0.570
|
2 | 0 | Man Utd | 1.860 | 1.018 | 0.269 | 0.361 | 0.097 | |
2 | 1 | Man Utd | 1.860 | 1.018 | 0.269 | 0.368 | 0.099 | |
3 | 0 | Man Utd | 1.860 | 1.018 | 0.167 | 0.361 | 0.060 | |
3 | 1 | Man Utd | 1.860 | 1.018 | 0.167 | 0.368 | 0.061 | |
4 | 0 | Man Utd | 1.860 | 1.018 | 0.078 | 0.361 | 0.028 | |
3 | 2 | Man Utd | 1.860 | 1.018 | 0.167 | 0.187 | 0.031 | |
4 | 1 | Man Utd | 1.860 | 1.018 | 0.078 | 0.368 | 0.029 | |
5 | 0 | Man Utd | 1.860 | 1.018 | 0.029 | 0.361 | 0.010 | |
4 | 2 | Man Utd | 1.860 | 1.018 | 0.078 | 0.187 | 0.015 | |
5 | 1 | Man Utd | 1.860 | 1.018 | 0.029 | 0.368 | 0.011 | |
6 | 0 | Man Utd | 1.860 | 1.018 | 0.009 | 0.361 | 0.003 | |
4 | 3 | Man Utd | 1.860 | 1.018 | 0.078 | 0.063 | 0.005 | |
5 | 2 | Man Utd | 1.860 | 1.018 | 0.029 | 0.187 | 0.005 | |
6 | 1 | Man Utd | 1.860 | 1.018 | 0.009 | 0.368 | 0.003 | |
7 | 0 | Man Utd | 1.860 | 1.018 | 0.002 | 0.361 | 0.001 | |
5 | 3 | Man Utd | 1.860 | 1.018 | 0.029 | 0.063 | 0.002 | |
6 | 2 | Man Utd | 1.860 | 1.018 | 0.009 | 0.187 | 0.002 | |
7 | 1 | Man Utd | 1.860 | 1.018 | 0.002 | 0.368 | 0.001 | |
5 | 4 | Man Utd | 1.860 | 1.018 | 0.029 | 0.016 | 0.000 | |
6 | 3 | Man Utd | 1.860 | 1.018 | 0.009 | 0.063 | 0.001 | |
7 | 2 | Man Utd | 1.860 | 1.018 | 0.002 | 0.187 | 0.000 | |
6 | 4 | Man Utd | 1.860 | 1.018 | 0.009 | 0.016 | 0.000 | |
7 | 3 | Man Utd | 1.860 | 1.018 | 0.002 | 0.063 | 0.000 | |
6 | 5 | Man Utd | 1.860 | 1.018 | 0.009 | 0.003 | 0.000 | |
7 | 4 | Man Utd | 1.860 | 1.018 | 0.002 | 0.016 | 0.000 | |
7 | 5 | Man Utd | 1.860 | 1.018 | 0.002 | 0.003 | 0.000 | |
7 | 6 | Man Utd | 1.860 | 1.018 | 0.002 | 0.001 | 0.000 | |
0 | 1 | Swansea | 1.860 | 1.018 | 0.156 | 0.368 | 0.057 |
0.204
|
0 | 2 | Swansea | 1.860 | 1.018 | 0.156 | 0.187 | 0.029 | |
0 | 3 | Swansea | 1.860 | 1.018 | 0.156 | 0.063 | 0.010 | |
1 | 2 | Swansea | 1.860 | 1.018 | 0.289 | 0.187 | 0.054 | |
0 | 4 | Swansea | 1.860 | 1.018 | 0.156 | 0.016 | 0.003 | |
1 | 3 | Swansea | 1.860 | 1.018 | 0.289 | 0.063 | 0.018 | |
0 | 5 | Swansea | 1.860 | 1.018 | 0.156 | 0.003 | 0.001 | |
1 | 4 | Swansea | 1.860 | 1.018 | 0.289 | 0.016 | 0.005 | |
2 | 3 | Swansea | 1.860 | 1.018 | 0.269 | 0.063 | 0.017 | |
0 | 6 | Swansea | 1.860 | 1.018 | 0.156 | 0.001 | 0.000 | |
1 | 5 | Swansea | 1.860 | 1.018 | 0.289 | 0.003 | 0.001 | |
2 | 4 | Swansea | 1.860 | 1.018 | 0.269 | 0.016 | 0.004 | |
0 | 7 | Swansea | 1.860 | 1.018 | 0.156 | 0.000 | 0.000 | |
1 | 6 | Swansea | 1.860 | 1.018 | 0.289 | 0.001 | 0.000 | |
2 | 5 | Swansea | 1.860 | 1.018 | 0.269 | 0.003 | 0.001 | |
3 | 4 | Swansea | 1.860 | 1.018 | 0.167 | 0.016 | 0.003 | |
1 | 7 | Swansea | 1.860 | 1.018 | 0.289 | 0.000 | 0.000 | |
2 | 6 | Swansea | 1.860 | 1.018 | 0.269 | 0.001 | 0.000 | |
3 | 5 | Swansea | 1.860 | 1.018 | 0.167 | 0.003 | 0.001 | |
2 | 7 | Swansea | 1.860 | 1.018 | 0.269 | 0.000 | 0.000 | |
3 | 6 | Swansea | 1.860 | 1.018 | 0.167 | 0.001 | 0.000 | |
4 | 5 | Swansea | 1.860 | 1.018 | 0.078 | 0.003 | 0.000 | |
3 | 7 | Swansea | 1.860 | 1.018 | 0.167 | 0.000 | 0.000 | |
4 | 6 | Swansea | 1.860 | 1.018 | 0.078 | 0.001 | 0.000 | |
4 | 7 | Swansea | 1.860 | 1.018 | 0.078 | 0.000 | 0.000 | |
5 | 6 | Swansea | 1.860 | 1.018 | 0.029 | 0.001 | 0.000 | |
5 | 7 | Swansea | 1.860 | 1.018 | 0.029 | 0.000 | 0.000 | |
6 | 7 | Swansea | 1.860 | 1.018 | 0.009 | 0.000 | 0.000 |
I am giving up the day job tomorrow
ReplyDelete