Is Shuffle Really Random?

If you’ve ever told your phone to shuffle your music—no matter what app or subscription you use for your music—you’ve probably had a little voice in the back of your head suspicious of how random shuffle really is. Maybe you don’t want to acknowledge that little voice, since you don’t want to know how the sausage is made. Instead you ignore it and just keep skipping songs on shuffle until you get one you want, when you really should just prune your playlists or something. But you’re here now, and you clicked this post, so you’re in too deep. Is shuffle really random?

Well… There’s an Algorithm

We’re going to base most of this discussion on Spotify, since it’s the most popular music streaming platform at the moment. Really, Spotify accounts for almost a third of all music streaming traffic globally

So… here’s the thing. Spotify’s engineering department has actually commented on this before. In a feedback column they tell us that users were asking why shuffle wasn’t random (it’s not), while Spotify claimed shuffle was, in fact, random.

Here’s their exact response: 

“So who was right? As it turns out, both we and the users were right but it’s a bit more complicated than that. It also tells a nice story about how to interpret users’ feedback.”

If all you wanted was to figure out whether or not your playlist shuffle was truly random, then that’s your answer. The short answer is just no. It’s not random. 

Speaking of, randomness is actually quite complicated: What Is Randomness?

Random Shuffling

The human brain is really good at pattern recognition. We’re actually so good at pattern recognition, we see patterns when they aren’t necessarily there. You know when you see faces in random inanimate objects? It’s called pareidolia and it’s a byproduct of how good we are at seeing patterns. 

Because we’re so hard wired to see patterns, randomness doesn’t really compute with us on an existential level. When you have a truly random shuffle, you open the door to your playlist randomly shuffling itself into the exact order you set it in. That’s technically one of the options when you’re selecting randomly. You could also have your playlist shuffle in reverse order, or shuffle in such a way that every artist is grouped together. Those can happen randomly, but they certainly wouldn’t feel random if they happened to you on your commute. 

That’s the first problem “shuffle” had to solve, and it’s why there’s an ambiguous “shuffle algorithm”. This issue is something playlist shufflers have been trying to solve since the original iPod. Spotify itself used to use the Fisher-Yates shuffle before moving away from randomness. The Fisher-Yates shuffle is the computer equivalent of putting all your songs into a big ball pit and just picking out a ball one by one after shaking the pit. 

So, How Does It Work?

You’re probably not too interested in why we’re bad at picking out randomness; plus we already have a post about it

When you shuffle something, you probably noticed by now that your music isn’t being drawn randomly out of a hat each time you press next. Instead, a queue is “randomly” generated one time when you press shuffle. What Spotify says they do with this queue is they try to spread out artists evenly to get a better spread, and create a more even listening experience. While how exactly any given platform does this isn’t going to be handed to us on a silver platter since companies consider this intellectual property, Spotify’s engineers did cite this blog post, which discusses some of the ways you can shuffle a playlist for a more even song spread. One of these is to break your playlist into a bunch of smaller playlists and merge them together.

But Also Not Really

But we’re all cynics, and the idea that Spotify is “just looking out for our itty bitty brains so we get the randomness we want” just… kind of sounds like a load of guff. They care more about you staying on their service than they do about the principle of randomness.

Luckily, people on the internet are very petty and will do things to prove a point. Even if the faceless corporation definitely doesn’t care. A Spotify user made a 100 song playlist of popular songs, where one song was super unpopular. Shuffling the playlist 50 times, the unpopular song never appeared before the 77th spot in the queue. This led them to conclude popular music is prioritized. Spotify also seems more likely to put songs you put on repeat often in the front of your shuffled playlists, if you have the repeated song in there

Oh, also Spotify will prioritize your music more if you agree to less in royalties. Yikes. 

See if you know Spotify artists by popular music here.