Taylor Swift onstage during The 58th GRAMMY Awards at Staples Center on February 15, 2016 in Los Angeles. (Kevork Djansezian/Getty Images for NARAS)

If you’ve always wanted to produce a hit pop song, a new study might give you some valuable insight on what it takes. Mathematicians from U.C. Irvine have developed a computer algorithm that was able to determine which songs made the Top 100 Singles Chart with a success rate of 86 percent. Interestingly, the researchers noted, the characteristics that most clearly predicted a hit song were “happy, party-like, not relaxed … [and] sung by a female.”

Using crowd-sourced data from the MetaBrainz Foundation that classifies songs by genre and acoustic properties, the mathematicians used a machine learning method known as the “random forest” algorithm to analyze approximately 500,000 songs that were released in the U.K. between January 1985 and July 2015. The goal? To determine whether the algorithm could predict which songs made the Top 100 based solely on their acoustic properties.

“Successful songs,” the team found, “are happier, brighter, more party-like, more danceable and less sad than most songs.” Compared to unsuccessful songs, they also discovered, popular hits tended to have more women vocalists than male ones.

“We can see that, in general, successful songs are, for example, ‘happier,’ more ‘party-like,’ less ‘relaxed’ and more ‘female’ than most,” the researchers concluded. In other words, music industry titans such as Recording Academy president Neil Portnow who believe that so few women win awards because they need to “step up” should start finding new excuses. Women in the music industry, it appears, are more than punching above their weight.

So, if you want to write that hit pop song, get to work keeping all of the above in mind. Or you could just do what many pop stars do when they need a hit song and hire Diane Warren to do it for you.

This is a disgrace. Where is the UK foreign office in all of this? Aras Amiri now joins another British-Iranian, Nazanin Zaghari-Ratcliffe, in notorious Evin prison on bogus charges. @foreignofficehttps://t.co/DJX0knhdot