World Cup - Host Advantage and Curse of the Champion
The 2018 World Cup is well underway, and it made me go digging for actual game data from past tournaments.
What can we learn from match history spanning the Cup's 88 years?
We can start with a long-format data set of each country's result in every World Cup (including years in which countries did not qualify or participate).
This data set is reshaped from a table found in the Wikipedia entry for National team appearance in the FIFA World Cup, and also available in this PDF provided by FIFA.
The cleaned and reshaped data set is available in
rds format here:
If we look at the contents of the set, you can see that there's one observation per team-year:
FIFA final rankings
Although teams don't all play each other in the World Cup, FIFA still ranks the performance of each time to produce an integer variable to distinguish performance. Luckily for data analyses like this one, FIFA has even ranked teams from past World Cups, so we have a complete data set.
Ties do occur, but for the most part, the more continuous nature of the ranking variable produces much more interesting visualizations than using the round of exit, since so many teams exit the group stage together, despite the potential for a wide difference in performance during the three group matches.
To confirm we're looking at the right results, let's look at the range of final rankings by year of each World Cup - we should see a data point per team:
This looks right - the first few World Cups had between 14 and 16 teams, then a standard 16 from 1952 to 1978, then 24 from 1982 to 1994, and 32 teams since the 1998 World Cup hosted by France.
You can hover over individual points to see the year, rank, and team (remember that lower rankings are better).
Gaps in the data occur because of ties in the rankings (for example, if there's a two-team tie for 9th, the next ranking would be 11th).
The file below contains a simple
data.frame with host nations and the year in which they hosted (or co-hosted) the World Cup.
There's something interesting when you look at the host rankings - hosts do really well compared to non-hosts. If we create the same plot above, but color the hosts brighter, you can see that 13 / 21 host countries have finished in the top 5, and 18/12 in the top 9:
This makes some intuitive sense - nations most willing to host the World Cup seem likely to have good teams, and bids to host are likely to be accepted for countries who can not only put on a good performance on the pitch, but also have a fan base ready to attend in good numbers.
So to narrow in, let's restrict to countries that have ever hosted a World Cup, a set that includes all past champions.
To simplify things, let's look at host countries' performance:
in the World Cup before hosting
during the World Cup as hosts
in the World Cup directly after hosting
The first step is to filter the data to rows directly before, during, or after a hosted World Cup. To do this, we can merge the
host_years data onto the
all_results data, and keep only the matches, then repeat the merge twice, adding and subtracting four years to the
year variable to merge with the results before and after the host year.
Now we can plot a three-point time series for each host, drawing a line from their rank in the World Cup prior to, during, and after their host year.
This is kind of messy, but I think there's a pattern of downward V shapes, indicating a better final rank in the year of ohosting.
So even after restrict to teams that have hosted a World Cup, and only to tournaments directly before, during, and directly after the host year, the effect of hosting seems pretty significant, at least visually.
Chile didn't qualify in 1954 or 1958, then promptly finished 3rd as hosts in 1962. Next time out in 1966, they fell to a tie for 13th place.
The United States finished 23rd in 1990, then rose to a respectable 14th at home in 1994, but followed it with a disastrous 32nd (last) in France in 1998.
South Korea had finished 20th or worse (and were trending down) in all four World Cups preceding 2002, when they co-hosted and placed 4th. In 2006, it was back to mediocrity and a 17th-place result.
Even among traditional powers who had never finished outside the top 10 (prior to 2018 :)), the trend holds: West Germany (whose results are now grouped with Germany) finished 3rd in 1970, won the whole thing as hosts in 1974, and then dropped back to 6th in 1978.
Separating all the results by team leads to a scattered visualization - if we summarize the ranks at each time point, we can look at a grouped boxplot to see the typical final ranks again before hosting, while hosting, and directly after hosting.
Really interesting, right? The median finishing rank in the tournament before hosting is 8.5, and after hosting it's 8. But as hosts, the median rank is 3, and a full quarter of hosts have won the championship.
So why would hosting be worth a full five ranking spots, on average?
Curse of the Champion
There's a darker side to this - while everyone loves the story of a host rising to win it all in front of a home crowd, why has it become so common for defending champions (whether they won as hosts or not) to perform much worse in the tournament following?
Only two countries have won back-to-back World Cups (Italy in 1934 and 1938, and Brazil in 1958 and 1962).
If we visualize it like the line chart by team above, except restricting the sample to champions and their performance as defending champions, we can see that there's a pretty wide range of results:
It gets more interesting if we actually show them in time order, though:
The three worst defense efforts of all World Cup champions have occurred in the past four tournaments (France finished 28th in 2002, Italy 26th in 2010, and Spain 23rd in 2014).
As I worked on this article, Germany lost in the group stage of the 2018 tournament (final ranking to be determined). So now the four worst title defenses have occurred in the past five tournaments.
So what's the issue for all the returning champions? There could be any number of explanations, and unfortunately many would require more detailed data than I have.
But one thought is that modern-day marketing of individual players might lead to teams feeling pressure to keep aging stars on the roster longer than they should, and playing too many minutes over younger, up-and-coming talent.
With that in mind, I pulled the roster for each country in every World Cup year, getting player name, position, and date of birth:
Then I compared the roster for champions in the year they won and four years later, calculating the number of players dropped/kept from the championship roster, as well as the mean/median roster age from the championshion year and four years later:
There's almost a pattern here that aligns with my hypothesis - two of the worst defending finishes were by teams that dropped the fewest players (8) from their championship rosters, and there's a general negative correlation for the rest...except that 1958 Brazil only kept 8 players and won the tournament.
The correlation coefficient here overall, including Brazil, is -0.49:
There are some weaknesses to this approach with rosters. I only know which players were on the roster for each country in each year. I don't know which games each player participated in, or whether they played the majority of the game or entered as a substitute late in the game, which would be extremely valuable.
Just for fun
To round this out, what are some notable cases of World Cup performance, good or bad?
For example, what teams have participated in the most World Cups without a final appearance, or a semifinal appearance?
Worst of the best
There's a clear pattern in this plot: for almost all countries, more appearances leads to a better all-time best rank, and no team with fewer than 12 appearances has won a championship.
But there's also an obvious outlier - only five teams have appeared in at least 14 World Cups, and all of them have won a championship...except Mexico, whose best finish is 6th place in the quarterfinal round, without a top-10 finish since 1986.
In fact, among all teams participating in 9 or more World Cups, Mexico is tied for the worst all-time best rank, even with 15 total opportunities to improve that statistic.
It's not as easy to look at worst rankings, since the worst possible ranking changed over time (14 to 16 to 24 to 32), making them non-comparable over time periods.
But despite that issue, if we look at teams that have at least 4 appearances, and sort them by the minimum overall range of ranking, we should get the most consistent teams in World Cup history:
So if it's any consolation to Mexico (it's not), they have been the third-most consistent finisher in World Cup history - unfortunately, they've been consistently between 6th place and 16th place, while watching other countries finish both above and below them across multiple tournaments.
World Cup resume clustering
Lastly, what if we order teams' set of ranks over time, and then run a simple clustering algorithm to find the most similar teams?
I'll set a seed here so the clustering will be reproducible - otherwise
stats::kmeans will choose a random set of rows as the starting cluster centers.
We can't print enough data here to give a good representation of the results, so let's draw a plot of the ordered ranks, colored by cluster:
But to really separate them into groups, we can facet by cluster:
Interesting separation, right? Clearly these are groups of teams with different World Cup histories. If we step through each of the five clusters, looking at team names and also the facets in the plot, maybe we can come up with a short description for each one:
Cluster 1: All-time greats, nearly always qualifying, lots of top-5 and top-10 finishes.
Cluster 2: at most 3 appearances, but mostly 1, and mostly no top-10 finishes.
Cluster 3: Some great finishes, but no championships, and no more than 10 appearances.
Cluster 4: Roughly the same range of ranks, but in half the appearances of cluster 3.
Cluster 5: So close, lots of appearances and even some championships (England, France, Uruguary, Spain) but without the staying power to make it to cluster 1.