### Probability for My Students

After The Librarian and I went to get flu shots, we went to a craft fair, and then we met up with Software Guy for lunch. I was talking about my class and how I wasn't sure what I was going to teach on Monday about probability, and he hit upon the most amazing idea: How random is the iPod's (and iTunes') "shuffle" algorithm?

There are n! ways to order a playlist with n songs. (However, iTunes will not choose the identity permutation.) The issues that have been publicized have people complaining about which of the n! arrangements get chosen. There is a perception that iPod favors permutations where there is some sort of connection between consectutive songs (same artist, for example) or where certain artists are favored to be at the beginning of the shuffled playlist.

So far I've made a three-song playlist, and within the first five re-shuffles of it, every non-identity permutation appeared. After the fifth re-shuffle, the list got noisier. Next up is to work on the arrangements of a four-song playlist.

The other issue I need to think about is if I'm going to be shuffling playlists in class with my iTunes projected to the front of the classroom, what type of songs to put on the list. My three-song playlist features Tom Lehrer's "New Math," "My Hero Zero" by the Lemonheads (from the Schoolhouse Rock Rocks album), and "Distance Equals Rate Times Time" by the Pixies.

There are n! ways to order a playlist with n songs. (However, iTunes will not choose the identity permutation.) The issues that have been publicized have people complaining about which of the n! arrangements get chosen. There is a perception that iPod favors permutations where there is some sort of connection between consectutive songs (same artist, for example) or where certain artists are favored to be at the beginning of the shuffled playlist.

So far I've made a three-song playlist, and within the first five re-shuffles of it, every non-identity permutation appeared. After the fifth re-shuffle, the list got noisier. Next up is to work on the arrangements of a four-song playlist.

The other issue I need to think about is if I'm going to be shuffling playlists in class with my iTunes projected to the front of the classroom, what type of songs to put on the list. My three-song playlist features Tom Lehrer's "New Math," "My Hero Zero" by the Lemonheads (from the Schoolhouse Rock Rocks album), and "Distance Equals Rate Times Time" by the Pixies.