iPod/iTunes Shuffle Mode Really Totally Random?

MSNBC – Does Your iPod Play Favorites?: it’s entirely possible that nothing at all is amiss with the shuffle function. . . .
Life may indeed be random, and the iPod probably is, too. But we humans will always provide our own narratives and patterns to bring chaos under control. The fault, if there is any, lies not in shuffle but in ourselves.

This reminds me of a recent igNobel prize: “when people pay close attention to something, it’s all too easy to overlook anything else — even a woman in a gorilla suit.”

In the case of iPod/iTunes randomness, many people fail to see a pattern. Those people all use the same examples (the Birthday “Paradox” is one) to convince themselves that because human beings often misunderstand probabilities, iTunes (and the iPod) must be random. Kind of a reverse argument, ain’t it?
This has been discussed on blogs, on Slashdot, and on two MacSlash threads [1], [2]. Some people even want this thread to “die” (talk about anthropomorphism) yet add nothing of scientific value to the discussion. Many comments are derisive and condescending, coming from self-appointed experts in human cognition (apparently, as they seem to know so much about why we see patterns; they must have all attended the same PSY101 class or, maybe, had the same instructor for statistics in high school).
Thing is, it’s hard to find anyone doing an actual experiment (with null hypotheses) to in fact determine “how random” the algorithm in iTunes and/or the iPod really is.
As we know that no computer algorithm can generate true randomness (but maybeLava Lites can) and as it’s quite likely that the algorithm used in those devices isn’t the most advanced/complex one, it’s safe to assume that the degree of randomness we’re talking about isn’t as high as those deriders assume it is. I’m saying this without knowing whether or not there is such a measure for randomness but, surely, there must be some measure for entropy. That’d work!

What’s infuriating about this series of personal comments (“you see patterns because you don’t know stats!”) is that, assuming those condescending nay-sayers have any scientific background whatever, they should know better than that, just assuming that the algorithm really produces random series of numbers. Pffish! I’d like to be on their dissertation committees…
Why don’t they apply the scientific method? Ya know: observation, hypothesis, test… Kind of thing. It’s taught in some high schools too…
In this case, people observe patterns in a supposedly random series. One hypothesis is that these patterns are artefacts of the human tendency to see patterns everywhere. Fair enough. These people (or people with an experimental bend) could test this hypothesis and show us the results. If you want to do it, don’t test with 100 songs by a few artists. People who see these patterns have thousands of tracks by hundreds of artists in their collections*. Do it with a real world collection. In fact, do it with a collection to which tracks have been added at different times. Here’s why it matters:

The patterns that people see have to do with tracks from the same artist or, more broadly, with tracks that are similar in a more atypical way. Fine. One thing that might be common with these tracks is that they could have been added at the same time. If they have in fact been added at the same time, it’s probable that they reside on the same part of the hard drive, especially on an iPod to which things have been added in a very limited number of “sessions.” When one adds tracks to iTunes, the import process seems not to follow any obvious order so it’s likely that there are specific locations for tracks added in iTunes (on a computer or on the iPod). In this case, because of the way both iTunes and the iPod work, it’s quite possible that it means that they’re in the same folder. Yes, those “Fnn” folders that are supposed to be invisible but from which we can extract files if we want to. Isn’t it possible that tracks in the same folder have a higher probability of being played within a given sequence because of the way the randomization algorithm has been applied to them?

Now, a disclaimer of sorts. I do observe patterns in the way iTunes and my iPod select some tracks. We’re talking about tracks from two albums (out of several hundreds) playing alternatively (a track from album one, a track from album two, another track from album one…) for fifteen tracks. That’s pretty patterned to me. Not “intelligent.” Just patterned, clustered, not-so-random.
In fact, the other day, I noticed that my iPod played one song from one artist, then a song from another artist, then a song from the first artist. I “made myself a bet” (so to speak) that the track after the next would be a track by the first artist. Turns out that it was a song with the same artist involved but listed under another artist (so the “artist” tag wasn’t the same). I believe that I added all those tracks at the same time. Coincidence? Possibly. But it should be proven. “Real scientists don’t believe in coincidence.” Or some such.

