Back in 1818, the mostly unfunny German philosopher Arthur Schopenhauer dropped a theory of humor that did a surprisingly great job of breaking it down: Things are funny when they don’t align with what we expect. The Incongruity Theory, as it’s known, makes sense on its face — comics from Aziz Ansari to Steve Coogan rely on it — but scientists have failed to wring a formula for funny out of all that whimsy. In his attempts to model humor with an equation, psychologist Chris Westbury, Ph.D., has continually been thwarted by one thing: the limitlessness of what we find incongruous.

Still, he’s come closer than most. Inspired by a statement of Schopenhauer’s that suggested jokes were quantifiable, he became convinced that he could use a mathematical model to at least predict the funniness of simple jokes. “Schopenhauer explicitly said, the further away your conception was from the thing you were expecting, the funnier it would be,” he told Inverse. “And that suggested that if you could come up with a way to quantify jokes, you could test it.” The trick was finding a joke simple enough to be quantified.

That’s a hard thing to do. Even something as simple as a pun, he says, is hard to model because the improbabilities involved are endless. They also change. This simple visual play on “Hello” is a bit funny. It wasn’t a year ago.

Westbury eventually succeeded, but only when he focused on the simplest of jokes: nonwords. They’re not good jokes, he admits, but words like “yuzz-a-ma-tuzz” were giggle-worthy enough to make Dr. Seuss a household name. They’re also easy to quantify in terms of “weirdness.” As he writes in his paper, subvick should be a lot funnier than octeste, and ditto for suppopp over tatinse, because in both cases the former word really violates our expectation of what a word is. The latter just gets shrugged off as normal-looking or mildly French.

The mathematical model Westbury devised to predict which randomly generated nonwords people would find funny turned out to be fairly accurate: Given a choice between nonwords, like finglam and heashes, people would fairly predictably veer improbable. (He had to control for non-words that weren’t too improbable but were humorously dirty-sounding, like dongl and shart.) In the end, his predictive formula had an accuracy rate of 92 percent, which is crazy high for a psychological study.

But, beyond the simplest of jokes, he says, science is powerless in the face of humor. “As soon as you start trying to apply this to real jokes, the probabilities become totally incalculable because there’re so many of them,” he says. “If someone starts off a joke and says, ‘A priest, a rabbi, and a zen monk walk into a bar,’ right away, part of the funniness is, ‘How unlikely is that?’ We don’t know. You can’t quantify anything like that in a joke.” The range of improbability in comedy is so enormous — there’s physical, interactive, even dirty humor — that it would be impossible to model. The real question is, do we really want to?

In the same way that self-deprecation makes for good comedy, humility is necessary in science. Besides, Westbury, a comedy fan, knows that nothing kills a joke like having to break it down. Unpredictability is, in humor as in life, what keeps things interesting.

“I think that if you accept that humor is improbability,” he says, “then you have to accept that it’s going to be really, really complicated to get a computer to ever just make good jokes.”

Photos via Getty