A new study by Pew Research analyzes data from more than 40,000 people in 40 countries who were asked this provocative question: “Do you need God to be moral?” It is of course a staple of religious thought that without religion, the world would be morally anarchic; as Ivan Karamazov famously said in Dostoyevsky’s novel, “If God does not exist, everything is permitted.”

But Pew’s question has already been answered by philosophers and sociologists with a resounding “no.” Beginning with Plato’s Euthyphro argument, most thinking people have realized that God’s nature and desires cannot in principle be sources of morality (in such a case anything God dictated would be moral regardless of its content), but that religion merely codifies and promulgates moral sentiments derived from evolution, reason, and other secular sources. And of course there are millions of nonbelievers who lead ethical lives, not to mention the many countries in Europe whose citizens are largely irreligious but somehow keep their societies from falling into the abyss. Finally, despite the loosening grip of religion on much of the world, nearly every index of morality, as Steven Pinker shows in The Better Angels of our Nature, is on the rise.

Pew’s poll, however, found that citizens of most countries see God as a requirement for morality, but that this answer is far more common in poorer than richer countries. Here are Pew’s data broken down by country:

As you see, the wealthier countries of Europe and Asia have fairly high proportions of people who reject the notion that God is necessary for morality, while Sub-Saharan Africa and the Middle East (with the exception of Israel) show much stronger opinions that goodness requires godliness. Much of Latin America is also in line with that view. Note that Americans agree with Pew’s question more frequently (53 percent) than do citizens of any surveyed European country, while our more sensible Canadian friends agree much less often (31 percent)

Pew also plotted the proportion of people in each country who see belief in God as necessary for morality against the “wealth” of that country (expressed as per capita gross domestic product). As you see below, the correlation is strong and statistically significant. Clearly, those who live in richer countries see a weaker connection between religion and morality. There are two outliers, though (circled in the plot). As Pew notes: