dimanche 7 décembre 2014

Shuffle / Random / Statistics Question

From a discussion in another thread.



Sadly it has been far too many years since I was in a Statistics class to remember the equation(s). I do remember that this is all quite basic so I am a bit ashamed. I haven't forgotten that I need to word my questions very carefully so I hope that I have at least done that.



Here is the premise. An average CD player has a shuffle feature with "no repeats". That is, it remembers which songs have been played (though usually only until you power down or switch modes). Say you have 100 songs, it will take 100 songs to play all 100, no repeats.



Now here are the questions.





Suppose instead with have a CD player shuffle feature that does not abide by a "no repeats" coding. Let us also suppose it is perfectly random.





Question #1) There are 100 songs. What are the odds that it will play all 100 songs with not one single repeat?






(My knee jerk reaction was that it was as simple as 1 in 100!. (I soon realized that I really meant 1 in 99! because the first song does not matter, but that is neither here nor there because Hellbound reminded me that exact order doesn't matter either so the equation would not be as strict, and therefore not as simple.)





Question #2) There are 100 songs. What is the average number of songs it would take for it to play all 100 songs?





(As far as this question goes, all I remember is that it should be a somewhat symmetrical bell curve; with it playing all 100 with no repeats (like from question #1) on one end and with it taking a pseudo-infinite amount of time to play all 100 on the other end. Just as a random guess I would say that the average is probably somewhere around 1000 songs.)





And like any good fan of statistics I am more interested in the actual equation than the answer. :)




Aucun commentaire:

Enregistrer un commentaire