Most middle-aged women do not give up sex as they age, especially if sex is important to them, according to a new study.

The study included 602 women ages 40 to 65. The participants reported whether they were sexually active and how important sex was in their lives. They also completed a test aimed at measuring women's sexual functioning and health through a set of questions, such as whether they experienced pain or lubrication problems during sex.

At the start of the study, 354 (66.3 percent) of the women reported being sexually active. Four years later, 228 of those women remained sexually active, according to the study published on Feb. 10 in the journal JAMA Internal Medicine.

"Popular culture tells us that as women age, they become less interested in sex, and they stop having sex," said study researcher Dr. Holly Thomas, an internal medicine physician at the University of Pittsburgh. "But at least in the four years that we were examining, the vast majority of women who were sexually active continued to be sexually active." [10 Odd Facts About the Female Body]

The researchers also found that women who reported greater importance for sex were more likely to stay sexually active.

However, women's sexual function was not linked to maintaining sexual activity. In fact, there was no difference between sexually active women and those who reported not having sex, in terms of the percentage whose test scores classified them as sexually dysfunctional.

"There seems to be a disconnect between this idea of sexual dysfunction and whether women are still sexually active or not," Thomas said. "Even if women are dysfunctional as measured by this instrument, it doesn't necessarily mean that they stop having sex."

The test focuses on women's functioning during penetrative intercourse, and includes questions about physical symptoms of sexual dysfunction. However, as women get older, other types of sex, such as kissing, intimate touching and oral sex, may become more important to them, Thomas said.

"So an instrument that focuses more on penetrative intercourse may misread women in this population, and inadvertently label them as dysfunctional when they are just not participating in the types of sex that this instrument asks about," Thomas said.

Future studies on women's sexuality in midlife should incorporate factors such as sexual satisfaction and relationship with the partner, Thomas said.

In answering the question of how important sex was in their lives, 10 percent of women in the study said extremely important, while 50 percent said it was moderately important; about 20 percent said not very important. The rest didn't answer the question.

The researchers also found that while younger women are more likely to be sexually active, their age didn't predict whether they would remain sexually active. However, other factors did predict how sexually active women would remain. Specifically, white women, highly educated women and those who had a partner were more likely to keep having sex.

It's not clear why race and ethnicity were factors in women's sexuality as they aged, even when researchers controlled for social and economic status, Thomas said. "There seems to be something going on there. Whether it has to do with attitudes towards aging, or difference in physical symptoms remains to be furthered explored," she said.

Email Bahar Gholipour or follow her @alterwired. Follow us @LiveScience, Facebook & Google+. Original article on LiveScience.

Related on LiveScience and MNN:

This story was originally written for LiveScience and was republished with permission here. Copyright 2014 LiveScience, a TechMediaNetwork company.