Laughing doesn't make you a bad person—just a smart one.

shutterstock /pio3

A man walks into a rooftop bar and takes a seat next to another guy. “What are you drinking?” he asks the guy.

“Magic beer,” he says.

“Oh, yeah? What’s so magical about it?”

Then he shows him: He swigs some beer, dives off the roof, flies around the building, then finally returns to his seat with a triumphant smile.

“Amazing!” the man says. “Lemme try some of that!” The man grabs the beer. He downs it, leaps off the roof —and plummets 15 stories to the ground.

The bartender shakes his head. “You know, you’re a real jerk when you’re drunk, Superman.”

Let’s ignore for a moment whether or not that poor rube survived his fall (if it makes you feel better, let’s say Trampoline Man was waiting for him on the ground). The real question is: Did you find this joke funny? Sick? Maybe a little of both?

According to a new study published in the journal Cognitive Processing, your reaction could indicate your intelligence. In the paper, a team of psychologists concludes that people who appreciate dark humor—defined as “humor that treats sinister subjects like death, disease, deformity, handicap or warfare with bitter amusement and presents such tragic, distressing or morbid topics in humorous terms”—may have higher IQs, show lower aggression, and resist negative feelings more effectively than people who turn up their noses at it.

To test this correlation between sense of humor and intellect, researchers had 156 male and female participants read 12 bleak cartoons from The Black Book by German cartoonist Uli Stein. (One of them, which paraphrases a classic joke, shows a mortician reaching deep into a cadaver as a nurse muses, “The autopsy is finished; he is only looking for his wrist watch.”) Participants indicated whether they understood each joke and whether they found it funny, then took some basic IQ tests and answered questionnaires about their mood, aggressive tendencies, and educational background.

The results were remarkably consistent: Participants who both comprehended and enjoyed the dark humor jokes showed higher IQs, and reported less aggressive tendencies, than those who did not. Incidentally, the participants who least liked the humor showed the highest levels of aggression and the worst moods of the bunch. The latter point makes sense when you consider the widely-studied health benefits of laughter and smiling; if you aren’t able to greet negativity with playful optimism, of course you will feel worse.

But what about the link to intelligence? According to the researchers, processing dark humor jokes takes a bit more mental gymnastics than, say, processing a knock-knock joke—it’s “a complex information-processing task” that requires parsing multiple layers of meaning, while creating a bit of emotional distance from the content so that it registers as benign instead of hostile. That emotional maneuvering is what sets dark humor jokes apart from, say, puns, which literally pit your brain’s right and left hemispheres against each other as you process a single word’s multiple meanings, but usually don’t force you out of your emotional comfort zone. Tina Fey sums up the difference pretty well: “If you want to make an audience laugh, you dress a man up like an old lady and push her down the stairs. If you want to make comedy writers laugh, you push an actual old lady down the stairs.”

The takeaway: Pretty much any joke that relies on wordplay will put your brain to work—dark humor jokes just require a bit more emotional control to earn a laugh. Give your brain a spin with these jokes proven to make anyone sound smart, or, if you do want to test your black humor cognizance, consider the following dark jokes from the Reader’s Digest comedy crypt to exercise your hardened funny bone:

• “‘I’m sorry’ and ‘I apologize’ mean the same thing. Except at a funeral.” —Demetri Martin

• Q: What has four legs and one arm?

A: A happy pit bull.

• “Cats have nine lives. Makes them ideal for experimentation.” —Jimmy Carr

• Q: Why don’t cannibals eat clowns?

A: Because they taste funny.

• “I have a vest. If I had my arms cut off, it would be a jacket.” —Mitch Hedberg

• Q: What did Kermit the frog say at Jim Henson’s funeral?

A: Nothing.

• “If at first you don’t succeed, then skydiving definitely isn’t for you.” —Steven Wright