Project typeStatistical analysis
Analysis lab, statistical modeling

Song Popularity Data Analysis

I used regression in R to test whether loudness, duration, and tempo could explain Spotify popularity. Together, they explained about 2.2% of the variation in the sample.

SkillsStatistical analysis, data interpretation
TimelineJul 2025
Methods & toolsR, regression modeling, diagnostics

Can audio predict a hit?

Artists and producers decide how loud, long, and fast a track should be. We wanted to know whether those choices tell them much about how a song might perform on Spotify.

Which of the 3 audio features relates to popularity when examined on its own?
Does tempo add useful information once the model accounts for loudness and duration?
How wide is the range of likely scores for an individual track?
How we tested it

We modeled Spotify's 0–100 popularity score using 32,833 track records. We tested each feature separately, compared models with and without tempo, and checked how far individual scores could fall from the fitted trend.

The work

From scatterplot to model

Why the forecast falls short

Even with all 3 features, the model's errors had a spread of about 25 points on a 100-point scale. That makes the results useful for describing the sample, but too weak to set production targets or forecast a release.

Loudness

Louder tracks tended to score slightly higher. But the scatterplot shows why that average trend isn't a recipe: tracks at similar loudness levels scored very differently.

Tempo

Adding tempo barely changed model fit: the share of variation explained rose from 2.236% to 2.245%. The model comparison reported p = 0.081, which does not meet a 5% significance threshold.

Duration

Track length was associated with popularity after accounting for loudness and tempo, but length alone still left a wide range of plausible scores. The analysis gives no basis for prescribing an ideal song length.