Categories

Tuesday, June 12, 2018

Simulating the 2018 World Cup

4 years ago I, like every other model, picked Brazil to win the World Cup on their home turf. It was my first attempt at a large scale simulator and took me over 1,500 lines of code, written in Java. But 4 years is a long time, I've switched to Python, and I can't even find what I wrote from back then.

So I've adapted my simulator, again, this time written in less than 300 lines, and using my own "ensemble model" like I've generated for college basketball.

I'm taking a composite of of 4 different rating systems, like Ed Feng does:

I used this model's output, along with the parameters of 0.5 goals for home-field for Russia and 1.83 as the standard deviation in score and simulated the World Cup 10,000 times to get the following probabilities:

GroupCountryMDS RatingAvg Points1st in Group2nd in GroupAdvanceQuartersSemisFinalChampion
AEgypt0.893.2110.45%19.39%29.84%9.11%3.01%0.84%0.22%
ARussia1.155.3239.02%33.68%72.70%33.78%15.95%6.46%2.48%
ASaudi Arabia0.593.4110.10%18.86%28.96%6.93%2.04%0.40%0.08%
AUruguay1.584.8540.43%28.07%68.50%30.82%14.42%5.67%2.17%
BIran0.972.926.44%15.22%21.66%9.10%2.87%0.81%0.18%
BMorocco1.133.219.16%19.22%28.38%12.74%4.48%1.30%0.40%
BSpain2.255.8858.18%24.70%82.88%57.53%34.64%18.61%9.92%
BPortugal1.804.8326.22%40.86%67.08%39.99%19.94%8.68%3.84%
CAustralia0.892.775.37%15.07%20.44%6.80%2.23%0.60%0.18%
CFrance2.296.1964.33%21.85%86.18%57.01%36.23%18.94%9.68%
CPeru1.363.9716.28%35.92%52.20%22.70%9.53%3.33%0.97%
CDenmark1.353.9114.02%27.16%41.18%17.75%7.53%2.85%0.86%
DIceland1.123.5011.93%22.34%34.27%12.32%4.84%1.60%0.56%
DNigeria0.963.117.73%17.37%25.10%8.36%3.05%0.90%0.28%
DCroatia1.464.3220.92%37.11%58.03%25.61%10.84%4.10%1.57%
DArgentina2.095.8759.42%23.18%82.60%49.45%28.40%14.03%7.23%
EBrazil2.776.9176.62%16.55%93.17%67.04%49.01%33.98%22.75%
ECosta Rica1.012.864.47%17.67%22.14%6.86%2.71%0.88%0.22%
ESerbia1.233.357.35%25.77%33.12%10.90%4.58%1.58%0.52%
ESwitzerland1.423.8011.56%40.01%51.57%18.05%8.04%3.22%1.18%
FGermany2.596.7273.37%17.57%90.94%62.00%44.14%29.77%17.82%
FSouth Korea0.802.543.92%13.76%17.68%4.34%1.42%0.41%0.08%
FSweden1.293.649.59%26.67%36.26%11.83%5.30%2.14%0.64%
FMexico1.424.0113.12%42.00%55.12%18.98%9.14%3.79%1.27%
GBelgium1.975.7755.04%27.21%82.25%51.91%23.26%12.62%5.88%
GPanama0.702.765.27%13.42%18.69%6.73%1.48%0.46%0.11%
GTunisia0.843.107.67%18.77%26.44%10.05%2.59%0.82%0.18%
GEngland1.745.2232.02%40.60%72.62%42.41%17.23%8.50%3.69%
HColombia1.675.1848.08%25.98%74.06%37.85%14.60%6.55%2.81%
HSenegal1.023.5211.37%19.24%30.61%11.11%3.20%0.93%0.36%
HJapan1.023.5513.88%21.65%35.53%12.71%3.47%1.06%0.36%
HPoland1.434.5326.67%33.13%59.80%27.23%9.83%4.17%1.51%

Brazil is your most likely champion, but so were they last time and we saw how that turned out.

1 comment: