People who aren’t afraid of death have all sorts of different jobs, hobbies and lives, but one thing they tend to have in common is confidence in their faith. Or lack thereof.

A study in Religion, Brain & Behavior says fearing death happens in a curve, with religiously observant people on one side and staunch atheists on the other. Smack in between those two groups are the undecideds, and the amount of fear reaches its peak in that middle, before dropping down as it nears one of the two extremes.

Read: Look Into the Face of a Mummy

In other words, you are more anxious about death the less certain you are about religion — either that you have faith in a higher power and an afterlife or that there is no God.

The researchers on this study analyzed previous international studies on the matter to come to their conclusion. One of the nuances of their findings was that some people who believed in a religion on the basis of actual faith were not very anxious about dying, while people who followed a religion for social reasons did not have that same experience, according to the University of Oxford. Of the 100 studies researchers looked at, most of them from the United States, some had some conflicting results. They showed the idea of religion easing the fear of death may differ depending on the religious and cultural context.

“Religion has long been thought to be a solution to the problem of death,” the university said.

But then why would atheists also have the same ease regarding their own mortality?

“It may well be that atheism also provides comfort from death,” researcher Jonathan Jong said in the Oxford statement, “or that people who are just not afraid of death aren’t compelled to seek religion.”

See also:

How Do You Know if Someone Is Really Dead?

Can Chimps Live As Long As Humans?