If you spend the rest of the day with the words “Just a small town girl/living in a lonely world” or “Ra ra ah-ah-ah/Ro ma ro-mah-mah” running an endless loop through your head, we're sorry. But know that you are not alone. Psychologists who are trying to understand why songs get stuck in your head found that these are three of the most commonly complained-about earworms.

And they all have something in common, says Durham University music psychologist Kelly Jakubowski, the lead author of a study published Thursday in the journal Psychology of Aesthetics, Creativity and the Arts.

“There are certain features of a melody that make a song more likely to become an earworm,” she said. After conducting a statistical analysis of thousands of earworm submissions from an online survey, she and her colleagues found that songs that are up-tempo, with a familiar melody set apart by a catchy, unique interval pattern, are especially persistent.

Jakubowski, who conducted the research while at Goldsmiths University of London, says this is the first large-scale study of what makes a song stick in your head. The findings confirm the belief that popular songs that are often on the radio are more likely to be reported as earworms. But they also suggest that particular melodic features make some Top 40 hits more inescapable than others.

Tempo is a big one: Faster paced songs are more likely to pop into your head at inopportune moments, and more difficult to dislodge once they're in there.

“This could have to do with the idea that we have a propensity to move along to earworms,” Jakubowski said. “A lot of people experience earworms when they’re running or while they’re brushing their teeth.”

Earworms also tend to have simple, familiar structures. For example, “Twinkle, Twinkle Little Star” starts at a low pitch, swings upward and then resolves back on a low note — a very common shape for a melody.

But earworms need to be distinctive, too. “They had to have some sort of unique interval pattern within the pitches that set them apart from the average pop song,” Jakubowski said. The unusual, leaping quality of the instrumental riffs in the Knack's “My Sharona” and Glenn Miller's “In the Mood” both demonstrate this.

“It's like the brain is searching for an optimal level of complexity in the melody,” Jakubowski said. “It has to be interesting, but not too complicated for the brain to remember.”

The survey is a follow-up to a 2014 study in which Jakubowski polled people to find the most commonly used strategies for getting earworms out. Some respondents tried to distract themselves by listening to another tune (the top-named cure song was “God Save the Queen,” but non-monarchists can try “My Country, ’Tis of Thee,” which has the same melody).

Others found it was better to listen to the earworm itself, like a musical variation on exposure therapy. Often, the tunes that play in people's heads are just the choruses or catchiest parts of songs; the earworm effect could come from not knowing how the tune ends.

“If they seek out a recording of that tune and listen all the way through to get closure, that can end the earworm experience,” Jakubowski said. “Maybe there’s unfinished business with the song and they can get closure that way.”

But all this research is just preliminary. Jakubowski and her colleagues at Goldsmiths' Earworm Project hope to start testing their findings in a lab soon, hooking people up to MRIs and measuring their responses to songs that have been engineered to be particularly earworm-y.

The results might do more than provide relief to those poor souls who go about their lives to an endless soundtrack of “Don't stop believing/hold on to that feeling.” Jakubowski said that earworms are an intriguing form of spontaneous thought — those notions that pop into our brains seemingly independent of the task at hand.

“All these people are going around with music inside their heads,” she said. Understanding why could help scientists understand where the mind goes when it wanders.

Content from Allstate This content is paid for by an advertiser and published by WP BrandStudio. The Washington Post newsroom was not involved in the creation of this content. Learn more about WP BrandStudio.