Dave Van Domelen (dvandom) wrote,
Dave Van Domelen
dvandom

Is Shuffle mode broken? A Fermi-ish analysis

A couple of songs from the same album came up back to back while listening to my old iPod Shuffle just now, and it got me wondering what the odds are. So here's how I worked it out.


Sure, I could plug it in and look up the specific playlists and get better numbers, but I'd rather do a more general analysis. First, let's assume that the 12 hours of music on the iPod make up 16 albums each with an equal number of songs. This is wrong, of course (for instance, I have "Still Alive" on as a bare albumless song, and several half-albums because I only liked some of the songs), but it'll do for a Fermi-style rough estimate.

So, when one song ends, there's a 1/16 chance that the next song will be from the next album, if the shuffle mode is functionally random. But since I'm not worried about any specific back-to-back, just the likelihood that there will be one, I need to think about the chance of NOT being from the same album, or 15/16.

If I listen to 8 songs, then there's seven chances for a back-to-back, meaning the chances of never getting one is (15/16)7 = 0.64. So there's a 36% chance that in those 8 songs, I will get at least one case of two songs in a row from the same album. The fact that back-to-back doesn't seem to happen that often suggests, in fact, that the randomization algorithm the iPod uses favors getting away from the current album.

Now to consider a similar case, my newer iPod with (looks it up) 4026 songs currently on it. (Not everything in my iTunes library is on my iPod, tho.) Let's call that 400 albums of 10 songs each on average, subject to the same caveats as before. And I typically listen to it in roughly 10 song chunks. So now my chance of any back-to-back is (1 - (399/400)10) = 0.025, or a 97.5% chance of not having any back-to-back. In the course of a month I will listen to it about 20 times, so (1 - (0.975)20) = 0.394. (I didn't just go with 200 total songs, because a back-to-back that's split by a day in between will probably not be noticed.) So every month, with a random selection, I have a pretty good chance of hearing two songs from the same album one right after the other.

Yes, this is the sort of idle thoughts I have.
Subscribe
  • Post a new comment

    Error

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 4 comments