Even the thought of it is just the worst. The sound of nails dragging on a chalkboard makes you wonder why they ever invented chalk, or fingernails. As difficult as the sound is for our ears to bear, scientists who study the brain like to figure out why these quirks of psychological agony are so viscerally awful.

Evolution may be to blame, as well as a bit of self-deception. For one, the actual sound of nails on a chalkboard falls within the band of mid-range frequencies that get amplified by the human ear, around 2,000 to 4,000 Hz. Some have speculated that our aversion to sharp or rough sounds traces back to our ancient imperative to avoid getting mauled by scary tigers, and nails on a chalkboard sounds an awful lot like primate warning sounds. Modern-day scientists aren’t so sure.

In 2011, European musicologists Michael Oehler and Christoph Reuter had 24 people listen to a variety of unpleasant sounds. Participants were hooked up to heart monitors, galvanic skin response monitors, and sweat monitors, and each was asked to rate the sounds on a six-point scale of unpleasantness. Unbeknownst to the participants, half the group were told the exact sources of the sounds, while the other were told they came from a performance art piece. Oehler and Reuter wondered something fundamental about revulsion: Is it all in our heads?

Their study showed people who knew where the sound actually came from rated them as more unpleasant, even though physiological signs showed similar responses. A change in context seemed to change how the sound was processed in the brain, which suggests the sound isn’t entirely what we hate. It’s literally the nails on the chalkboard.