image sourceGetty Images

The Olympics medals table was again dominated by the biggest countries like the US, which finished top. But how would the table look if population and wealth were taken into account?

When it comes to counting the medal spoils, there is a strong sense of deja vu. Every four years, the same few countries wrack up medal after medal – the US, China, Russia – and Tokyo 2020 was no different.

The US won 113 medals total, including 39 golds, the most of any country.

Your device may not support this visualisation

So what makes countries like the US dominate, while others lag behind? Economists and data nerds have a few theories.

"It's still loud and clear from the patterns that what matters is population, level of income, and political system," says David Forrest, an economist at the University of Liverpool who researches Olympic predictions.

Population matters, Mr Forrest says, because the bigger the pool of athletes, the more likely it is for a country to produce true competitors.

"It's clear that very few people who are born have got the potential to be a world-class athlete," he says.

  • Tokyo 2020 – all the best stats
  • Tokyo Olympics medals table

Take a country like Luxembourg, which has a population of 633,622. It sent 12 athletes to compete in seven sports, and won no medals. Meanwhile the US, which has the third-largest population in the world, sent 613 athletes to compete in 35 sports and took home more medals than any other country.

Some countries over-perform, given their population size. The BBC came up with an alternative ranking, which looked at the number of medals won per million people. In this scenario, the tiny European nation of San Marino, with a population of just over 33,000, comes out on top, even though it earned only three medals. The US didn't even crack the top 20, coming in at 60th place.

Your device may not support this visualisation

But population, by itself, is not enough to guarantee a country sweeps the podium.

"If a country is very poor, it won't have the resources to convert that potential into actual ability to compete on a world stage," he says.

"They've got to have the ability to participate in sport in the first place. For example, they might have a great natural ability in swimming that is waiting to be developed – but actually there won't be any swimming pools."

When poorer countries do win, they tend to win at sports that are lower-cost, like wrestling, he says, while wealthy countries outperform in expensive sports like equestrian and sailing.

When taking into account the average national wealth per person, China and Russia (numbers two and three in total medals) actually did better than the US. Under these alternate rankings, China comes in first, and Russia second, with Kenya coming in third place.

The US, normally top dog, lagged behind at number 15.

Your device may not support this visualisation

There are cultural and political factors too. Mr Forrest says that countries that used to belong to the Soviet Union tend to have an advantage, because of the strong sports infrastructure that was established by communist regimes.

Commonwealth countries also tend to do better than expected compared to their size and wealth. Mr Forrest believes that's because Britain was a pioneer in developing sport as we know it today, and brought that enthusiasm for athletic competition with them around the world.

Australia, which often cracks the top-10 for total medal count, is a prime example.

  • 21 great photographs from Tokyo 2020
  • Who are Team GB's medal winners?

The sports a country chooses to compete in matter too.

In India, cricket is the national sport but is not played at the Olympics. India also does tend to excel at hockey, which is played at the Olympics, but that only yields a maximum of two medals, one for men and one for women. Whereas sports competed by an individual, such as gymnastics, swimming and athletics, can yield several per athlete.

"In general, it doesn't do you a lot of good to be keen on team sports," Mr Forrest says.

Simon Greave, head of sport analyses at data company Neilsen Gracenote, says it's these myriad factors that make predicting Olympic medal counts tricky. If you just use variables like population and GDP per capita, you tend to underestimate some of the country's top performers.

Past performance, he says, is a much better predictor of who will do well – but that's still only a rough estimate.

"What you won't pick up is countries that are improving fast or declining fast, and I think that's the interesting part in all of this," he tells the BBC.

To better gauge the Olympic winners, Mr Greave takes into account not only past athletic performance, but how each country has done at other international sporting competitions since the last Olympic games.

Taking that into account, he predicted that India would actually have its best year yet, which it did, finishing 33rd in terms of most medals won. That smashed its previous record of 51st, from 2008.