Evolutionary psychology of religion
The evolutionary psychology of religion is the study of religious belief using evolutionary psychology principles. It is one approach to the psychology of religion. As with all other organs and organ functions, the brain and cognition's functional structure have been argued to have a genetic basis, and are therefore subject to the effects of natural selection and evolution. Like other organs and tissues, this functional structure should be universally shared amongst humans and should solve important problems of survival and reproduction. Evolutionary psychologists seek to understand cognitive processes, religion in this case, by understanding the survival and reproductive functions they might serve.
Mechanisms of evolution 
There is general agreement among scientists that a propensity to engage in religious behavior evolved early in human history. However, there is disagreement on the exact mechanisms that drove the evolution of the religious mind. There are two schools of thought. One is that religion itself evolved due to natural selection and is an adaptation, in which case religion conferred some sort of evolutionary advantage. Alternatively, religious beliefs and behaviors may have emerged as by-products of other adaptive traits without initially being selected for because of their own benefits.
Religious behavior often involves significant costs including economic costs, celibacy, dangerous rituals, or by spending time that could be otherwise used. This would suggest that natural selection should act against religious behavior unless it or something else causing religious behavior have significant advantages.
Religion as an adaptation 
Richard Sosis and Candace Alcorta have reviewed several of the prominent theories for the adaptive value of religion. Many are "social solidarity theories", which view religion as having evolved to enhance cooperation and cohesion within groups. Group membership in turn provides benefits which can enhance an individual's chances for survival and reproduction.
These social solidarity theories may help to explain the painful or dangerous nature of many religious rituals. Costly-signaling theory suggests that such rituals might serve as public and hard to fake signals that an individual's commitment to the group is sincere. Since there would be a considerable benefit in trying to cheat the system - taking advantage of group living benefits without taking on any possible costs - the ritual would not be something simple that can be taken lightly. Warfare is a good example of a cost of group living, and Richard Sosis, Howard C. Kress, and James S. Boster carried out a cross-cultural survey which demonstrated that men in societies which engage in war do submit to the costliest rituals.
Studies that show more direct positive associations between religious practice and health and longevity are more controversial. Harold G. Koenig and Harvey J. Cohen summarized and assessed the results of 100 evidence-based studies that systematically examined the relationship between religion and human well-being, finding that 79% showed a positive influence. These studies are popular in the media, as seen in a recent NPR program including University of Miami Professor Gail Ironson's findings that belief in God and a strong sense of spirituality were good predictors of a lower viral load and improved immune cell levels in HIV patients. However, Dr. Richard P. Sloan of Columbia University was quoted in the New York Times as saying that "...there is no really good compelling evidence that there is a relationship between religious involvement and health.". There is still debate over the validity of these findings, and they do not necessarily prove a direct cause-and-effect relationship between religion and health. Mark Stibich claims there is a clear correlation but the reason for it is unclear.  A criticism of such placebo effects, as well as the advantage of religion giving a sense of meaning, is that it seems likely that less complex mechanisms than religious behavior could achieve such goals.
Religion as a by-product 
Stephen Jay Gould cites religion as an example of an exaptation or spandrel, but he does not himself select a definite trait which he thinks was actually acted on by natural selection. He does, however, bring up Freud's suggestion that our large brains, which evolved for other reasons, led to consciousness. The beginning of consciousness forced humans to deal with the concept of personal mortality. Religion may have been one solution to this problem.
Other researchers have proposed specific psychological processes which may have been co-opted for religion. Such mechanisms may include the ability to infer the presence of organisms that might do harm (agent detection), the ability to come up with causal narratives for natural events (etiology), and the ability to recognize that other people have minds of their own with their own beliefs, desires and intentions (theory of mind). These three adaptations (among others) allow human beings to imagine purposeful agents behind many observations that could not readily be explained otherwise, e.g. thunder, lightning, movement of planets, complexity of life, etc.
Pascal Boyer suggests, in his book Religion Explained, that there is no simple explanation for religious consciousness. He builds on the ideas of cognitive anthropologists Dan Sperber and Scott Atran, who argued that religious cognition represents a by-product of various evolutionary adaptations, including folk psychology. He argues that one such factor is that it has, in most cases, been advantageous for humans to remember "minimally counter-intuitive" concepts which are somewhat different from the daily routine and somewhat violate innate expectations about how the world is constructed. A god that is in many aspects like humans but much more powerful is such a concept while the often much more abstract god discussed at length by theologians is often too counter-intuitive. Experiments support that religious people think about their god in anthropomorphic terms even if this contradicts the more complex theological doctrines of their religion.
Pierre Lienard and Pascal Boyer suggest that humans have evolved a "hazard-precaution system" which allows us to detect potential threats in the environment and attempt to respond appropriately. Several features of ritual behaviors, often a major feature of religion, are held to trigger this system. These include the occasion for the ritual, often the prevention or elimination of danger or evil, the harm believed to result from nonperformance of the ritual, and the detailed proscriptions for proper performance of the ritual. Lienard and Boyer discuss the possibility that a sensitive hazard-precaution system itself may have provided fitness benefits, and that religion then "associates individual, unmanageable anxieties with coordinated action with others and thereby makes them more tolerable or meaningful".
Justin L. Barrett in Why Would Anyone Believe in God? suggests that belief in God is natural because it depends on mental tools possessed by all human beings. He suggests that the way our minds are structured and develop make belief in the existence of a supreme god with properties such as being superknowing, superpowerful and immortal highly attractive. He also compares belief in God to belief in other minds, and devotes a chapter to looking at the evolutionary psychology of atheism. He suggests that one of the fundamental mental modules in the brain is the Hyperactive Agency Detection Device (HADD), another potential system for identifying danger. This HADD may confer a survival benefit even if it is over-sensitive: it is better to avoid an imaginary predator than be killed by a real one. This would tend to encourage belief in ghosts and spirits.
Richard Dawkins suggests in The Selfish Gene that cultural memes function like genes in that they are subject to natural selection. In The God Delusion Dawkins further argues that because religious truths cannot be questioned, their very nature encourages religions to spread like "mind viruses". In such a conception, it is necessary that the individuals who are unable to question their beliefs are more biologically fit than individuals who are capable of questioning their beliefs. Thus, it could be concluded that sacred scriptures or oral traditions created a behavioral pattern that elevated biological fitness for believing individuals. Individuals who were capable of challenging such beliefs, even if the beliefs were enormously improbable, became rarer and rarer in the population. (See denialism.)
This model holds that religion is the byproduct of the cognitive modules in the human brain that arose in our evolutionary past to deal with problems of survival and reproduction. Initial concepts of supernatural agents may arise in the tendency of humans to "overdetect" the presence of other humans or predators (momentarily mistaking a vine for a snake). For instance, a man might report that he felt something sneaking up on him, but it vanished when he looked around.
Stories of these experiences are especially likely to be retold, passed on and embellished due to their descriptions of standard ontological categories (human, artifact, animal, plant, natural object) with counterintuitive properties (humans that are invisible, houses that remember what happened in them, etc.). These stories become even more salient when they are accompanied by activation of non-violated expectations for the ontological category (houses that "remember" activates our intuitive psychology of mind; i.e. we automatically attribute thought processes to them).
One of the attributes of our intuitive psychology of mind is that humans are interested in the affairs of other humans. This may result in the tendency for concepts of supernatural agents to inevitably cross connect with human intuitive moral feelings (evolutionary behavioral guidelines). In addition, the presence of dead bodies creates an uncomfortable cognitive state in which dreams and other mental modules (person identification and behavior prediction) continue to run decoupled from reality producing incompatible intuitions that the dead are somehow still around. When this is coupled with the human predisposition to see misfortune as a social event (as someone's responsibility rather than the outcome of mechanical processes) it may activate the intuitive "willingness to make exchanges" module of the human theory of minds resulting in the tendency of humans to try to interact and bargain with their supernatural agents (ritual).
In a large enough group, some individuals will seem better skilled at these rituals than others and will become specialists. As the societies grow and encounter others, competition will ensue and a "survival of the fittest" effect may cause the practitioners to modify their concepts to provide a more abstract, more widely acceptable version. Eventually the specialist practitioners form a cohesive group or guild with its attendant political goals (religion).
Biological mechanisms causing religiosity 
The God gene hypothesis proposes that a specific gene (VMAT2) predisposes humans towards spiritual or mystic experiences. Proponent Dean Hamer see this predisposition as increasing optimism which has positive effects on other factors such as health and reproductive success.
Also, any gene that contributes to denialism allows an otherwise preposterous meme to increase in frequency as long as the resulting behavior increases biological fitness. The individual simply denies that the meme is untrue, behaves as if it were, and benefits from the elevated fitness. While general intelligence and denialism are inversely related, the two are not directly related. A highly intelligent individual can become a denier, though this more rarely occurs.  It is worth noting that while denialism can have a genetic origin, there are other reasons someone might become a denier. For instance, a psychopath may deny climate change because he or she does not care what happens to the world or anyone else in it. However, it is fallacious to assume that all such deniers are psychopaths, and in fact, most of them probably are not. Only about 1 in 25 people in the United States suffer from anti-social personality disorder, and far fewer suffer from this malady in less individualistic cultures, such as those in East Asia.  One can see how a religious adherence to ideas can be beneficial to the individual by imagining, for instance, the behavioral result of denying overpopulation.
One such genetic trait that could cause denialism is any trait that enhances the ego. A genetic propensity to be egotistical may have evolved or increased in frequency dramatically after the advent of religion. Once the individual has invested in believing the memes, ego causes him or her not to be able to question them. Doing so would be to admit having been wrong, which is a threat to the ego.
It was aforementioned that most deniers are probably not psychopaths. The model is, however, a more complex than that. What is a psychopath if he or she is not an individual who is completely egotistical? And, in fact, one might predict that psychopaths could hide under the assumptions of religion, since even a complete narcissist does not wish to go to hell. In this way, a genetic propensity to be egotistical, as well as a genetic propensity to be psychopathic, may have increased in frequency dramatically after the advent of religion. However, scientific studies have yet to come to a conclusion about this topic.
See also 
- Cognitive fluidity
- Cognitive science of religion
- Evolutionary origin of religions
- Genetic fallacy
- Origin of morality
- Psychology of religion
- Attachment theory and psychology of religion
- The Oxford Handbook of Evolutionary Psychology, Edited by Robin Dunbar and Louise Barret, Oxford University Press, 2007, Chapter 44 The Evolution of Religion by Joseph A. Bulbulia
- Sosis, R.; Alcorta, C. (2003). "Signaling, solidarity, and the sacred: the evolution of religious behavior". Evolutionary Anthropology 12 (6): 264–274. doi:10.1002/evan.10120.
- Sosis, R.; Kress, H. C.; Boster, J. S. (2007). "Scars for war: evaluating alternative signaling explanations for cross-cultural variance in ritual costs". Evolution and Human Behavior 28 (4): 234–247. doi:10.1016/j.evolhumbehav.2007.02.007.
- Koenig, Harold G.; Cohen, Harvey J. (2001). The Link between Religion and Health: Psychoneuroimmunology and the Faith Factor. Oxford: Oxford University Press. ISBN 0-19-514360-4.
- Hagerty, Barbara (2009). "Can Positive Thoughts Help Heal Another Person?". National Public Radio. Retrieved 2009-12-19.
- Duenwald, Mary (May 7, 2002). "Religion and Health: New Research Revives an Old Debate". New York Times. Retrieved 2009-12-19.
- Gould, S. J. (1991). "Exaptation: a crucial tool for an evolutionary psychology". Journal of Social Issues (47): 43–65.
- Atran, S; Norenzayan, A (2004). "Religion's Evolutionary Landscape [[Scott Atran]] Ara Norenzayan". The Behavioral and brain sciences (Behavioral and Brain Sciences) 27 (6): 713–30; discussion 730–70. PMID 16035401. Wikilink embedded in URL title (help)
- Lienard, P.; Boyer, P. (2006). "Whence collective rituals? A cultural selection model of ritualized behavior". American Anthropologist (108): 824–827.
- Barrett, Justin L. "3". Why Would Anyone Believe in God. ISBN 0-7591-0667-3.
- Guthrie, Stewart Elliot (1995). Faces in the Clouds: A New Theory of Religion. Oxford University Press. ISBN 0-19-506901-3.
- Boyer, Pascal. "Functional Origins of Religious concepts". Retrieved 2009-12-19.
- Boyer, Pascal (2001). Religion Explained: The Evolutionary Origins of Religious Thought. Basic Books. ISBN 0-465-00695-7.
- Martel, Francis. "Study Suggests Low IQ, Social Conservatism, And Prejudice Go Hand In Hand". mediaite. Retrieved 6 October 2012.
- Stout, Martha (2006). The sociopath next door : the ruthless versus the rest of us (1st ed. ed.). New York: Broadway Books. ISBN 0767915828.
- Shay, Kylyssa. "Is Overpopulation a Myth?". yahoo contributor network. Retrieved 6 October 2012.
Further reading 
- Robert Wright´s "The Evolution of God"
- Stewart Guthrie Faces in the clouds A New Theory of Religion ISBN 0-19-509891-9.
- Evolutionary psychology of religion Steven Pinker.
- Adaptations, Exaptations, and Spandrels
- Attachment, Evolution, and the Psychology of Religion ISBN 1-59385-088-3
- Atran, Scott In Gods We Trust: The Evolutionary Landscape of Religion ISBN 0-19-517803-3
- Religious thought and behaviour as by-products of brain function Pascal Boyer
- Minds and Gods: The Cognitive Foundations of Religion By Todd Tremlin, 2006 ISBN 0-19-530534-5