iTunes: Just how random is random?

Think that song has appeared in your playlists just a few too many times? David Braue puts the randomness of Apple's song shuffling to the test -- and finds some surprising results.

Quick -- think of a number between one and 20. Now think of another one, and another, and another.

Starting to repeat yourself? No surprise: in practice, many series of random numbers are far less random than you would think.

Computers have the same problem. Although all systems are able to pick random numbers, the method they use is often tied to specific other numbers -- for example, the time -- that means you could get a very similar series of 'random' numbers in different situations.

This tendency manifests itself in many ways. For anyone who uses their iPod heavily, you've probably noticed that your supposedly random 'shuffling' iPod seems to be particularly fond of the Bee Gees, Melissa Etheridge or Pavarotti. Look at a random playlist that iTunes generates for you, and you're likely to notice several songs from one or two artists, while other artists go completely unrepresented.

This phenomenon has been observed widely across the world, with many conspiracy theorists suggesting there was more method than madness to Apple's randomisation routines.

Just what are they implying? Consider, for a minute, that you're a music industry marketer. There could be little more tempting than direct access to the ears -- and, indirectly, the wallets -- of tens of millions of iPod users around the world.

Through payment of a fee, the theory goes, a record label could increase the rotation frequency of their own music by tweaking Apple's randomisation formula. Popular songs and artists from their catalogue would pop up on playlists time and again, potentially explaining why your 50-strong playlist includes half a dozen Jackson 5 tracks but no Jackson Browne.

Less insidiously, iTunes could be tracking the songs you like the most -- it already does this -- then rotating them more often into its playlists.

Concerns over the randomness of Apple's randomness have even reached the ears of Steve Jobs, who has emphatically denied that the iPod's shuffle feature -- and the design of the iPod Shuffle itself -- is anything more than random. Just tell that to the hundreds of forum participants posters who have posted their complaints about the devices' playlist approach.

After an afternoon spent listening to far too much Bon Jovi, we decided to put iTunes to the test.

Building the perfect library
To evaluate iTunes' randomness, we borrowed a Mac Mini from Apple, with its fresh install of Mac OS X ensuring that we were working with an empty iTunes library and an otherwise completely clean slate.

We purchased AU$170 worth of Apple iTunes Music Store prepaid cards, then proceeded to go on a carefully planned shopping spree. As it was necessary to have multiple songs from one artist to observe any untoward clustering, we purchased five songs from each of four artists, with four artists chosen arbitrarily from the online artist lists of each of the major music labels (EMI, Sony, Universal and Warner Music).

This gave us a total of 80 songs. To see whether popular songs were being rotated more frequently, we also purchased 20 more songs from Billboard's current (as of late February) Top 50 chart, which represented a variety of labels. All told, we purchased and downloaded 100 iTunes songs from the iTunes Music Store (download the spreadsheet for the full song list here).

We then used the Smart Playlist feature to force iTunes to make random playlists 25 and 40 songs long, respectively. Ten playlists of each length were created, providing a total of 20 playlists and 650 possible song positions. Each song list was exported to a text file for analysis using Microsoft Excel.

If Apple and the labels were including any information to change songs' priority, it would arguably be stored in the downloaded AAC files. To test this, we also added another 100 MP3 files, previously ripped from a variety of CDs, that definitely contained no extra coding information whatsoever. These artists included Def Leppard, Bon Jovi, Erasure, Maroon 5, Bob Seger and even John Denver & The Muppets for variety.

With 200 songs in the iTunes Library, we then repeated the random playlist test, creating an additional ten playlists with each of 25 and 40 songs.

Add Your Comment 128

Post comment as

KarlM1 posted a comment   
Hong Kong

This is a great study, but leaves out the P value. You don't actually expect perfect balance. If the random generator were perfectly random, what's the probability that you'd get the distribution you observed?

I'm all in favor of independent music (especially Creative Commons-licensed music), but skewed random playlist generation isn't necessarily the result of some sinister intentional conspiracy against smaller/independent labels.

I imagine if I were tasked with coding up something like this, I'd start out with some simple enjoyability model and keep track of when a user skipped songs in order to (over time) build first- and second-order Markov models of a user's listening habits. Popularity of purchases from iTunes is one of the obvious simple enjoyability models I'd look at for the "average user". (Yes, there is no such thing as an average user, but sometimes it's a useful fiction.)


weffing posted a comment   
United Kingdom

I agree that the data here is sparse. Try the same thing again with much more material and more randomness from your side. Another interesting variable could be "how long a particular song/group of songs has/have resided in the itunes library"

Personally i would like a setting that would limit every song in a random list to only one spot, forcing every song in a playlist/library to be played. I have a feeling itunes used to work that way before it became a "store".


DukeOfC posted a comment   

Humans looking at bar graphs and commenting on how they should have close to the average is not statistical analysis. Complete your study by running an ANOVA test.


anttumad posted a comment   

sorry. It is not uncomplete.

Great job!


anttumad posted a comment   

The article is uncomplete. Isn't it?


Unter09 posted a comment   
United States

Where can I buy the album with John Denver & The Muppets?


Johanna posted a comment   

I notice songs with similar beat come usually in a row.
In every 3 or 4 songs, the type of beat changes...


Steve posted a comment   

Absolutetly no statistical analysis was done here, ever heard of a normal distribution?


MattyRob posted a comment   

One day my entire music library was on shuffle and it came to a song by Florence + The Machine. The TWO songs after that were also by Florence + The Machine, the same album. There are approximately 650 songs on my iTunes so I thought it was odd that three songs by the same artist/same album would play in a row! I want to know the odds!


Thomas posted a comment   

Having used this for quite a while, I've noticed an annoying trend that only has shown up in the recent version: iTunes loves to pick songs that were just playing earlier. If I'm listening to a song outside of shuffle, you can bet it shows up shortly in the shuffle list. When a song shows up in shuffle, there's a good chance it shows up again later, sometimes even happening a third time. The other night, I took a peek at the "last played" times for the next batch of songs, and nearly six in a row had been listened to the previous time.
It also likes to pick multiple tracks from the same album, such as picking three songs from the same album in a row, with a couple more coming before and after. I end up skipping a good number of shuffled songs, only because I was just listening to it earlier. Oy.

Sponsored Links

Recently Viewed Products