Researchers have determined that thinking about God can help relieve anxiety associated with making mistakes. However, the finding only holds for people who believe in a God.

The researchers measured brain waves for a particular kind of distress response while participants made mistakes on a test.

Those who had been prepared with religious thoughts had a less prominent response to mistakes than those who hadn’t.

“Eighty-five percent of the world has some sort of religious beliefs,” says Michael Inzlicht, who cowrote the study with Alexa Tullett, both at the University of Toronto-Scarborough.

“I think it behooves us as psychologists to study why people have these beliefs; exploring what functions, if any, they may serve.”

With two experiments, the researchers showed that when people think about religion and God, their brains respond differently—in a way that lets them take setbacks in stride and react with less distress to anxiety-provoking mistakes.

Participants either wrote about religion or did a scrambled word task that included religion and God-related words.

Then the researchers recorded their brain activity as they completed a computerized task—one that was chosen because it has a high rate of errors.

The results showed that when people were primed to think about religion and God, either consciously or unconsciously, brain activity decreases in areas consistent with the anterior cingulate cortex (ACC). The ACC is associated with a number of things, including regulating bodily states of arousal and alerting us when things are going wrong.

Interestingly, atheists reacted differently. When they were unconsciously primed with God-related ideas, their ACC increased its activity. The researchers suggest that for religious people, thinking about God may provide a way of ordering the world and explaining apparently random events and thus reduce their feelings of distress.

In contrast, for atheists, thoughts of God may contradict the meaning systems they embrace and thus cause them more distress.

“Thinking about religion makes you calm under fire. It makes you less distressed when you’ve made an error,” says Inzlicht.

“We think this can help us understand some of the really interesting findings about people who are religious. Although not unequivocal, there is some evidence that religious people live longer and they tend to be happier and healthier.”

Atheists shouldn’t despair, though. “We think this can occur with any meaning system that provides structure and helps people understand their world.” Maybe atheists would do better if they were primed to think about their own beliefs, he says.

The study is published in Psychological Science, a journal of the Association for Psychological Science.