Click column heading to sort data

Alternative medal rankings Click heading to sort table. Download this data Country Official medal ranking GDP rank Pop rank Team size rank USA 1 66 47 5 China 2 54 73 1 Great Britain 3 40 20 13 Russia 4 36 34 8 South Korea 5 43 31 15 Germany 6 55 35 19 France 7 58 36 23 Italy 8 57 40 24 Hungary 9 14 8 17 Australia 10 44 11 30 Japan 11 70 50 21 Kazakhstan 12 28 28 14 Netherlands 13 46 19 20 Ukraine 14 18 44 29 Spain 15 56 46 47 Brazil 16 71 67 54 Cuba 17 11 18 16 New Zealand 18 20 4 35 Canada 19 65 45 63 Iran 19 37 59 3 Belarus 21 8 16 36 Jamaica 21 2 2 2 Czech Republic 23 34 21 28 Kenya 24 6 52 7 Romania 25 32 39 26 Denmark 26 41 10 33 Azerbaijan 27 15 23 11 Poland 27 52 55 66 Ethiopia 29 10 67 6 North Korea 29 3 51 12 South Africa 29 51 61 45 Sweden 29 53 25 56 Colombia 33 47 60 46 Croatia 33 19 15 39 Georgia 35 5 13 10 Mexico 35 72 75 49 Turkey 37 67 72 53 Lithuania 38 17 12 27 Switzerland 38 63 30 52 Norway 40 60 24 32 India 41 81 85 61 Ireland 41 49 22 44 Argentina 43 64 65 76 Mongolia 43 4 14 22 Serbia 43 22 38 72 Slovenia 43 27 9 51 Trinidad and Tobago 47 16 5 25 Tunisia 47 29 49 65 Uzbekistan 47 31 63 48 Dominican Republic 50 35 52 30 Slovakia 50 39 37 59 Thailand 50 61 77 42 Armenia 53 9 29 38 Belgium 53 76 56 81 Egypt 53 59 80 80 Finland 53 62 43 71 Latvia 53 30 26 57 Algeria 58 68 78 58 Bahamas 58 12 3 37 Bulgaria 58 38 54 78 Estonia 58 21 17 62 Grenada 58 1 1 9 Indonesia 58 82 84 43 Malaysia 58 69 73 60 Puerto Rico 58 50 41 50 Taiwan 58 83 70 73 Uganda 58 23 78 18 Venezuela 58 77 76 75 Botswana 69 26 33 4 Cyprus 69 33 7 34 Gabon 69 24 27 69 Greece 69 79 64 84 Guatemala 69 42 66 55 Moldova 69 13 48 67 Montenegro 69 7 6 74 Portugal 69 74 62 82 Qatar 69 73 32 40 Singapore 69 78 56 68 Afghanistan 79 45 82 40 Bahrain 79 48 42 70 Hong Kong 79 84 70 83 Kuwait 79 80 58 64 Morocco 79 75 82 85 Saudi Arabia 79 85 81 79 Tajikistan 79 25 67 77

How do you measure a team's performance in the Olympics? The traditional way is to just count up the number of medals won. And the result? The biggest countries always come top: the Olympic 'superpowers' of the US, China, Russia, UK, Australia and Germany.

But what if the totals took account of factors that must have an influence, such as the size of a country's population or its economic power, or compared it to the size of the athletic team in London?

The Royal Statistical Society and the Datablog have teamed up with four statisticians at Imperial College, London, to help us work out how those key factors might change the league table. By 'weighting' the medals, what happens to the results?

The team, Christoforos Anagnostopoulos, Giovanni Montana, Axel Gandy and Daniel Mortlock, looked at previous olympics and traditional indicators such as the output of a country's economy (GDP), the size of its population - and also ways to weight the score by the size of each country's Olympic team.

What's the rationale? Take the 2008 results. The Bahamas had a population of approximately 334,000 in 2008, whereas the USA had 304,000,000 - almost 1,000 times larger. And yet the Bahamas won two medals, whereas the US 110 – 55 times as many. "Taking population into account," says Anagnostopoulos, "It no longer seems obvious that the US should rank higher than the Bahamas. The intuition is that the US had a larger pool of possible athletes to choose from, and consequently it makes sense that it should do better, too".

So, what will the results look like? Says Anagnostopoulos:

The simplest approach is to divide the number of medals by the population of each country. We will however look at other types of indices that might be harder to interpret directly. Consequently, to make the league table interpretable without reference to the underlying index, we express the results as a (weighted) medal count. As the Games progress, for each medal type (Bronze/Silver/Gold), we redistribute the medals that have been already won, taking into account the country's population: for a small country, one medal will be worth more than for a larger country, and it may therefore end up with 2 or 3 medals, whereas the larger country "loses" some of its medals in order to correct for the advantage afforded to it by way of its larger population. The resulting medal count will depend on the relative sizes of the countries of the medal winners, and may change as more medals are added onto the database. We do the same for silvers and golds, as well as for total medal count

GDP, is another obvious one to re-size on, particularly when you consider how expensive sport equipment and training is. Moreover, since GDP also grows with population size, it implicitly also takes into account population size.

Although penalising larger wealthier countries may seem intuitively "fair", our statistical team invites us to think harder about the potential arbitrariness of penalties and how they can be selected objectively. Anagnostopoulos explains:

We have been thinking of GDP (or population) as an "advantage" that needs to be "corrected for" by penalising. This however involves an arbitrary decision of how much to penalise by. A statistician would take a different, more objective view, where GDP is a factor that can, to some extent, explain the performance of various countries. A different, more objective view, would interpret GDP as a factor that can, to some extent, explain the performance of various countries. Once this explanatory potential is exhausted, what 'is left' (the statistical jargon for this is 'residual') can be interpreted as 'GDP-corrected' athletic skill - a purer measure. Crucially, we may then rely on sound principles of statistical modelling to determine fairly conclusively which index is the one that maximises the explanatory power of GDP (and/or population) in this context. The resulting measure is no longer a simple ratio, but a variant of a log scale, which carefully balances the numbers in a fairly complicated way. When the games are over, we will be able to analyse the results based on this work

Reassuringly, however, the main qualitative conclusion of the earlier league tables seems to persist: for instance, in 2008, Cuba comes top, with 24 medals but a small population and GDP. Not all "superpowers" are banished, but some are: Australia, China, and Russia maintain their positions in the top 20, whereas the UK and the US are no longer featured.

Team size is also a factor - and one which our team says may be a better indicator than either GDP or population as it has already taken that into account by team selection.

And this is what those results look like for for population and GDP, compared to team size: "A sharper linear relationship is evident after taking logarithms. Further analysis can fine-tune the index to capture as much as possible the effect of GDP and/or population on performance." says Anagnostopoulos.

The full data is below - and we will update it throughout the Games. What can you do with it?

Click column heading to sort data, dropdowns to filter

Click column heading to sort data, dropdowns to filter

Click column heading to sort data, dropdowns to filter

Click column heading to sort data, dropdowns to filter

• DATA: download the full spreadsheet

NEW! Buy our book

• Facts are Sacred: the power of data (on Kindle)

More open data

Data journalism and data visualisations from the Guardian

World government data

• Search the world's government data with our gateway

Development and aid data

• Search the world's global development data with our gateway

Can you do something with this data?

• Flickr Please post your visualisations and mash-ups on our Flickr group

• Contact us at data@guardian.co.uk

• Get the A-Z of data

• More at the Datastore directory

• Follow us on Twitter

• Like us on Facebook