The Haunted House is a time-honored horror setting. All of us have shivered our way through spooky flicks such as The Haunting, The Amityville Horror, The Sentinel and Poltergeist.

It’s not only at the movies that we pay good money to frighten ourselves to death: commercial haunted houses are an integral part of 21st-century Halloween theater, with an estimated 5,000 such attractions operating in the United States each year.

The portrayal of cinematic haunted houses has remained remarkably consistent across time, and the architects of our annual macabre Halloween rituals incorporate all of the same bells and whistles (okay – creaks and groans) that we’ve come to expect.

From a psychological point of view, the standard features of haunted houses trigger feelings of dread because they push buttons in our brains that evolved long before houses even existed. These alarm buttons warn us of potential danger and motivate us to proceed with caution.

Haunted houses give us the creeps not because they pose a clear threat to us, but rather because it is unclear whether or not they represent a threat.

This ambivalence leaves you frozen in place, wallowing in unease.

For example, it would be considered bizarre and embarrassing to run screaming out of a house that makes you feel uneasy if there is actually nothing to fear. On the other hand, it could be perilous to ignore your intuition and remain in a place that is dangerous.

These are the psychological mechanisms behind feeling “creeped out.” They may be useful if they help you maintain vigilance when threat is uncertain. They also help you manage the balance between self-preservation and self-presentation (ie, presenting yourself in a socially desirable way).

While human psychology can explain what makes a haunted house so scary, it also provides the perfect guide to making one ourselves.

Things that trigger our ‘agent detection’ mechanisms

Evolutionary psychologists have proposed the existence of agent detection mechanisms – or processes that have evolved to protect us from harm at the hands of predators and enemies.

If you’re walking through the woods alone at night and hear the sound of something rustling in the bushes, you’ll respond with a heightened level of arousal and attention. You’ll behave as if there is a willful “agent” present who is about to do you harm.

If it turns out to be a gust of wind or a stray cat, you lose little by overreacting. But if you fail to activate the alarm response and a true threat is present – well, the cost of your miscalculation could be high.

Thus, we evolved to err on the side of detecting threats in ambiguous situations. Things that activate hypervigilance for malevolent supernatural (or natural) agents abound in large, drafty old houses: rattling or creaking sounds in upstairs rooms; the sighing and moaning of wind passing through cracks; ragged curtains fluttering in the breeze; echoes; and cold spots.

Feeling trapped

Research has consistently shown that we need more personal space while seated than while standing, more space when we are in the corner of a room rather than in the center of it and more space in rooms with low ceilings.

We feel uncomfortable when our personal space is violated anywhere, but especially so in situations where we feel as if escape will become difficult.

Such feelings of discomfort are symptomatic of the fact that we are constantly – even if unconsciously – scanning our surroundings and assessing our ability to flee if it should become necessary.

Consequently, a haunted house is our worst nightmare.

The prototypical haunted house is in a remote, isolated location, far removed from the rest of society (think of the off-season resort hotel inThe Shining, for example). If bad things do happen, help would be a long time coming, even if communication with the outside world were possible. (Conveniently, in old horror movies the telephones always stop working.)