The Economist has recalculated the result, weighting it by the 27 states' GDP rather than their population of eligible voters. If reais of output went to the polls instead of citizens (which they thankfully do not in a democracy), Mr Neves would beat Ms Rousseff by 53% to 47% (see pie charts). But in the actual result, she scampered to victory across swathes of the poor north and north-east—supported by less fortunate Brazilians’ gratitude for the popular social programmes implemented under her Workers’ Party, which has been in power since 2003.

AFTER a rollercoaster of a race, which saw the tragic death of one candidate and repeated surges by others, Dilma Rousseff was re-elected Brazil’s president on October 26th with 51.6% of the vote (see map). Her three-percentage point advantage over Aécio Neves, leader of the centre-right opposition, was the slimmest in Brazilian electoral history. As a result, Ms Rousseff will lead a riven country.

Most of the richer central and southern parts of the country plumped convincingly for her market-friendly rival. In São Paulo, home to one-fifth of Brazil’s people and a third of its economy, Mr Neves' Party of Brazilian Social Democracy won by 64% to 36%. In the most affluent south-east Mr Neves lost only in Rio de Janeiro and Minas Gerais, Brazil’s second-biggest state where he served two successful terms as governor in 2003-10—a defeat that may have cost him the presidency. Our analysis of the election result is here. A look at Brazil's economy is here.