03/04/2014 08:00 am ET | Updated May 04, 2014

The Science Behind Why We Laugh, And The Funniest Joke In The World

How many babies does it take to paint a wall red? Just one, but you have to throw it really hard.

I know what you're thinking - oh my! Please don't tell me this is the funniest joke in the world! It isn't, but the reason isn't just excessive crudeness or vulgarity. There's a science behind what makes a joke funny, and though shock and surprise are important, they aren't everything.

Even more essential is something called the "kick of the discovery," a phrase used by the physicist Richard Feynman, a pretty funny man himself, who once claimed that the highlight of his career wasn't winning the Nobel Prize. It was the joy of always learning new things. Humor works the same way, first by leading us one way, then suddenly shifting our perceptions.

"Yesterday I shot an elephant in my pajamas," goes the old Groucho Marx joke. "How it got in my pajamas I have no idea."

While researching for my book Ha! The Science of When We Laugh and Why [Basic Books, $26.99], my favorite experiment involved the British researcher Richard Wiseman's search for the funniest joke in the world. He asked over a million people to rate their favorite jokes, and the experiment was great because it included lots of examples, some silly (What's brown and sticky? A stick!), and some quite smart (Two fish are swimming in a tank when one turns to the other and asks: "Do you know how to drive this?"). But it was also enlightening because it revealed a lot about humor tastes. Though the crudest jokes - like the baby throwing joke earlier - were rated as quite funny by some, they were hated by others. Shock only takes us so far.

I believe comedy tastes vary so widely because humor isn't about setups or punchlines. Instead it's about the "kick of the discovery," thinking one way and then suddenly turning that thinking around. Shock and surprise are needed for that turn, but there must be a destination too. The reason dead baby jokes (like our example) are so unappealing is that the same ingredient providing the shock also leaves us with some unfortunate imagery once the joke is over.

Of the thousands of jokes analyzed in Wiseman's study, the ones rated highest by everybody included some shock or surprise, but not so much that they became the centerpiece of the joke. More important was a sense of false expectations being overturned. My personal favorite involved two ducks sitting on a pond. One of the ducks says, "Quack." The other quickly responds, "I was going to say that!" It's hard to be offended by that.

Viewing humor as a psychological process of discovery has other benefits too, for example explaining why we so commonly laugh during tragic events. My cousins and I once broke out in laughter after my grandfather's funeral because our brains were conflicted about how else to respond. My wife, Laura, nearly got thrown out of the movie Titanic for laughing during Leonardo DiCaprio's demise because she found the sentimentality amusing. When soldiers at Yucca Flats were ordered to bunker down in the 1950s and report their subjective experiences after being hit by nuclear blasts (really!), their first reactions weren't screams or crying. It was laughter.

Unfortunately, the problem of viewing humor as a psychological process, rather than following a strict formula of shock or surprise, is that the analysis becomes vague. What is a joke, really? That's hard to answer, but that's also the point. Ask a hundred scientists to define humor, and each will have a different response because the answer is in our heads, not on the stage. Whatever causes our brain confusion or conflict is likely to make us laugh. And we all laugh at different things because we each have different thresholds for what leads to confusion, and what offends us deeply.

As for the joke that won Wiseman's funniest-in-the-world contest, I hesitate to share it because it's not as interesting as some of his other findings. For example, he showed that the funniest animal was the duck. Perhaps it's the webbed feet, but if your joke has a choice of including a talking horse or talking duck, choose the duck. Preferences differed by nationality too, with British tastes being dry and absurd, and Americans preferring jokes that are slightly aggressive (A Texan asks a Harvard graduate where he's from. The graduate replies that he comes from a place where they don't end their sentences in prepositions. The Texan responds: "Okay, where are you from, jackass?").

Still, I recognize that omitting the eventual winner would be as satisfying as a setup without a punchline (What's yellow and can't swim?). So I'll finish with that, but know that science isn't infallible. The beauty of life is that we all have different tastes. If all comedy was the same, we might get lucky and have a hundred Louis CKs. But we could also have a hundred Dane Cooks. Variety is good.

Without further ado, the scientifically-proven funniest joke in the world:

Two hunters are out in the woods when one of them collapses. He's not breathing and his eyes are glazed, so his friend calls 911. "My friend is dead! What should I do?" The operator replies, "Calm down, sir. I can help. First make sure that he's dead." There's a silence, then a loud bang. Back on the phone, the guy says, "Ok, now what?"