Search:

<< >>
      1
2345678
9101112131415
16171819202122
23242526272829
3031     

view by post / day / month

posts
my descent into madness 3/29/2003
prisoner 3/27/2003
a new stereophonic sound spectacular 3/26/2003
chelsea, chelsea, chelsea 3/25/2003
one liner 3/21/2003
vengeance (abridged) 3/21/2003
can we? 3/19/2003
we're involved in craziness 3/19/2003
black and white crystal ball 3/17/2003
handy dandy 3/17/2003
more science babble 3/7/2003
do you remember what the music meant? 3/7/2003
random number generators 3/4/2003
giddyup 3/3/2003

previous next
 
 
random number generators 11:41am 3/4/2003  

A few months back i commented that i felt my iPod was much more adept at selecting random songs than Winamp. The reason for this was a combination of science and emotion: for starters, it seemed that the i was much happier with the song selection on the iPod than on Winamp. However, on a more technically tangible level, it seems that Winamp's song selection isn't all that random, that i will hear the same song two or three times in a day, which seems highly unlikely given that in theory, Winamp is playing me maybe 30 or 40 songs per day, selected supposedly at random from a library of almost 4000 songs. If selection is truly random, playing a specific song should occur with a probability of approximately 0.025%. Therefore, if i hear say, New Order's "Blue Monday" once, the probability of hearing it again that day is 1 minus the probability that all 30 other songs that day are not "Blue Monday": 1 - (3999/4000)30, or 0.7%. The probability of it being played three times is even more ridiculous: 0.007(1 - (3999/4000)29) = 0.0054%. So what's going on here?

There are several reasons why Winamp's performance might deviate from normal statistics. First, i start and stop Winamp typically five to ten times a day. Assuming it is using a random number generator, this process could potentially reset the random number seed and influence the randomness of the numbers selected. Second, when i start up Winamp each day, i typically press play first, which begins playing the first song on the playlist. This may be how Winamp gets its random number seed, so if i may be biasing the seed, leading to non-randomness in the song selection. Compare this to how the iPod operates: you select a song from a playlist, and then prior to playing, the entire playlist is randomized. This prevents the possibility of hearing the same song twice during a single playlist, as the song order is fixed during this process, until you manually select a different song, then the playlist is randomized anew.

Sorry, i just couldn't resist. After learning all about random number theory in relation to Monte Carlo simulations, this practical application seemed interesting to me. Now i need to turn to my experimentalist side and conduct investigations of the random songs played my Winamp under different conditions. Or maybe i just go look at the Winamp source code. Nah, too easy.

last edited 11:41am 3/4/2003 back to top
 
 
previous next