Aliefs motivate us to take or withhold action. You might enjoy sweets, but would you eat a chocolate bar shaped like feces? Dr. Rozin and his colleagues showed that college students would not, though they knew it would not harm them. Our conscious beliefs tell us to shape up, use our wits and act rationally. But our subconscious aliefs set off deeply ingrained reactions that protect us from disease. The alief often wins.

We may have evolved to be this way — and that is not always a bad thing. We enter the world with innate knowledge that helped our evolutionary ancestors survive and reproduce. Babies know mother from stranger, scalding heat from soothing warmth. When we grow up, our minds cling to that knowledge and, without our awareness, use it to try to make sense of the world.

Can magical beliefs offer a window into the aggressive mind? My colleagues and I examined this idea in recent research published in the journal Aggressive Behavior. In one illustrative study, 529 married Americans were shown a picture of a doll and were told that it represented their spouse. They could insert as many pins into the doll as they wished, from zero to 51. Participants also reported how often they had perpetrated intimate partner violence, which included psychological aggression and physical assault.

Voodoo dolls can measure whether your romantic partner is “hangry” — that dangerous combination of hunger and anger. If we let our blood sugar drop, it becomes harder to put the brakes on our aggressive urges. In a study published in Proceedings of the National Academy of Sciences, we showed that on days when their blood sugar dropped, married people stabbed the voodoo doll with more pins.

Do people take the voodoo doll seriously? If they don’t, their responses should not relate to actual violent behavior. But they do. The more pins people used to stab the voodoo doll, the more psychological and physical aggression they perpetrated.

Stabbing a voodoo doll can also satisfy the desire for vengeance, another study found. When German students imagined an upsetting situation, they began to see the world through blood-colored glasses, increasing their tendency to ruminate on aggression-related thoughts. Stabbing a voodoo doll that represented the provocateur returned their glasses to their normal hue. By quenching their aggressive appetite, magical beliefs enabled provoked students to satisfy their aggressive goal without harming anyone.

Yes, children believe in magic because they don’t know any better. Peter Pan never grew up because he embraced magical beliefs. But such beliefs make for more than happy Halloweeners and children’s books. They give a glimpse into how the mind makes sense of the world.

We can’t overcome magical thinking. It is part of our evolved psychology. Our minds may fool us into thinking we are immune to magical thoughts. But we are only fooling ourselves. That’s the neatest trick of all.