ST. LOUIS – It’s lining up to be one of the coldest Halloweens in recent history, but that shouldn’t stop thousands of trick-or-treaters from dressing up and collecting goodies around the St. Louis region.

That said, they might need to earn their tasty treats with a sense of humor.

As part of one Halloween tradition in the St. Louis area, your child might be asked to tell a joke in exchange for candy. Occasionally, this may come as a surprise to parents who venture out with their children for the first time, families who recently moved to the St. Louis area, or out-of-towners.

It’s hard to pinpoint exactly when this started, but jokes have been part of the St. Louis trick-or-treating experience for decades. As to why, it depends on who you ask.

Folklorist John Oldani offers some insight in his 2013 book St. Lou-isms, noting the tradition is tied to Irish culture. Historians say, as part of an Oct. 31 festival that originated around 2,000 years ago, people would disguise themselves and ask people for items to keep an evil spirit away.

In many cases, it’s believed the participants were asked to sing a song or tell a joke. Once they fulfilled that request, they would acquire an item to avoid an evil entity.

The Missouri History Museum told FOX 2 last year about some similar findings on the origins of Halloween and jokes in St. Louis. Emily Underwood with the Missouri Historical Society found some research from a historian and linguist who suggests that the tradition might be common in St. Louis due to the city’s influence on Irish immigrants.

“There was a tradition in Ireland and Scotland where kids would go around to houses and sing a song that was like a song for the dead,” said Underwood. “In exchange for the song, they would receive a little cake or something. And that’s kind of how the song sort of evolves to be a song, a poem or a joke. Anything, really.”

Local author Ryan Nusbickel published a children’s book several years ago that tackled the tradition and offered some St. Louis-centric jokes. It follows a fictional storyline of how a brisk autumn wind ultimately sent his jokes into the sky on Halloween, leading to a chase in the St. Louis area to find them.

All of that considered, St. Louis might not be the only spot you hear jokes on Halloween. A 2011 National Public Radio report says the practice is common throughout parts of the Midwest and might have originated in Des Moines, Iowa.

If your child is looking for some jokes this spooky season, click here for some ideas. Many homeowners in the St. Louis region should expect some trick-or-treaters, and possibly some standup comedy, between 5 and 9 p.m. Tuesday.