This “benign violation” theory of humor is central to The Humor Code, which Warner and McGraw, a professor at the University of Colorado at Boulder, researched by digging into comedy trends around the world. The book comes out on April 1 (obviously).

McGraw’s thinking expands on the work of Stanford psychologist Thomas Veatch, which in turn builds on past explanations about why we laugh. Great thinkers have been trying for centuries to figure out the evolutionary purpose of comedy. The theories that have emerged are all very different, but one thing they share is a tendency to hint at the art form's shadowy side.

Hobbes and Plato took the playground perspective, suggesting that making fun helps us feel superior to others. Kant and later psychologists though it was about a cognitive shift that moves a serious situation into playful territory. In 1905, Freud suggested that humor was the fun-loving id making itself known despite the protestations of the conformist superego.

A few years ago, psychologist Daniela S. Hugelshofer suggested that humor acts as a buffer against depression and hopelessness. And evolutionary psychologists have suggested that humor is a way to subtly outshine our competitors for mates. Nothing says “pick me” like having an entire office/bar/dorm double over at your imitation of Shosh from Girls.

These approaches have a lot in common, though: You can’t make a joke without inserting a wicked twist, and you can’t be a comedian without holding a small amount of power, for even a short period of time, over the audience.

And if that’s the case, is there something about the psychology of comedians that makes them better able to tap into these “violations”? Do they enjoy wielding that kind of power? Or do funny people just know something the rest of us don’t?

***

One of McGraw’s favorite quotes is from Mark Twain: “The secret source of humor itself is not joy, but sorrow. There is no humor in heaven.”

It’s this juxtaposition of injury and cheer that McGraw has studied in depth, both in his book and at the University of Colorado at Boulder’s Humor Research Lab (acronym: HURL).

“Humor is something people inherently enjoy,” he told me. “But there also needs to be something wrong, unsettling, and threatening in some way. We call those violations.”

Our caveman ancestors lived in a world rife with physical threats. There was relief in discovering that a rustling in the darkness was a mouse rather than a saber-toothed tiger.

“Before people could speak, laughter served as a signaling function,” McGraw explained. “As if to say, ‘this is a false alarm, this is a benign violation.’”

Tickling, the basic form of humor that even non-verbal primates use, is a perfect example: “There's a threat there, but it's safe,” McGraw said. “It's not too aggressive and it's done by someone you trust.”