The all-time Olympic medal leader, U.S. swimmer Michael Phelps, kisses another gold medal during the 2012 Summer Games in London. (Michael Dalder/Reuters)

What kinds of countries bring home the most Olympic medals? It seems obvious: Those with more wealth and larger populations. After all, rich countries with more people produce more top athletes and have more money to support them.

That theory is certainly borne out in the fact that the United States (103 medals, 46 gold) and China (88 medals, 38 gold) brought home the most medals in 2012, and they are likely to do so again in Rio de Janeiro this month.

But that can’t be the whole story. If population size is so important, why has India, with 1.3 billion people, won only 26 Olympic summer medals in its history — while China, with just 82 million more residents, has won 473? And why has Cuba, Latin America’s 10th-most populous country, won more Olympic medals than any other nation in Central or South America, including the far more populous Argentina, Brazil and Mexico?

And if money is the answer, why has Kenya won 29 times as many medals as Saudi Arabia, despite having a per capita gross domestic product that is 17 times lower?

The answer, I’ve found in my research, is policy.

 In “Success and Failure of Countries at the Olympic Games,” I propose the “WISE” formula that helps explain Olympic success. WISE stands for promoting women in sports; institutionalizing national sports promotion; specializing in particularly promising sports; and early adoption of such trends as newly added disciplines.

Let’s examine how each of those can affect a country’s Olympic fortunes.

1. Promoting women in sports helps nations excel at the Olympics.

Why? Because having few women in an Olympic delegation means that a country cannot bring home many medals in women-only events.

That’s one reason China has been winning more medals recently than any country other than the United States. China’s Olympic athletes have been 51.1 percent women, giving it the highest female participation rate in the world.

Many Muslim nations, by contrast, have much lower female participation rates. Brunei, Qatar and Saudi Arabia included women in their Olympic squads for the first time at the 2012 Games in London.

Iran has 60 medals in the history of the Olympic Games, all won by men. If women had won another 60 medals, Iran would be on the same level as New Zealand or Spain, countries considered to be successful sporting nations. A study by Berdahl, Uhlmann and Bai based on the 2012 Summer Olympics and the 2014 Winter Olympics found that a nation’s gender equality significantly predicted its medal count.

2. Nations that “institutionalize” the promotion of Olympic sports tend to be more successful.

Such nations create a centralized system for identifying talented athletes, supporting them financially and with first-class training facilities, coaching and scientific expertise.

Soviet bloc countries pioneered such institutionalization in the 1960s and 1970s. Two contemporary examples are the Australian Institute of Sport (AIS) and the Norwegian Olympiatoppen (OT). The AIS and OT have such high-performance sport policies that scholars even called these agencies “medal factories.”

South Korea established a “Ministry of Sports” in 1983. Britain has had “Sport” in the title of a government department since 1997. After those institutions were launched, each country increased its Olympic medal share. And more nations have lately been creating government agencies to promote sports.

However, a nation can succeed at the Olympics without a dedicated government ministry. The United States relies on the U.S. Olympic Committee (USOC), a nonprofit organization that doesn’t receive federal funding, as the main body to promote elite sports.

3. Specializing in the sports (or adopting them early) in which the nation is most likely to medal.

Nations that focus on promoting sports where they’re most likely to win are more likely to bring home medals. Toward this end, countries have generally taken two strategies: Either promote sports in which the nation has long excelled or support sports newly added to the Olympics.

For instance, Australia has focused on its historic strengths, winning more than one-third of its Olympic medals in swimming. Meanwhile, since the Olympics added women’s weightlifting in 2000, China has invested in it heavily — and has won half of that sport’s gold medals.

Poorer or smaller countries tend to take a more targeted approach as well. For instance, Ethiopia invests in running, winning all 45 Olympic medals for the country in that sport, most of them in long-distance running. Jamaica has won all but three of its 68 Olympic medals in sprinting events. Cuba focuses on boxing, and has won 67 of its 209 summer Olympic medals in that sport.

Governments have to make a strategic decision to specialize. After a disappointing 1996 Olympics, Britain introduced a policy of concentrating public funding on sports in which it is likely to win medals. Since moving to this “all or nothing” approach, Britain jumped from 36th in the medal count in 1996 to the top five at both the 2008 (fourth) and 2012 Summer Olympics (third).

Even the United States has chosen to specialize. Since 2000, when the USOC started focusing its investments in sports where Americans are likely to win, the United States has increased its lead in the Olympic medal count. Today, USA Swimming receives far more USOC funding than USA Table Tennis — which fields no world-class athletes who would be able to bring home medals. Partly as a result, Michael Phelps has won 22 swimming medals for the United States (an Olympic record), with perhaps more to come in Rio.

Sweden and Finland have not specialized, and their medal counts show it. Both countries won most of their Olympic medals in the first half of the 20th century, and far fewer since. Because of a deeply rooted ideal of equality, they chose not to specialize when other countries launched that strategy, and they bring home fewer medals as a result.

In other words, wealth and size aren’t the only paths to Olympic victory. With the right policies, even the world’s Cubas and Ethiopias can decorate their athletes in gold.

Danyel Reiche is an associate professor of comparative politics at the American University of Beirut and the author of “Success and Failure of Countries at the Olympic Games” (Routledge 2016).