A study conducted by a Stanford professor reveals that people who smoke marijuana tend to have more sex than those who abstain, CNN reported.

With marijuana becoming legal in more states, Dr. Michael Eisenberg, an assistant professor of urology, wanted to see if there was a correlation between smoking marijuana and sexual activity. The results, published in this week's Journal of Sexual Medicine, were surprising, he said.

“Usually, people assume the more frequently you smoke, the worse it could be when it came to sex, but in fact, we learned the opposite was true," Eisenberg told CNN.

The study looked at data from the National Survey of Health Growth. More than 28,000 women and nearly 23,000 men were asked how often they had sex in the four weeks before the survey and how often they used marijuana in the past year, CNN reported.

The study found that women who didn't use marijuana reported having sex six times on average during the past four weeks, while those who smoked it had sex 7.1 times, CNN reported. Men who did not smoke pot said they had sex an average of 5.6 times in the four weeks before the study, while those who did smoke marijuana had sex 6.9 times on average

“We were surprised to see the positive association between users,” Eisenberg told CNN. “This was across the board: marital status, race, none of that mattered.”

The study focused on heterosexual sex and did not explain why there might be a connection between sex and marijuana, CNN reported.

Eisenberg said past research on human and rodent models has shown that marijuana use may generally increase arousal. However, studies have also shown that too much marijuana use can decrease sperm count, and while men may want to have sex more, orgasm may be a challenge.

"It can have a different impact on different people," Joseph Palamar, an associate professor in the Department of Population Health at New York University, told CNN. Palamar has no connection with the current study, but called it "a cool epidemiological paper" that "did the best it could with the data."

Palamar did say the study had limitations.

“It's unclear from the data if people had marijuana in their system before or during sex,” Palamar told CNN.

Eisenberg told CNN that if a patient asks whether frequent marijuana use is getting in the way of his or her sex life, he will tell them that “it may not be the culprit.”