ON SATURDAY, April 5th, South Africa was Africa’s largest economy. The IMF put its GDP at $354 billion last year, well ahead of its closest rival for the crown, Nigeria. By Sunday afternoon that had changed. Nigeria’s statistician-general announced that his country’s GDP for 2013 had been revised from 42.4 trillion naira to 80.2 trillion naira ($509 billion). The estimated income of the average Nigerian went from less than $1,500 a year to $2,688 in a trice. How can an economy grow by almost 90% overnight? Nigeria has a deserved reputation for corruption, so a sceptic might think the doubling of its economy a result of fiddling the numbers. In fact it is the old numbers that are dodgy. An economy’s real growth rate is typically measured by reference to prices in a base year. In Nigeria the reference year for the old estimate of GDP was 1990. The IMF recommends that base years be updated at least every five years. Nigeria left it far too long; as a result, its old GDP figures were hopelessly inaccurate.

The new figures use 2010 as the base year. Why was the upgrade so big? To come up with an estimate of GDP, statisticians need to add together estimates of output from a sample of businesses in every part of the economy, from farming to service industries. The weight they give to each sector depends on its importance to the economy in the base year. A snapshot of Nigeria’s economy in 1990 gave little or no weight to fast-growing parts of the economy such as mobile telephony or the movie industry. At the time the state-owned telephone company had a few hundred thousand customers. Today the country has 120m mobile-phone subscriptions. On the old 1990 figures, the telecoms sector was less than 1% of GDP; it is now almost 9% of GDP. Motion pictures had not shown up at all in the old figures, but the industry’s size is now put at 1.4% of GDP. Nigeria’s number-crunchers have improved the gathering of statistics in other ways. The old GDP figures were based on an estimate of output. The new figures are cross-checked against separate surveys of spending and income. The sample on which the data are based has increased from around 85,000 establishments to 850,000. Only businesses with a fixed location are included: the traders who weave precariously between the traffic are not captured. Even so, many small businesses are now part of the GDP picture.

Of course, Nigerians are no richer than they were on Saturday night. The majority of the country's 170m people live on less than a dollar a day. What the revised GDP figures show is that its economy is far more than just an oil enclave, exporting crude to pay for imported goods from richer countries. The oil industry’s share of GDP is now put at just 14%, compared with 33% according to the old figures. Manufacturing is much larger than previously thought. Services are booming. It is still a tough place in which to do business. But any company or investor who wants exposure to Africa’s fast-growing markets cannot afford to pass the continent’s largest economy by.

Dig deeper:

How do countries calculate GDP? The Economist explains (March 2014)

The sacking of Nigeria's central-bank chief has reversed the country's recent progress (March 2014)

Nigeria, Africa's giant, is waking up, but still looks unsteady on its feet (April 2013)