2021 Summer Olympics is now over, and we can now play around with the results without having to speculate about future performance of countries. I wanted to quickly test different ranking methods and see how they compare.

Why?

Because ranking the olympic performance of countries is not very straightforward, and people aren’t aware of the tradeoffs between different ranking methods.

Ranking methods

In this section I will go through some sensible ways to rank countries. Before we do that, let’s have a quick look at the data as it is presented on the olympics website.

Out [4]:
country gold silver bronze
0 USA 39 41 33
1 China 38 32 18
2 Japan 27 14 17
3 Great Britain 22 21 22
4 Russia 20 28 23
... ... ... ... ...
88 Ghana 0 0 1
89 Grenada 0 0 1
90 Kuwait 0 0 1
91 Moldova 0 0 1
92 Syria 0 0 1

93 rows × 4 columns

Number of gold medals

This is the most common ranking method I’ve seen. It ranks countries by the number of gold medals earned, using the number of silver and bronze medals as tie-breakers.

Out [5]:
country gold silver bronze
0 USA 39 41 33
1 China 38 32 18
2 Japan 27 14 17
3 Great Britain 22 21 22
4 Russia 20 28 23
5 Australia 17 7 22
6 Netherlands 10 12 14
7 France 10 12 11
8 Germany 10 11 16
9 Italy 10 10 20
10 Canada 7 6 11
11 Brazil 7 6 8
12 New Zealand 7 6 7
13 Cuba 7 3 5
14 Hungary 6 7 7

Total number of medals

This is another common method that attempts to fix the downsides of “ranking by gold”. Instead, it ranks the countries by the total number of medals earned.

Out [6]:
country gold silver bronze total
0 USA 39 41 33 113
1 China 38 32 18 88
4 Russia 20 28 23 71
3 Great Britain 22 21 22 65
2 Japan 27 14 17 58
5 Australia 17 7 22 46
9 Italy 10 10 20 40
8 Germany 10 11 16 37
6 Netherlands 10 12 14 36
7 France 10 12 11 33
10 Canada 7 6 11 24
11 Brazil 7 6 8 21
12 New Zealand 7 6 7 20
14 Hungary 6 7 7 20
15 South Korea 6 4 10 20
43 Ukraine 1 6 12 19
21 Spain 3 8 6 17
13 Cuba 7 3 5 15
16 Poland 4 5 5 14
23 Switzerland 3 4 6 13
34 Turkey 2 2 9 13
33 Taiwan 2 4 6 12

Weighted ranking

This is a mixture of the previous two methods. It ranks countries based on the total number of medals, but each gold medal is worth 3 points, each silver medal is worth 2 points, and each bronze medal is worth 1 point.

Out [7]:
country gold silver bronze weighted
0 USA 39 41 33 232
1 China 38 32 18 196
4 Russia 20 28 23 139
3 Great Britain 22 21 22 130
2 Japan 27 14 17 126
5 Australia 17 7 22 87
9 Italy 10 10 20 70
6 Netherlands 10 12 14 68
8 Germany 10 11 16 68
7 France 10 12 11 65
10 Canada 7 6 11 44
11 Brazil 7 6 8 41
12 New Zealand 7 6 7 40
14 Hungary 6 7 7 39
15 South Korea 6 4 10 36
13 Cuba 7 3 5 32
21 Spain 3 8 6 31
16 Poland 4 5 5 27
43 Ukraine 1 6 12 27
17 Czech Republic 4 4 3 23
23 Switzerland 3 4 6 23
18 Kenya 4 4 2 22
22 Sweden 3 6 0 21
24 Denmark 3 4 4 21
33 Taiwan 2 4 6 20
34 Turkey 2 2 9 19

There are other weighted ranking methods such as 5:3:2.

Out [8]:
country gold silver bronze weighted
0 USA 39 41 33 384
1 China 38 32 18 322
4 Russia 20 28 23 230
3 Great Britain 22 21 22 217
2 Japan 27 14 17 211
5 Australia 17 7 22 150
9 Italy 10 10 20 120
8 Germany 10 11 16 115
6 Netherlands 10 12 14 114
7 France 10 12 11 108
10 Canada 7 6 11 75
11 Brazil 7 6 8 69
12 New Zealand 7 6 7 67
14 Hungary 6 7 7 65
15 South Korea 6 4 10 62
13 Cuba 7 3 5 54
21 Spain 3 8 6 51
43 Ukraine 1 6 12 47
16 Poland 4 5 5 45
23 Switzerland 3 4 6 39
17 Czech Republic 4 4 3 38
18 Kenya 4 4 2 36
24 Denmark 3 4 4 35
33 Taiwan 2 4 6 34
34 Turkey 2 2 9 34

Interpreting the results

There are a few interesting observations to make.

  1. United States is always ranked number 1.
  2. China is always ranked number 2.
  3. Great Britain is always ranked number 4.
  4. Australia is always ranked number 6.