It does feel awkward. In a nice way. Another time, I was listening to a song and, for no apparent reason (at least, not apparent to me), I started thinking about a song by a completely different artist. Turns out, that song was the very next song that played after the one to which I was listening. Very strange effect. Now, it’s possible that I always think about many different songs and that I noticed this occurrence because it appeared to “fulfill my prophecy” (the same way people see a conscious hand at play when one connection occurs between different events that have been associated in many different ways). Or it might be that I had heard these two songs in succession before and that hearing one made me think of the other. I tend to lean toward the second hypothesis because, the way my brain works (when it does work), I usually think about “the next song” based on sequences to which I’m used. For instance, if I made myself a specific playlist and I played it (in linear sequence) enough times, chances are that if I hear one of the tracks, I’ll think of the next track in that playlist even if the context is completely different. I’m probably not the only one who does this type of “stream of thought” association. But, you never know.

Anyhoo… I’m not saying the iTunes/iPod “shuffle” algorithm is smart/intelligent/sentient. But I do think that it generates some kind of cluster effect, the result of which sometimes feels spooky…

*My iPod (2G, 20GB) statistics:
101 Genres
644 Artists
703 Albums
3737 Tracks
Tracks by/with the artist of whom I recently had a cluster of songs: 55

9 thoughts on “iPod/iTunes Shuffle Mode Really Totally Random?”

  1. I have only read your article and one other. The other contained both the psycho analysis/statistical bent that you are referring. Just to let you know my approach, I am a math/computer science teacher with a major in psychology, so I hear their 2 arguments, but since the ipod is a computer I feel that there must be some artificial intelligence at play here.
    Have you read other articles that refer to this? Here is my thought about some of the things that I would think about in my approach to creating randomness.
    No one mentions that a truly random mix would stink to high heavens. I don’t want the Beastie Boys followed by Vivaldi’s four seasons and yes, my ipod does have both of those artists! I notice that ipod does a great job of avoiding such awkward combinations.
    There is so much data that an ipod has that these articles refer to (recently played, playcount, genre, etc.) that it is interesting to think about the artificial intelligence algorithm that they might have used. What if you rated each song for compatibility on a 4 field combination score (artist, album, genre, song title) and choose the song with the highest compatibility score. Then after the next song is chosen, you change the four fields that you judge on, so you don’t just get all songs by that artist (in this example).
    This seems intelligent to me and I argue that Macintosh might have avoided TRUE randomness for something less awkward.
    The statistics on that story that you told with 4 songs in a row, sound staggering (go for the lottery staggering) and the idea of you guessing the next song strikes of the Celestine Prophecy or the Secret.
    In avoidance of being referred to as a whacko, I will cease and desist, but these are a few of my ideas I wanted to bounce.

  2. @Jay Interesting topic (IMHO). Are you talking about current versions of iTunes and/or iPods? There might be room for analysis, discussion, research, here. Maybe it’s available but I haven’t seen it.
    I really don’t take you to be a whacko or anything. I do notice that this issue is one through which people like me have been labelled in unflattering ways. In other words, I’m “on your side” but I’ve stopped talking with people about this.
    In the past few years, I think this topic has been dropped by most people. One reason seemed to be that the “birthday paradox” claim became widely accepted (that the shuffle function was truly random and that pattern perception was flawed) People like you and I who think that different explanations might be possible have been the object of rather dismissive comments. You know, the usual “Ah, you just don’t get it.” While, as an academic, I have some trouble accepting the concept that the shuffle’s randomness may be truly random.
    Another reason seemed to be that the topic became something of a bore in a number of contexts. To some people, it seemed like the case had been closed and any further discussion of the topic was considered boring.
    Another reason the topic has been dropped is that the algorithm has changed, at least in iTunes (I don’t know about recent iPod models but it’s not in older iPods). After people like us had been talking about weird occurrences in shuffled sequences Apple, which was continuously claiming that the shuffle function was truly random, changed the shuffle function in iTunes to be a Smart Shuffle. It now has a slider going from “More likely,” to “Random,” to “Less likely.” There’s also a description under this slider:
    “Drag the slider to change the likelihood of hearing sequential songs by the same artist or from the same album (when shuffle is on).”
    The claim seems to be that the “Random” position on this slider corresponds to the original shuffle function while the other values imply the use of a new algorithm which will either decrease or increase the likelihood of what we perceive as patterns in sequences.
    This new iTunes feature appeared shortly after I wrote this blogpost, as far as I can tell. To me, it implies that Apple recognized the power of more patterned shuffle thanks to people’s comments that shuffle didn’t appear completely random.
    Since this feature appeared, I haven’t had any of the apparent patterns I was describing in this blog post either in iTunes or on an older generation iPod . One reason might be that I spend less time in shuffle mode (and I listen to podcasts more than “songs”). Another reason might be that they fixed the randomization algorithm to be closer to true random.
    Again, I don’t know if recent iPods (or the iPhone) have the Smart Shuffle and I myself dropped the topic since this blogpost.
    But the topic can be revived. There’s certainly room for experimentation in this field.
    In fact, I think more research on randomness and pattern perception can help recommendation systems such as the ones in Netflix, Pandora, Last.fm, etc.
    You can certainly report back if you find anything.

  3. I don’t have the patience to set up a valid experiment. Based on experience I feel there is some algorithm other than randomness at work. I have 5K plus songs and to have 2 consecutive songs play from the same album or the same artist – well that’s not random. I know, it could be but I’m buying it.

    I wish Apple would provide an answer – the engineer in charge must be aware of the number of us wondering about this.

    Anyway – just chiming in that in the short time I’ve used my iPod – Christmas ’07 to now it quickly became an ongoing question to myself: what’s the actual shuffling formula?

    Dave K

  4. @Dave The official word has always been that the algorithm itself was producing “totally random” results. What gets me, though, is that the algorithm is always deterministic and that the degree of randomness isn’t ever perfect. So, it’s still possible that the clustering effects we notice are a function of our pattern perception, yet we have no way to tell.
    There have been experiments done, over the years. I’d call the results inconclusive, in part because they occur with limited playlists. I still think there might be a clustering effect happening because of times at which different tracks have been added to a library.

  5. I’ve been convinced that the random/shuffle feature on my iPod is useless for a while and today proved it. I went on a long journey again that I went on only a few weeks ago. A large proportion of the same tracks played again and my passenger confirmed this. The problem is that I think the iPod uses the same algorithm each time you press play. If you get in the car, select the same playlist each time and shuffle it, you are likely to get a very similar selection to the last time you did it.

    All I know for definite is that it’s very annoying!!

  6. @Loz Thanks for sharing!
    I’ve noticed something similar recently, with my iPod touch. When I posted that blog entry, the problem was somewhat different. While you were shuffling (you press play in shuffle mode and let it play) related tracks would play in succession. At one point, I could have bet on what the artist of the next track would be, out of hundreds. In terms of generating pseudo-random numbers, I think the algorithm Apple was using at that time was not that efficient. But the clustering effects were interesting.
    Since then, I’m quite certain they changed the algorithm. For one thing, they added a slider in iTunes to control how predictable results would be, which implies that they at least added something to the algorithm to make it less like purely random (and more deterministic).
    The problem you point out, though, is more like a simple bug. I also think that the iPod generates similar lists every time you press play unless you do something to seed it again. I think that pressing the shuffle button twice (make it non-shuffle and shuffle again), you get a better shuffling effect.
    Otherwise, the Genius feature gives you a deterministic list but I think it specifically doesn’t give you the same track twice. I actually like to use the Genius feature when I find a track (through shuffle) which suits my mood.

    1. Thanks for the link. This post was in reference to older versions of the algorithm and I actually stopped having the patterns that made me suspicious. But I’m glad some people have looked at this in a serious way. Flatearthers (who rush to tell you you’re wrong, without doing any research) sadden me.

Leave a Reply

Your email address will not be published. Required fields are marked *