Seth Rogen. Kevin Hart. Jonah Hill. Jason Sudeikis. What do these guys have in common? Yes, they’re all damn fine comedians, but there’s another reason they’re alike: at one time or another, they’ve all been romantically linked to some of the sexiest women in the world.

These guys don’t have the chiseled faces and bodies of Hollywood action stars, but that hasn’t hurt them when it comes to their love lives. It turns out that a good sense of humor can level the playing field, and some scientists think they know why. Evolutionary psychologists believe that the appeal of funny men may have something to do with—wait for it—the female orgasm.

Scientists have long debated the purpose of the female orgasm. Early theorists argued that it assists in reproduction because contractions of the uterus help to retain more sperm. By contrast, others have claimed that the female orgasm is nothing but a “fantastic bonus”—in other words, that it serves no real purpose at all and, like the male nipple, is just an evolutionary byproduct.

Yet another theory—and one that has been growing in popularity in recent years—is that the female orgasm is designed by evolution to help women identify high-quality mates. This idea, known as the mate-choice hypothesis, suggests that women aren’t going to orgasm with just any guy, but rather the guys who bring the most to the table. Put another way, women are more likely to orgasm with men who are “good catches,” or guys who are worth having relationships with and/or who have good genes to pass along. Orgasms can therefore be thought of as a reward for choosing a high-quality mate, or a signal that he might be worth sticking with.

So what makes a guy a “good catch” and, by extension, someone with whom women are more likely to have orgasms? Research suggests that having a good sense of humor is pretty high on the list. In a new study published in the journal Socioaffective Neuroscience & Psychology, women were asked to think about the traits of partners with whom they had an easy time reaching orgasm, as well as the traits of partners with whom orgasms were more difficult. One of the biggest differences that emerged was humor. The “high-orgasm” male partners were simply a lot funnier than the “low-orgasm” partners.

In further support of this idea that humor is a major turn-on, a 2014 study published in the journal Evolutionary Psychology found that women with humorous partners had sex more often. Not only that, but women were more likely to initiate sex if they had a funny partner.

What makes funny guys so attractive? It might be because having a good sense of humor signals a whole host of desirable traits. For example, in that 2014 study, women who thought their partners were funny also rated them as being more intelligent, popular and creative.

Intelligence has been argued to be the most important among these traits, for at least two reasons. First, intelligent men are likely to be more successful and, as a result, perhaps that makes them good providers. Evolutionary psychologists believe that it was adaptive for our female ancestors to look for mates who can provide well due to the fact that reproduction is a much more costly activity for women than it is for men. Second, intelligence is at least partially inherited. Thus, by choosing an intelligent partner, women may be giving their offspring an IQ boost.

This isn’t to say that being funny is the only male trait that turns on women, or even that it turns all women on. In the previously mentioned Socioaffective Neuroscience & Psychology study, researchers found that women’s odds of orgasm were linked to several qualities of their partners, including his psychological traits (like faithfulness), physical characteristics (like smelling good) and what he did in bed (such as performing oral sex and giving clitoral stimulation during intercourse). Clearly, whether a woman is likely to orgasm is a function of far more than just her partner’s sense of humor.

That said, there’s mounting evidence that being funny is one of the more sexually desirable traits a man can have. Although we can’t say why for sure, the data are at least consistent with the mate-choice hypothesis.

A word of caution: the take-home message here is not that you need to try harder to be funnier. We all know guys who have tried a little too hard to make a woman laugh at the bar on Friday night only to have it backfire spectacularly. Play to your own strengths and remember that, while being funny may be important, it’s not everything.

Justin Lehmiller, PhD is a sex educator and researcher at Ball State University and author of the blog Sex and Psychology. Follow him on Twitter @JustinLehmiller.