itsrobli / afl-tipping-poisson

Apparently, a Poisson distribution model is not a bad way to predict sports results where the scoring is not dependent on previous events.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Predictions for 2019 AFL Season

Apparently, a Poisson distribution model is not a bad way to predict sports results where the scoring is not dependent on previous events.

It's more for fun than science as there are various weaknesses of the model even when applied to fairly simple scoring system like in soccer. Aussie rules has a slightly more complex scoring system (Goals = 6 points; Behinds = 1 point) and the game does not restart in the centre of the field after a Behind is scored.

Really an excuse to write some code and to participate in a footy tipping comp without keeping up to date with the AFL.

Stat model results

Feel free to play with the source code (afl_tipping.py) and build upon this toy model.

My predictions for 2019 AFL Season

Round Predicted Winner Home Team Away Team Chance Home Team Wins Chance of Draw Chance Away Team Wins
1 Richmond Carlton Richmond 2.17% 0.45% 97.38%
1 Geelong Collingwood Geelong 16.82% 2.00% 81.19%
1 Melbourne Melbourne Port Adelaide 61.93% 2.84% 35.23%
1 Adelaide Adelaide Hawthorn 93.35% 0.90% 5.75%
1 Sydney Western Bulldogs Sydney 9.24% 1.41% 89.35%
1 West Coast Brisbane West Coast 0.41% 0.10% 99.49%
1 St Kilda St Kilda Gold Coast 98.15% 0.32% 1.53%
1 GWS Giants GWS Giants Essendon 99.77% 0.05% 0.18%
1 North Melbourne Fremantle North Melbourne 12.78% 1.67% 85.55%
2 Richmond Richmond Collingwood 78.36% 2.18% 19.46%
2 Sydney Sydney Adelaide 73.76% 2.41% 23.83%
2 Essendon Essendon St Kilda 63.99% 2.76% 33.25%
2 Port Adelaide Port Adelaide Carlton 99.96% 0.01% 0.03%
2 Geelong Geelong Melbourne 94.98% 0.73% 4.28%
2 West Coast West Coast GWS Giants 56.31% 3.00% 40.69%
2 North Melbourne North Melbourne Brisbane 99.52% 0.09% 0.39%
2 Hawthorn Hawthorn Western Bulldogs 91.59% 1.15% 7.26%
2 Gold Coast Gold Coast Fremantle 52.96% 3.10% 43.94%
3 Adelaide Adelaide Geelong 63.99% 2.75% 33.27%
3 Melbourne Melbourne Essendon 97.93% 0.34% 1.73%
3 Sydney Carlton Sydney 0.10% 0.03% 99.86%
3 GWS Giants GWS Giants Richmond 92.94% 0.98% 6.08%
3 Port Adelaide Brisbane Port Adelaide 0.88% 0.19% 98.93%
3 West Coast Collingwood West Coast 37.01% 2.91% 60.08%
3 Western Bulldogs Western Bulldogs Gold Coast 99.11% 0.17% 0.72%
3 Hawthorn Hawthorn North Melbourne 89.33% 1.32% 9.35%
3 St Kilda Fremantle St Kilda 28.53% 2.69% 68.79%
4 Sydney Sydney Melbourne 93.85% 0.88% 5.27%
4 Collingwood Collingwood Western Bulldogs 84.25% 1.81% 13.94%
4 Geelong Geelong GWS Giants 78.39% 2.19% 19.42%
4 Essendon Essendon Brisbane 96.21% 0.55% 3.24%
4 Port Adelaide Port Adelaide Richmond 80.50% 2.08% 17.42%
4 Adelaide North Melbourne Adelaide 12.53% 1.56% 85.91%
4 West Coast West Coast Fremantle 99.95% 0.01% 0.04%
4 Gold Coast Gold Coast Carlton 67.54% 2.80% 29.66%
4 Hawthorn St Kilda Hawthorn 22.80% 2.35% 74.85%
5 Collingwood Brisbane Collingwood 3.96% 0.65% 95.39%
5 North Melbourne North Melbourne Essendon 90.46% 1.20% 8.34%
5 West Coast West Coast Port Adelaide 77.32% 2.27% 20.41%
5 GWS Giants GWS Giants Fremantle 99.99% 0.00% 0.01%
5 Melbourne Melbourne St Kilda 96.79% 0.50% 2.71%
5 Sydney Richmond Sydney 27.08% 2.68% 70.24%
5 Western Bulldogs Western Bulldogs Carlton 98.75% 0.24% 1.01%
5 Adelaide Adelaide Gold Coast 100.00% 0.00% 0.00%
5 Geelong Hawthorn Geelong 28.44% 2.67% 68.89%
6 Richmond Richmond Melbourne 65.57% 2.73% 31.70%
6 Collingwood Essendon Collingwood 29.68% 2.64% 67.67%
6 Port Adelaide Port Adelaide North Melbourne 92.75% 0.99% 6.26%
6 Gold Coast Gold Coast Brisbane 61.69% 2.72% 35.59%
6 Adelaide St Kilda Adelaide 4.15% 0.69% 95.16%
6 Sydney Sydney GWS Giants 75.82% 2.38% 21.80%
6 Western Bulldogs Fremantle Western Bulldogs 18.35% 2.21% 79.44%
6 Hawthorn Hawthorn Carlton 99.93% 0.02% 0.06%
6 Geelong Geelong West Coast 87.29% 1.54% 11.17%
7 Port Adelaide Collingwood Port Adelaide 46.31% 3.06% 50.63%
7 Melbourne Melbourne Hawthorn 70.57% 2.52% 26.91%
7 GWS Giants GWS Giants St Kilda 99.60% 0.08% 0.32%
7 Sydney Brisbane Sydney 0.08% 0.02% 99.90%
7 Richmond Western Bulldogs Richmond 40.68% 3.10% 56.21%
7 West Coast West Coast Gold Coast 99.99% 0.00% 0.01%
7 North Melbourne Carlton North Melbourne 6.52% 1.05% 92.44%
7 Geelong Geelong Essendon 99.90% 0.02% 0.08%
7 Adelaide Adelaide Fremantle 99.99% 0.00% 0.00%
8 Sydney Sydney Essendon 99.84% 0.04% 0.12%
8 Western Bulldogs Western Bulldogs Brisbane 98.83% 0.21% 0.96%
8 Collingwood Carlton Collingwood 3.63% 0.67% 95.70%
8 Melbourne Gold Coast Melbourne 0.98% 0.21% 98.81%
8 West Coast St Kilda West Coast 11.31% 1.53% 87.16%
8 Adelaide Port Adelaide Adelaide 43.18% 2.95% 53.88%
8 Geelong North Melbourne Geelong 10.02% 1.40% 88.58%
8 GWS Giants Hawthorn GWS Giants 37.96% 2.93% 59.11%
8 Richmond Fremantle Richmond 4.83% 0.84% 94.32%
9 West Coast West Coast Melbourne 84.30% 1.73% 13.96%
9 Collingwood Collingwood St Kilda 92.24% 1.04% 6.72%
9 Adelaide Brisbane Adelaide 0.06% 0.02% 99.93%
9 Geelong Geelong Western Bulldogs 99.23% 0.15% 0.61%
9 Essendon Essendon Fremantle 92.41% 1.04% 6.55%
9 Sydney North Melbourne Sydney 11.73% 1.59% 86.68%
9 Port Adelaide Port Adelaide Gold Coast 99.98% 0.01% 0.02%
9 Richmond Richmond Hawthorn 65.28% 2.80% 31.92%
9 GWS Giants GWS Giants Carlton 100.00% 0.00% 0.00%
10 Sydney Sydney Collingwood 97.14% 0.47% 2.38%
10 Hawthorn Hawthorn Port Adelaide 61.52% 2.92% 35.56%
10 Western Bulldogs Western Bulldogs North Melbourne 62.65% 2.89% 34.46%
10 Adelaide Adelaide West Coast 84.46% 1.70% 13.84%
10 Geelong Gold Coast Geelong 0.04% 0.01% 99.95%
10 Richmond Richmond Essendon 96.74% 0.52% 2.74%
10 GWS Giants Melbourne GWS Giants 37.86% 2.87% 59.27%
10 St Kilda St Kilda Carlton 97.53% 0.42% 2.05%
10 Fremantle Fremantle Brisbane 77.44% 2.15% 20.41%
11 Richmond North Melbourne Richmond 48.25% 3.02% 48.73%
11 Collingwood Collingwood Fremantle 99.31% 0.14% 0.56%
11 GWS Giants GWS Giants Gold Coast 100.00% 0.00% 0.00%
11 Geelong Geelong Sydney 71.66% 2.62% 25.72%
11 Hawthorn Brisbane Hawthorn 1.54% 0.30% 98.16%
11 Adelaide Melbourne Adelaide 33.96% 2.68% 63.36%
11 Port Adelaide St Kilda Port Adelaide 16.75% 1.99% 81.26%
11 Essendon Essendon Carlton 96.42% 0.57% 3.01%
11 West Coast West Coast Western Bulldogs 96.58% 0.56% 2.86%
12 Geelong Richmond Geelong 24.50% 2.51% 72.99%
12 Carlton Carlton Brisbane 63.11% 2.78% 34.11%
12 North Melbourne Gold Coast North Melbourne 5.34% 0.87% 93.80%
12 Adelaide Adelaide GWS Giants 73.93% 2.33% 23.74%
12 Sydney Sydney West Coast 85.31% 1.74% 12.95%
12 Collingwood Collingwood Melbourne 55.50% 2.92% 41.59%
13 Adelaide Adelaide Richmond 94.72% 0.75% 4.52%
13 Hawthorn Essendon Hawthorn 17.73% 2.03% 80.24%
13 St Kilda Gold Coast St Kilda 15.22% 1.86% 82.92%
13 Port Adelaide Fremantle Port Adelaide 2.27% 0.46% 97.27%
13 Western Bulldogs Carlton Western Bulldogs 10.32% 1.54% 88.15%
13 GWS Giants North Melbourne GWS Giants 15.39% 1.85% 82.76%
14 West Coast West Coast Essendon 99.29% 0.14% 0.57%
14 Sydney Sydney Hawthorn 93.45% 0.94% 5.61%
14 Melbourne Melbourne Fremantle 99.81% 0.04% 0.15%
14 St Kilda St Kilda Brisbane 97.48% 0.39% 2.13%
14 Geelong Port Adelaide Geelong 36.64% 2.97% 60.38%
14 Western Bulldogs Western Bulldogs Collingwood 50.74% 3.11% 46.15%
15 GWS Giants Essendon GWS Giants 3.84% 0.67% 95.48%
15 Geelong Geelong Adelaide 76.49% 2.23% 21.28%
15 Hawthorn Hawthorn West Coast 52.31% 3.04% 44.64%
15 Sydney Sydney Gold Coast 100.00% 0.00% 0.00%
15 Collingwood Collingwood North Melbourne 80.31% 2.00% 17.69%
15 Port Adelaide Port Adelaide Western Bulldogs 94.28% 0.86% 4.86%
15 Richmond St Kilda Richmond 27.03% 2.59% 70.38%
15 Melbourne Brisbane Melbourne 1.36% 0.26% 98.38%
15 Fremantle Fremantle Carlton 80.66% 2.14% 17.20%
16 Hawthorn Hawthorn Collingwood 82.15% 1.91% 15.94%
16 Sydney Essendon Sydney 2.76% 0.53% 96.71%
16 Richmond Gold Coast Richmond 1.63% 0.34% 98.03%
16 Adelaide Adelaide Port Adelaide 89.44% 1.30% 9.27%
16 Geelong Western Bulldogs Geelong 7.82% 1.23% 90.95%
16 West Coast Fremantle West Coast 1.23% 0.27% 98.50%
16 Melbourne Carlton Melbourne 1.35% 0.29% 98.35%
16 North Melbourne North Melbourne St Kilda 86.93% 1.51% 11.55%
16 GWS Giants GWS Giants Brisbane 100.00% 0.00% 0.00%
17 West Coast West Coast Collingwood 91.67% 1.11% 7.22%
17 Sydney Sydney Carlton 100.00% 0.00% 0.00%
17 Hawthorn Hawthorn Fremantle 99.77% 0.05% 0.18%
17 North Melbourne Essendon North Melbourne 41.18% 2.91% 55.91%
17 Adelaide Gold Coast Adelaide 0.04% 0.01% 99.94%
17 Geelong Geelong St Kilda 99.81% 0.04% 0.15%
17 GWS Giants Richmond GWS Giants 33.33% 2.84% 63.83%
17 Melbourne Western Bulldogs Melbourne 35.57% 2.90% 61.53%
17 Port Adelaide Port Adelaide Brisbane 99.98% 0.01% 0.02%
18 Adelaide Adelaide Essendon 99.88% 0.03% 0.09%
18 Richmond Richmond Port Adelaide 56.53% 3.05% 40.42%
18 Carlton Carlton Gold Coast 70.86% 2.66% 26.48%
18 GWS Giants GWS Giants Collingwood 96.08% 0.60% 3.32%
18 North Melbourne Brisbane North Melbourne 7.46% 1.05% 91.49%
18 Sydney Fremantle Sydney 0.31% 0.08% 99.61%
18 Geelong Geelong Hawthorn 94.62% 0.79% 4.59%
18 Melbourne Melbourne West Coast 52.53% 2.98% 44.49%
18 St Kilda St Kilda Western Bulldogs 55.94% 3.05% 41.01%
19 Collingwood Collingwood Richmond 60.31% 2.92% 36.77%
19 Hawthorn Hawthorn Brisbane 99.95% 0.01% 0.04%
19 Adelaide Carlton Adelaide 0.08% 0.02% 99.90%
19 West Coast West Coast North Melbourne 95.64% 0.65% 3.71%
19 Melbourne St Kilda Melbourne 22.28% 2.27% 75.45%
19 GWS Giants Port Adelaide GWS Giants 46.86% 3.08% 50.06%
19 Western Bulldogs Western Bulldogs Fremantle 97.09% 0.49% 2.42%
19 Sydney Sydney Geelong 66.76% 2.82% 30.41%
19 Essendon Gold Coast Essendon 19.67% 2.16% 78.17%
20 Hawthorn North Melbourne Hawthorn 43.12% 2.97% 53.92%
20 Port Adelaide Essendon Port Adelaide 12.65% 1.65% 85.69%
20 GWS Giants GWS Giants Sydney 62.49% 2.93% 34.58%
20 Geelong Fremantle Geelong 0.22% 0.06% 99.72%
20 Melbourne Melbourne Richmond 74.67% 2.35% 22.98%
20 Adelaide Adelaide St Kilda 99.77% 0.05% 0.18%
20 Collingwood Collingwood Gold Coast 99.85% 0.03% 0.12%
20 West Coast Carlton West Coast 0.46% 0.12% 99.42%
20 Western Bulldogs Brisbane Western Bulldogs 11.95% 1.54% 86.51%
21 GWS Giants GWS Giants Hawthorn 91.28% 1.15% 7.57%
21 Melbourne Melbourne Collingwood 82.78% 1.83% 15.39%
21 Sydney Port Adelaide Sydney 39.46% 3.08% 57.46%
21 Brisbane Brisbane Gold Coast 79.48% 1.99% 18.53%
21 Essendon Essendon Western Bulldogs 49.12% 3.09% 47.79%
21 Geelong Geelong North Melbourne 99.04% 0.18% 0.78%
21 St Kilda St Kilda Fremantle 94.53% 0.81% 4.67%
21 Richmond Richmond Carlton 99.87% 0.03% 0.10%
21 West Coast West Coast Adelaide 52.93% 2.94% 44.14%
22 Sydney Melbourne Sydney 30.93% 2.75% 66.32%
22 St Kilda Carlton St Kilda 17.18% 2.07% 80.75%
22 Geelong Brisbane Geelong 0.05% 0.01% 99.94%
22 Adelaide Adelaide Collingwood 97.25% 0.43% 2.32%
22 Port Adelaide North Melbourne Port Adelaide 34.43% 2.84% 62.74%
22 Essendon Fremantle Essendon 34.62% 2.89% 62.49%
22 West Coast Richmond West Coast 47.25% 3.09% 49.67%
22 GWS Giants GWS Giants Western Bulldogs 98.57% 0.26% 1.17%
22 Hawthorn Hawthorn Gold Coast 99.96% 0.01% 0.03%
23 Melbourne North Melbourne Melbourne 42.93% 2.90% 54.17%
23 Richmond Richmond Brisbane 99.91% 0.02% 0.07%
23 GWS Giants Gold Coast GWS Giants 0.09% 0.03% 99.88%
23 Port Adelaide Port Adelaide Fremantle 99.87% 0.03% 0.10%
23 West Coast West Coast Hawthorn 83.80% 1.81% 14.39%
23 Geelong Geelong Carlton 100.00% 0.00% 0.00%
23 Adelaide Western Bulldogs Adelaide 9.68% 1.36% 88.96%
23 Collingwood Collingwood Essendon 94.59% 0.77% 4.64%
23 Sydney Sydney St Kilda 99.72% 0.06% 0.22%

Data and stats model

Data sources

Current match fixtures data from: fixturedownload.com

Historical match results data from: Australia Sports Betting

Poisson distribution based on all data since 2009

About

Apparently, a Poisson distribution model is not a bad way to predict sports results where the scoring is not dependent on previous events.

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:Python 100.0%