(Note: This post is by Will Rayner, a former student of mine who graduated from Stanford University last year.)

Statistics can be misleading, particularly in regard to international country-by-country comparisons. We all know that. And yet governments, institutions, and corporations rely on these statistics every day.

GDP per capita—just to pick an example—is often used as shorthand for a country’s level of economic development, and it can influence everything from investment decisions to wealth redistribution programs. But can this statistic be trusted?

Take the case of Luxembourg, often cited as the world’s wealthiest nation. Luxembourg ranks first among all non-microstate nations by all four major publishers of nominal[1] GDP per capita figures (the IMF, World Bank, CIA World Factbook, and United Nations). According to the IMF, Luxembourg had a nominal GDP per capita figure in 2013 of $110,423; by way of comparison, the United States clocks in with a seemingly meager $53,101.

By all accounts Luxembourg is indeed a prosperous place, but Luxembourg’s wildly impressive GDP measurements are misleading—very misleading. As it turns out, Luxembourg is not far wealthier than its neighbors, nor does it harbor mysteriously super-productive workers. The secret to Luxembourg’s amazing economic success (on paper, that is) is the country’s small size and its location at the crossroads of France, Germany, and Belgium.

This is a strategic location indeed. Perhaps, the reader may guess, Luxembourg’s phenomenal GDP per capita is generated by linking trade between these three larger countries; perhaps it is generated by Luxembourg’s status as a popular destination for French and German holidaymakers; or perhaps it is a result of Luxembourg serving as a financial haven for foreigners. Although these are reasonable guesses, in actuality Luxembourg’s wealth figure is largely a misleading artifact of the way GDP per capita is calculated.

GDP per capita is a very simplistic metric produced by diving a country’s total GDP by its total population. This works well as a rough gauge for most countries, but Luxembourg presents an interesting distortion of GDP per capita for a unique reason: a very large percentage of its workforce commutes into Luxembourg daily but actually lives in the surrounding countries of France, Germany, and Belgium.

According to a 2012 employment report, an astonishing 44% of Luxembourg’s workforce commutes across the border. Of the 355,800 total workers in the country, 78,500 commute in from France, followed by 39,400 from Belgium and 39,100 from Germany.

This map of commuter flows from 2008 illustrates another trend: the flows of Luxembourg’s own residents commuting out into the surrounding countries are tiny fractions of the inward flux (for example, 68,600 workers commuted in from the Lorraine region of France, while only 200 Luxembourgers made the opposite commute).

This one-sided commuting trend suggests, in short, that Luxembourg’s GDP per capita calculation is performed with a numerator that does not match its denominator. Nearly half of the country’s economic activity is generated by foreign workers, but those workers—and their families—live outside Luxembourg and thus are not counted as part of its population in the calculation.

Data from a 2010 survey reveals that the average gross income per employed household member residing within Luxembourg is €48,876; the average income for an employed commuter household member is €41,356. We can see, then, that commuters earn nearly as much as native Luxembourgers (about 85% as much, according to this set of statistics). A rough back-of-the-envelope calculation, assuming that 44% of Luxembourg’s workforce is made up of commuters earning 85% as much as resident Luxembourgers, would suggest that around 37% of Luxembourg’s economic output is generated by commuters.

Using this 37% figure, we can make a very simplistic estimation: Luxembourg’s “true” GDP per capita figure (with the 37% of GDP from commuters removed) would be about 63% of $110,423, yielding a figure of about $70,000. This would drop the country to fifth in the world according to the IMF table—still a very wealthy country, of course, but no longer boasting a GDP per capita twice that of the United States.

Luxembourg is a wealthy country no matter how we compute the statistics, but this case serves as an interesting reminder that international comparisons should be taken with quite a grain of salt.

[1] Note that per capita GDP in Purchasing Power Parity (PPP) rather than nominal terms provides different figures, which are generally lower for countries (such as Luxembourg) that have high costs of living. In these tables, Luxembourg is usually second to Qatar in regard to non-micro-states.