The stats behind Spotify’s Song Choice 11/8/18

I’m a huge IU fan (KPOP star), and while I love all her songs, I’m a bigger fan of her newer songs, especially her latest hit BBIBBI. However, it feels like BBIBBI doesn’t play very often. This would normally be fine since I only listen to one playlist that has 200+ songs of various different genres, but I feel like all “old era” (pre 2015) IU songs play quite frequently compared to “new era” (2015-present) IU songs. Here’s my statistical procedure to determine if I’m just getting unlucky or not.

First, I want to know how many songs are in my playlist, how many of those are IU songs, and how many of the IU songs are new and old era. I could manually count them, but it’s 10:04 PM on a school night and I have a stats test tomorrow, so why not just write a program that can do all this for me? I found a program on GitHub that converts a Spotify playlist into a .txt file using the Spotify Web API. https://github.com/jlund/spotify-export

I created a Java program that reads the text file and exports a different text file with all the songs with IU in it and both the total number of songs in the playlist and total number of IU songs in the playlist.

To determine whether a song is old or new IU era, I just separated them by hand. I have concluded that I have 209 songs in my Spotify playlist currently, 26 of them are IU songs. Of the 26 IU songs, 14 of them are old era and 12 of them are new era.

Here is my simulation now.

Model: Use a random number generator to generate numbers between #001–209.

#001–014 = old era IU songs

#015–025 = new era IU Songs

#26 = BBIBBI

#27–209 = The rest of the songs in my playlist

Single Trial: Generate 25 numbers (do not have to be unique)

The reason why I generated 25 numbers is because that is roughly how many songs I listen to in one day, and they don’t have to be unique since Spotify often repeats songs.

Statistic of Interest: On average, how often old era IU songs appear, new era IU songs appear, and BBIBBI per day.

REPEAT FOR A LARGE NUMBER OF TRIALS!!!!! (Thanks Mr. Hays)

Of course, I wrote a program to do this for me :) But it’s not as short as the other one so I won’t put it on here.

Here are my results for larger number of trials. Remember that each trial can represent one day

I think you get the point here.

Based on my simulation, I can conclude that I’m actually just getting super unlucky. On an average day (according to my simulation), only about 1 old era IU song appears and about 1 new era IU song appears. In reality, it feels like I get about 5–7 old era and 2–3 new era. However, I will say that the average times BBIBBI plays per day is fairly accurate; I only really get to hear it about once every ten days. However, this might just be my subconscious intentionally remembering every time an old IU song pops up while forgetting every time a new old IU song occurs.

Of course, this is only a simulation and I bet Spotify has a specific algorithm that determines the next song (kind of like YouTube recommendations). I hope you enjoyed this short read :)

I was told to follow my dreams. https://github.com/yoonpatrick3/