30 ago. 2009

Suppose you set your ipod on shuffle for a five hour drive and listened to 60 songs, out of a total of 3,000 (2%). How many times would you have to repeat the operation to hear all 3,000? (If you began again with a random, non-repeating selection each time, and never skipped a song or changed the playlist.)

The first time you would hear 60 "new" songs, 100%.

The second drive, you would be working at 98% efficiency, and hear an average of 58.8 new songs.

The third time, you would have heard 118.8 songs already, so now you are working at 96.04% efficiency. You will hear 57.624 new songs out of the sixty you listen to. Now we've heard 176.242. And so on. You fourth trip you'll be at an efficiency of slightly over 94%, for example, you'll add 56 songs. It seems like you should be able to finish in no time. After all, if you set it in one continuous shufflle you could finish in 50 sessions of 60 songs each.

Suppose you keep doing this a while, and have heard half of your songs. By this time your efficiency will be 50% for your next trip. In other words, about half of the songs you will hear are ones you've heard before, and half will be new. Your efficiency = 100 minus your rate of completion, so if you've heard 90% your subsequent efficiency will be down to 10%.

If gets worse. Suppose there's only one song left you haven't heard. Your efficiency rate is now down to .03333%. That's the percentage of new material in your randomly chosen play list. You basically won't hear your last song until you take an average of 300 more trips. Of course, some songs you will have heard multiple times, but that last song will be elusive. Of course, there's nothing that makes that particular song more elusive than any other, because it wasn't the last song until it became the last song. It is as likely to show up as any other song given song on any given trip. it might seem perverse that you have to listen to that other damn song over and over again, but yet somehow cannot complete the set of 3,000 with the one remaining song.

That is because true randomness is no respecter of past events. It's not going to go out of its way to choose new or old songs, because the randomizer doesn't know what it played the last time. At the end of the process there are simply 2,999 "old songs" and 1 "new" one, and chances are many of those "oldies" have been played multiple times, since efficiency (defined as percentage of new material) has been getting lower for quite some time.

At least this is more or less what I worked out in my head as I drove five hours and heard 60 random songs on my ipod.

3 comentarios:

Jordan dijo...

Well, but you can also set up a "smart playlist" to remove songs from rotation after they've been played once.

Vance Maverick dijo...

Why are there no repeats during the first drive? If this is guaranteed, then it's obviously not random.

Jonathan dijo...

I believe that instead of playing randomly through the playlist, the ipod creates, at random, an ordered playlist consisting of all 3,000 songs, which it then follows in exactly that order with no repeats. If repeats were allowed then I'd have to come up with a new statistical model, since the efficiency would be reduced, since you would never be at 100 even at the beginning.