So These Professors Walk Into a Comedy Club ...

NOT long after the physicist Werner Heisenberg (not the guy from “Breaking Bad”) identified the uncertainty principle in the early 20th century, E. B. White — in a somewhat similar vein — warned against meddling with what defines funny.

“Humor,” White wrote, “can be dissected, as a frog can, but the thing dies in the process and the innards are discouraging to any but the pure scientific mind.”

Which may explain why it took a team of experts from the Humor Research Lab at the University of Colorado a full nine months to devise a provocative “humor algorithm” to identify the funniest cities among America’s 50 largest. Moreover, White’s warning may have been doubly prescient. When residents in what was determined to be the nation’s funniest city — Chicago — were surveyed about their favorite joke, they couldn’t think of a single one.

Still, Peter McGraw, the University of Colorado professor who compiled the rankings and, with Joel Warner, just released a book, “The Humor Code: A Global Search for What Makes Things Funny,” insisted that the findings were no joke. “Chicago and Boston made sense,” he said. “Atlanta and Washington were surprisingly high, New York and Los Angeles were a little bit low.

“We’re nerds,” he said. “We spent hours tossing about what are the right attributes to include in the humor algorithm. I think the fun part for readers will be debating whether we got it right.”

The first challenge was defining funny.

Everyone has a favorite formula. Mr. McGraw’s pet principle is the “benign violation theory,” which holds that humor occurs in situations like play fighting and tickling “because they are physically threatening but harmless attacks.” Humor, he offers, manifests itself in a three-pronged psychological response: an emotional one (being amused), a cognitive judgment (finding something funny) and a behavioral reaction (laughing).

His findings were drawn from surveys of residents (on the prevalence of humor in their daily lives) and of comedians, number of visits to comedy websites, tweets, radio stations, comedy clubs per square mile and native-born comedians per capita.

“To glean a deeper understanding of humorous daily life in these cities,” Mr. McGraw explained, “researchers quizzed residents on the kinds of funny entertainment they enjoyed, asked whether they looked for humor in their friends and lovers, and subjected them to a ‘need for levity’ personality test.”

Skeptics abound. “I think jokes can be ranked on some defensible humor scale,” said John Allen Paulos, the mathematician and author. “Ranking people on some sort of humor scale would be much more difficult because there are so many confounding variables and disparate situations across which we’d have to average.

“Most difficult — nonsensical — of all,” he continued, “is the task of ranking whole cities. What would it even mean to say that Chicago is funnier than San Francisco?”

Actually, this isn’t the first attempt to quantify the nation’s funniest cities. In recent years, The Daily Beast and Movoto, a real estate website, have delivered their own rankings, to scattered chortling.

Bruce F. Michelson, a University of Illinois English professor and the president of the American Humor Studies Association, is another skeptic. “What’s a plausible metric for funniest?” he said. “The number of solvent improv comedy clubs per square mile? Or should we fold in the annual tally of unintentionally hilarious news stories about state and city politics?”

That Chicago ranked first in Mr. McGraw’s analysis was, perhaps, presaged a century ago by Carl Sandburg. His poem “Chicago” endures largely for branding the brawny Midwest metropolis as the “Hog Butcher for the World” and the “City of the Big Shoulders.” Yet, Sandburg also wrote that while struggling “under the terrible burden of destiny,” Chicago nonetheless kept “laughing as a young man laughs.”

By the mid-20th century, A. J. Liebling had contemptuously relegated Chicago to “The Second City.” But instead of resenting the snub, a local comedy troupe appropriated it in 1959. (Within a decade, Clive Barnes of The New York Times wrote: “The entire recent tradition of American theatrical satire can be summed up in three words: The Second City.”)

“It’s a very self-deprecating town, people are not afraid to make fun of themselves and out of that has come a certain confidence,” said Andrew Alexander, executive producer of The Second City, which evolved into a comedy empire that threaded its way into American culture.

“The audiences are much more forgiving than the East Coast and much more discerning than the West Coast,” says Bert Haas, the executive vice president of Zanies Comedy Club. “We don’t have the media coverage so a comedian can fail for a number of years before he discovers himself.”

So much for giving Chicago its due. But Mr. McGraw’s Top 10 American cities includes a few outliers as well.

Chris DiPetta, an owner of the Punchline in Atlanta, speculated on his city’s position near the top of the list. “Maybe it’s because people come from other places, there’s no ownership of things that might otherwise be considered negative quirks, so there’s no reason to be defensive.”

Portland, Ore., never would have made the list five years ago, said Stacey Hallal, founder and artistic director of the Curious Comedy Theater, but the “Portlandia” TV series suggests how the city has been transformed since then. “People come here to be creative,” she said. “Portland loves the weird.”

In Fort Worth, which ranked last on the list, Hyena’s comedy club headlined Daryl Felsberg earlier this month. His bio boasted that he had hosted a home shopping show on a regional cable TV network but “was yanked off the air after only three months for mocking the clients and their products.” The club also offers a defensive driving course.

Mr. McGraw said the rankings made sense. “You wouldn’t have expected Wichita to crack the Top 10,” he said.

It didn’t. Nonetheless, it weighed in at a pretty respectable No. 30, which is not bad for a city where the Loony Bin, which bills itself as Wichita’s sole comedy club, just reopened after a year.

Doug Wilson, a 29-year-old public school math teacher and part-time comedian there, was asked what’s so distinctive about Wichita humor that it merited a place among the funniest cities.

“I couldn’t tell you,” he replied. “I haven’t been to the other 49.”

Funny, huh?

The urban affairs correspondent for The New York Times.

A version of this article appears in print on , on Page SR6 of the New York edition with the headline: So These Professors Walk Into a Comedy Club.... Order Reprints | Today’s Paper | Subscribe