Tuesday, September 20, 2005

How Random is Your iPod?

One of my favorite features on my iPod is the shuffle. Putting the iPod on shuffle is the equivalnet of creating the finest radio station ever...one that is perfectly taiolred to your tastes.

However, I've often found myself scratching my head as multiple songs from the same album have popped up within a few tunes of each other. That album may represent less than 0.3% of all the songs on my iPod but somehow three of six songs in a sequence are from that album. It just seemed like something was wrong with the random number generator.

Well, Wired has a good article on this phenomenon this week. There seems to be two parts to the answer of the question: "Is iPod's shuffle random?"

The first part of the answer would seem to indicate that it isn't random:

One hint came from my computer science friends. They told me how hard it is for a PC, which is designed to do things in predictable ways, to generate a string of numbers that are statistically random. Try as they might to compile a list of numbers at random, computers frequently spit out digits that have discernible patterns to them.

To compensate for this shortcoming, programmers have devised code recipes called algorithms that churn out large banks of numbers that, for the most part, are completely independent of each other. Scientists refer to the algorithms as "pseudorandom number generators" because they do a good job creating unpredictable lists but can break down in some circumstances.

However, the second part of the answer is that we often has unreasonable understandings of what is random:

The problem, it turns out, isn't that the programs aren't randomizing my playlists. They are. According to Jeff Lait, a mathematician and author of randomm3u, it's what's happening between my ears, specifically, in my expectations of what it means for something to be random.

To illustrate his point, Lait referred to a phenomenon statisticians call the birthday paradox. Roughly stated, it holds that if there are 23 randomly selected people in a room, there is a better than 50-50 chance that at least two of them will have the same birthday. The point: Mathematical randomness often contradicts our intuitive expectations of randomness.

What we want, Lait says, isn't a list that's been randomized, but one that's been stratified, or separated into categories that are weighted by a listener's preferences. A stratified playlist might select songs randomly but would be smart enough to throw out choices that, say, would repeat a band within 10 songs.

Interesting. So, I guess I'm not nuts and there may be a problem with the iPod shuffle's randomness but, overall, I should just accept that sometimes random means hearing three songs from The Go! Team in a row.

4 comments:

Nico said...

Yeah...I must say I was curious how out of 4,000+ songs currently on mine that songs on the same album would pop up back to back.

Jim said...

I've never had the back-to-back phenomenon occur. However, what I find interesting is this -- I'll put together a new playlist (say, for my workout at the gym) and when I hit shuffle for that playlist, my iPod will typically play first the songs that I've listened to the least (e.g. songs that I've just recently downloaded from Fluxblog, Music for Robots, etc.).

Flatlander said...

Very true. That seems to happen to me too. Even with the overall library shuffle, it tends to play things either I just listened to or stuff I just added to the library. But then again, as the article mentions, perhaps it doesn't do it any more often that it plays other stuff and we just notice it more because we just added it to the library.

Anonymous said...

I just googled "is ipod shuffle random" after having loads of bands with connections to each other come up consecutively - eg jay-z then the beatles... so weird