Gini Coefficients and the Olympic Medal Race

Today’s post will attempt to answer a provocative question: is the race for Olympic medal dominance getting more competitive? In the process of addressing this topic, we’ll learn how to directly import data from WolframAlpha into Mathematica.

If you watched any of the Olympics over the past two weeks, you likely became familiar with the medal count table. This table is a grossly reductionist metric of national achievement at the Olympics. Nonetheless, it provides a useful way to quantify the aggregate performance of different nations.

The United States took home 104 medals from the 2012 games, placing it at the top of the medal table. The race for the most medals was exciting, though, as China and Russia were not far behind.

Competitive balance among nations generates excitement. Parity is what makes things interesting. If one nation dominated the podium, the Olympics would be boring.

Is the competitive balance between nations improving or declining? One way to address this question is to look at the distribution of medals won by different nations. When most of the medals are won by a very few nations, competitive balance is poor; when medals are distributed more equally among nations, competitive balance is stronger.

The Gini coefficient is a statistic widely used by economists to measure income inequality. The Gini coefficient is proportional to the average difference between individual incomes in a population, normalized to fall between 0 and 1. A Gini coefficient of 0 indicates total equality; a Gini coefficient of 1 indicates all income is controlled by a single individual. We can use the same statistic to quantify inequality in Olympic medal winnings.

First, however, we need to find data on Olympic medals. This is particularly easy in Mathematica 8, due to its interface with WolframAlpha. For the uninitiated, WolframAlpha is a bit like a search engine. Rather than direct you to relevant webpages, though, it attempts to answer you query with data. If you type in a math problem, it will try to solve it. If you type in a request for data, it will display the results in a table.

You needn’t visit the WolframAlpha website to do a search. Instead, you can access it directly in Mathematica by typing WolframAlpha[“search item”]. For example, typing WolframAlpha[“2012 Olympic Medals”] yields the following output:

 Clicking the “more” button in the upper right corner will expand the results to include all nations that won medals. The format of the output is the same “pod” format that you’ll see on WolfrmaAlpha’s website. To actually make use of the data, hit the plus symbol in the upper right corner and choose “computable data”. You can save the result as something like “medals2012”.

We can repeat this process for other Olympics.

The ability to access WolframAlpha is pretty cool. You can get up to the second information on stock prices and weather, all without having to open a web browser.

Now that we have data, we can plot histograms for each Olympic year. Most of it is just formatting, but note that making flags is easy because they are part of Mathematica’s “CountryData” database.

Here is the 2012 medal distribution (Click on it for a better look):

Now we turn to the Gini Coefficient to see how medal inequality changes over the years. (Relax math folks; I mean inequality in the economic sense).

Below is the code for calculating Gini coefficients. Note the use of the command “Empirical Distribution”. This is another new feature in Mathematica 8. Given a data set, it generates the probability distribution, allowing you to directly use the associated probability density function and cumulative distribution function.

A couple caveats are in order. First, we are only considering the distribution of medals among medal winning nations. Many nations attend the Olympics symbolically, but are not in serious medal contention. These are not included in this calculation. Furthermore, we only consider the total medal count, and hence golds, silvers, and bronzes are treated as equal achievements, which they are obviously are not.

We can plot how the Gini Coefficient has changed over the years:

Remember, lower Gini Coefficients mean better competitive balance. What do you make of these results?

Here are some geopolitical questions to ponder:

Why the peak in inequality in 1980?

Why the decrease starting in 1992?

Why have 2008 and 2012 been less equal than the recent past?

The following two tabs change content below.

Ben Nolting

Ph.D. Candidate at University of Nebraska

One thought on “Gini Coefficients and the Olympic Medal Race

Leave a Reply