It’s a storyline you’ve seen play out in countless movies — and probably in real life as well. A woman who has her pick of stable, emotionally available male specimens decides to go for some rugged, rebellious jerk instead. What’s the deal there? Do nice guys really finish last? There are lots of valid reasons why women go for bad boys — in fact, some of them have to do with hormonal changes that are beyond their control (more on that later). That said, it is possible to be a good guy and still get the girl.

The stereotypical “alpha male” has a few advantages with the ladies: he’s a leader, someone who’s sure of what he wants (and often doesn’t ask or apologize for taking it). That, in a nutshell, is the essence of pure masculine energy, so it makes sense why women might be drawn to it. Opposites attract, after all. Still, with that alpha presence comes some negative traits as well: jealousy, aggression, insensitivity, and inability to commit, to name a few. So, while a woman might initially be captivated by a bad boy’s edge, that attraction will typically fade once she realizes he can’t give her what she wants: reliable emotional support and respect. That’s good news for all you nice guys out there.

This subject is a complicated one. In order to embrace your good guy persona (and use it to your advantage in the dating realm), it’s important to understand why women often go for the bad boys, and how you can embody some of those traits while still remaining true to yourself.

Let’s dive in, shall we?

The “bad boy” appeal

A 2015 study of nearly 1,000 men and women that was published in Evolution & Human Behavior found that people with pathological personality characteristics — such as impulsivity, recklessness, imprudence, and narcissism — had more sexual partners. This seems to suggest the idea that those brooding macho men have a leg up when it comes to attracting the opposite sex. Or, conversely, it could also mean that guys with those personality traits are simply more likely to be promiscuous by nature.

The bad boy definitely comes with some inherent excitement. Some women thrive off the thrill of never doing what he’ll do next, while others love the sense of dating someone who’s “forbidden” or seems dangerous. Other women are addicted to wanting to “fix” the men they date, and the bad boy presents the perfect project.

How hormones come into play

What’s interesting to note, though, is that research has revealed time and again that women are only more likely to go for the bad boy during ovulation. In one 2012 study published in the Journal of Personality and Social Psychology, women were asked to rate the online dating profiles of a variety of men during periods of both high and low fertility. Remarkably enough, when they were near ovulation, women were more likely to think that the sexy, macho man would contribute to domestic duties like cooking, household chores, and caring for the baby. Essentially, researchers determined that women delude themselves into thinking the bad boys will be more devoted partners. The good news is that they do eventually come to their senses after ovulation ends.

All this makes sense from an evolutionary standpoint. When a woman is most fertile, of course she may be more attracted to the guy who oozes testosterone (think: strong jawlines, beards, dominant behaviors), because on a subconscious level, she assumes he’ll be better at protecting her and her offspring. Not only that, but these traits are often linked to fertility. The “good genes” theory of mate selection suggests that women are drawn to males with traits that demonstrate they have a genetic advantage — because they want to pass those onto their children.

Ovulation only lasts one week, which means for the other three weeks of the month, when hormones are regulated differently, Mr. Wrong no longer looks like Mr. Right, and women can be better judges of character. In other words, the good guy can ultimately win out, because he’s the reliable one who can help her raise the children and meet her basic emotional needs. Besides, he’s the one who’s more likely to settle down with her rather than playing the field.

Why nice guys do stand a chance

In one 2003 study published in Sex Roles, a group of college women were presented with three very different men and asked to choose a date for themselves as well as a fictional friend named Susan. One man was caring, kind, and in touch with his feelings, another was a self-described “real man” who was insensitive and unkind, and the third was neutral (somewhere in the middle). Not only did participants pick the nice guy for Susan, but they also preferred that contestant for themselves! How’s that for promising?

In another 2010 study in which participants were asked to read dating ads, men who described themselves as altruistic (“I volunteer at the local homeless shelter”) were rated as both more attractive short-term dates and long-term partners than those who didn’t exhibit that positive personality trait. Other research has shown that at the end of the day, women prefer men who are sensitive and easygoing vs. dominant and aggressive.

Better yet, some studies have even proven that having a “nice” personality can make you seem more physically attractive and thus make you a more desirable partner.

The bottom line

Clearly, while the jerks may have a certain initial magnetism, most women do ultimately recognize that nice guys make better long-term partners. Men who are warm-hearted, compassionate, and know what they want are highly sought-after, and there is an abundance of women in my database dying to meet them. Sometimes, it takes women some time to realize what really matters when they’re looking for a life partner. Sometimes, they may even have to make a mistake (or three) with those bad boys to see through the charm and excitement and learn their lesson.

What you may not know is that the bad boy’s real power over women often stems from their boundless self-confidence — and fortunately, that’s totally something you can work on building up while still remaining true to your nice guy persona. Remember Steve Carrell in The 40-Year-Old Virgin or Crazy, Stupid, Love? In both cases, his sweet, good-natured character does end up getting the girl in the end, not by becoming a bad boy or pretending to be something he’s not, but simply by working on his self-acceptance and self-confidence.

Women who prefer emotionally available men are often incapable of committing themselves or have their own issues they need to work on. So, if you can’t win a woman over by being the nice guy you are, then you probably don’t want to be with her, anyway. Got it? Remember: kindness attracts kindness. By being true to yourself, you’re more likely to draw in the types of people who can reciprocate all the positive things you have to bring to the table.