Something just happened that I am curious about. I have 2997 songs on Winamp. It turns out that I have some repeats of songs. Most songs are represented only once. A small number are listed twice, and I think only one song is repeated 3 times.
When I load the player I shuffle the order of the songs and reverse the order as well. This is done randomly to ensure a nice mix in the play list. Is there any way to calculate the odds of same song showing up three times in a row?
What is the purpose of reversing the songs after the shuffle?
Lets assume for the sake of argument - to see what the odds are on the low end - every song is repeated three times. To make the math easy - assume 3000 songs.
So 1,000 unique songs.
After every song plays - there is a 1 out of 1000 chance it will play again (not sure if shuffle is different from random - as in doesn’t allow repeats - but assume repeats are allowed).
This means you have a 1 in 1000 chance of hearing a song twice in a row.
Every thousand times or so this will happen - what are the chances of it happening a third time? Multiply that by 1,000 - so 1 in a million.
So using conservative rules - or liberal I guess - you have no greater than a 1 in 1,000,000 chance of hearing the same song three times in a row.
This assumes the random number generator is truly random of course.
If the songs are shuffled, the only songs that could possibly come up three times in a row are the ones that you have three copies of. If we knew how many of those there are, somebody could easily do the math. Not me, but somebody
These are assuming that that winamp uses a perfect random number generator. I have to assume that it’s better then when I used it 10 years ago, but back then it was awful. Hearing the same songs over and over was pretty normal. I had about 1500+ songs, I shuffled the list and then told it to pick randomly. It was like it picked a group of about 10 near the top and a group of about 10 near the bottom and just kept flipping back and forth between those two groups all night.