Brazil is a giant when it comes to soccer. In the late 1990s, it was a giant in another area, this one much less desirable: Brazil had one of the highest levels of income inequality in the world, as home to some of the world’s poorest people, while its richest competed with the wealthiest in the United States and elsewhere.

In 2001, Brazil’s Gini coefficient — the most common (but not necessarily most attractive) measure of inequality — hovered around 0.60, a very high figure by any standard. (A Gini coefficient of 0 represents perfect equality where everyone earns the same income, and 1 represents complete inequality where all the country’s income accrues to a single person.) By comparison, the U.S. — not exactly a bastion of equality — had a Gini coefficient of 0.4 in 2000.

But from 2001 to 2007, income inequality in Brazil started to decline at an unprecedented rate: The Gini coefficient fell from above 0.60 to below 0.55, reaching its lowest level in more than 30 years. The incomes of the poorest tenth of Brazilians grew by 7 percent per year, nearly three times the national average of 2.5 percent. In less than a decade, Brazil had managed to cut the proportion of its population living in extreme poverty in half.

This sharp decline coincided with the introduction of Brazil’s first cash transfer programs in 2001. Created to reduce poverty in the short-run, these programs also provided incentives to households to invest in their children’s education, health and nutrition. Brazil was following on the success of Mexico, which a couple of years earlier had introduced PROGRESA, perhaps the world’s best-known and most influential conditional cash transfer program. Brazil consolidated its programs into one program, called Bolsa Familia, in 2003.

Bolsa Familia targeted households whose per capita monthly income was less than 120 reais (a yearly income of $828). The government paid these households between 20 to 182 reais per month (between $132 to $1,248 a year) if they met certain conditions: Children under the age of 17 had to regularly attend school; pregnant women had to visit clinics for prenatal and antenatal care; and parents needed to make sure their children were fully immunized by age 5 and received growth check-ups until age 6. It also provided a small allocation to extremely poor households with no strings attached. By 2010, Bolsa Familia had grown to one of the world’s largest conditional cash transfer programs, providing 40 billion reais (about $24 billion) to nearly 50 million people, about a quarter of Brazil’s population.

So what role did Bolsa Familia play in the decline of inequality in Brazil since 2000? With such a large transfer of money from taxpayers to Brazil’s poorest, you’d imagine there must have been some impact, but how much of one? Identifying the causal effects of large, nationwide government programs is challenging. Many factors can affect the distribution of income over time. Shifting demographics, the changing nature of work, and women’s participation in the labor force can all affect income inequality. If you wanted to truly isolate Bolsa Familia’s effect, you could theoretically conduct an experiment — not unlike the trials that pharmaceutical companies routinely do to test a drug’s effectiveness — where you’d randomly assign some communities and not others to the cash transfer program, and then compare inequality between them.

However, this type of social experiment is hard, if not impossible, for governments to conduct for a long period of time. For example, Mexico did randomly assign some eligible communities to PROGRESA while withholding the benefits from other (equally eligible) communities at the start, but this pilot phase lasted only 18 months, after which the program was rolled out to all eligible areas. An 18-month period might have been sufficient to evaluate the effects of the program on children’s school attendance and women’s visits to health clinics, but it was too short a period to evaluate the program’s longer-term impacts on poverty and inequality. In any case, researcher Gala Diaz Langou says that leaving some areas out of the program was not politically feasible in Brazil, so there was no such experimentation with Bolsa Familia.

So if you can’t do a randomized trial, what can you do to assess the program’s effect on Brazil’s drop in income inequality? Economists often try to understand changes in income inequality by quantifying all the elements that affect the distribution of income, such as the proportion of adults who work, the number of hours they work, their hourly wages, whether they have income from other assets, and whether they’re receiving money from the government. Once income is broken down by source at a given point in time, researchers can try to isolate the role of each source in changes in the distribution of income by keeping that factor constant over time and allowing all the remaining factors to vary. While this approach doesn’t identify the causal effect of any one factor on changes in a country’s Gini coefficient, it’s still a useful accounting exercise — helpful in focusing on the main factors associated with the changes in the distribution of incomes.

Using this approach, two studies — a 2010 paper on Brazil (by Ricardo Barros and co-authors from Brazil’s Institute of Applied Economic Research) and a 2013 paper on a number of countries in Latin America including Brazil (by the World Bank’s Joao Pedro Azevedo and co-authors) — have separately found that government transfers accounted for about 40 percent of the decline in inequality in Brazil, with expansions in pensions and Bolsa Familia (and a related program for people with disabilities) contributing roughly equally to the decline in income inequality. However, of these government transfers, Bolsa Familia was by far the most important component in raising the income levels of Brazil’s poorest households: Between 2001 and 2007, the share of people receiving these conditional cash transfer payments increased by more than 10 percentage points, from 6.5 percent to 16.9 percent. This accounted for the entire increase in the share of households that received non-labor income (i.e. income from sources outside of working a job).

Hence, available estimates suggest that Bolsa Familia contributed about 15 to 20 percent of the decline in income inequality during the decade starting in 2000. These effects were most likely achieved by putting money directly into the pockets of poor households. Because the money is tied to parents’ investing more in their children’s health and education, advocates of the program hope these cash transfers will not only reduce poverty in real time, but keep the next generation from poverty as well. And it appears Bolsa Familia may also have had some success in this respect: Paul Glewwe of the University of Minnesota and Ana Lucia Kassouf of the University of Sao Paulo found in 2012 that the program has led to improvements in children’s school enrollment and advancement, which could translate into higher incomes for them as adults and further reductions in poverty and inequality.

But if Bolsa Familia only accounted for 15 to 20 percent of the drop in income inequality in Brazil, what contributed the most? The same two studies agree that rising wages among the poor were the main driver of the decline in inequality in Brazil. While their methodologies differ slightly, the studies show that changes in labor income accounted for 55 to 60 percent of the drop in income inequality.

And why did wages for the poor rise? Even before Bolsa Familia, the Brazilian government adopted policies that expanded access to education: Between 1995 and 2005, the average schooling among workers increased by almost two years. At the same time, the hourly wages for a worker with a given level of education rose much faster among the poor than the rest of the population, likely due to the increased demand for low-skilled labor that accompanied the commodity and price booms experienced in Brazil, and Latin America more generally, according to research by Leonardo Gasparini of the National University of La Plata in Argentina and co-authors. So, a combination of public policy (expansion of access to education and government transfers to the poor) and favorable market factors (rising wages for low-skilled workers) led to substantial declines in inequality in Brazil.

Income inequality in Brazil and Latin America remains high. Barros and his co-authors estimate that almost two more decades of similar progress is needed to bring income inequality in Brazil down to the world average. Expanding cash transfer programs like Bolsa Familia might be tough for the government, particularly in periods of tighter budgets. However, experimentation with these programs’ design (in Brazil and elsewhere) — for example, expanding Bolsa Familia benefits instead of pursuing continued increases in pensions for older Brazilians — can allow governments to maximize impacts while keeping a lid on program budgets.