Unless we are contestants on “Survivor” or “The Hunger Games,” threats we face tend to be less dramatic than a life-or-death maze, and we have the anxiety dreams to match. The exam dream — in which a dreamer is woefully unprepared, and perhaps underdressed, for an important test — is the prototypical modern-human version of the racing-rat or hunting-cat dream.

Even if the person fails in the dream, the test seems familiar in real life — and the illusion of familiarity can translate into a real advantage. My own exam dreams are simultaneously boring to reproduce and pulse-quickening to remember. “I’m leaving the test center and realize I forgot to write any essays.” “I’m taking my exams and then I remember I’m not wearing pants.”

These nightmares come years after I’ve left school, but they pop up when I’m worried about something else, like a looming deadline. Some psychologists believe that in times of stress, we dream about exams that we actually succeeded in; our brains are reminding us of a time when we prevailed over something we had feared, boosting our confidence.

In reality, I wore clothes to my college finals and didn’t leave them blank. But mulling over the worst-case scenarios in the light of day forces me to recognize how unlikely, even ridiculous, they are; confronting them saps them of their power to terrify and even makes me laugh. I wake with a sigh of relief — no matter how unprepared I feel for this meeting, at least I won’t turn up naked.

In 2014, researchers from the Sorbonne, led by a neurologist, Isabelle Arnulf, contacted a group of aspiring doctors on the day they were scheduled to take their medical school entrance exam. Nearly three-quarters of the 719 students who replied said they had dreamed about the exam at least once over the course of the semester, and almost all of those dreams had been nightmares: They got lost on their way to the test center, found it impossible to decipher the test questions or realized they were writing in invisible ink. When Dr. Arnulf compared students’ dreaming patterns with their grades, she discovered a striking relationship: Students who dreamed more often about the test performed better in real life. Most suggestive, all of the top five students had encountered some exam-related obstacle in their dreams, like sleeping through their alarm or running out of time.