A new study from researchers at the University of Southern California has identified two parts of the brain responsible for humor creativity.

According to a press release from USC, telling a joke activates either the medial prefrontal cortex or the temporal association region of the brain. What dictates the choice between these different mental areas? It supposedly depends on the person's level of expertise with comedy.

Read: Are You Always Right? Your Brain Can Trick You Into Believing Alternative Facts

For this unique experiment, scientists enlisted the help of both professional and amateur comedians, in addition to a control group of non-comedians. Participants were scanned by functional magnetic resonance imaging (fMRI) machines while writing “jokes.” This exercise included penning two captions — one funny and one ordinary — for some New Yorker cartoons.

From there, an outside panel of participants rated each of the captions for humor.

Results showed that people who were more experienced in comedy had more activation in the brain’s temporal lobe. This part receives sensory information, and it’s “where abstract information, semantic information and remote associations meaningfully converge,” the release from USC reported.

Meanwhile, amateur comedians and non-comedians relied on the prefrontal cortex, which is responsible for decision-making and planning complex cognitive behavior.

Additionally, the ratings of how humorous the captions were linked up to the activity in the temporal region. Researchers found that those with higher activity in the brain during joke creation received higher funniness ratings.

Read: The Brain Science Of How You Make Decisions: Speed, Accuracy Controlled By Two Mechanisms

“Humor is an outstanding testbed for studying creativity,” said researcher Irving Biederman, according to the release. “It has a clear beginning, middle and end with a duration brief enough for neuroimaging. Also, the end product is easy to evaluate: Does it make you laugh? When someone creates an original composition or a poem, assessing the quality is not as clear-cut.”

Source: Amir O, Biederman I. The Neural Correlates of Humor Creativity. Frontiers. 2017.

See Also:

How Aging Changes The Human Brain: As You Get Older, Even The Mind Becomes More Flabby

Who's Smarter? By 6 Years Old, Girls Believe Boys Are Smarter; Gender Stereotypes 2017