Research shows a positive correlation between intelligence levels and the ability to create complex, multi-layered jokes. Humor requires mental flexibility, high information processing speed, and developed social intelligence.
There is a direct link: people in depressive states often show low levels of self-enhancing humor and high levels of self-defeating humor. They stop using humor to protect their psyche, turning it into a tool for self-criticism instead.