canj 😐nerdy Work

Listens: Beck - Novacane

This is what I think about at lunch

Ok, time to math nerd at you guys for a second.

While I was chomping down on my tasty Subway sandwich, I decided to pop a CD into my computer so I could have some digestion music. I hit the "Random" button in the player program and hit play. The following is what popped into my head immediately thereafter:

"How likely is it that all of the track will play in order, even with the randomize function on?"

First let's make a couple assumptions.
  1. The randomizer won't play a track twice in a row.
  2. Other than that, it is equiprobable that any track could be played


Now, let's represent the number of tracks on a CD as 'N'. That means that each track (and therefore the probability of picking it) is 1/N (1 out of all tracks). So, the probability of picking the first track on the CD when the play button is pressed is 1/N.

If the randomizer could play any track at any time, everything else would be 1/N as well. However, I've stipulated that the randomizer won't select a track twice in a row. That means that after the first track, there are N-1 tracks to select from. So, the probability of picking any of them is 1/(N-1) (1 out of all but the track played).

Just in case your math is rusty: Exponents mean 'multiply by the same thing' the number of times the exponent shows. So, 2^3 (2 to the 3) is the same as 2 x 2 x 2.

Ok, final math note. In probability, you can figure out the probability of a group of things happening by multiplying their individual probabilities together. For example, getting heads on a coin flip has a probability of 0.5 or 1/2. The probability of getting heads 3 times in a row is (1/2) x (1/2) x (1/2) = 1/8.

Ok, now that we've gotten all the math review out of the way, here's the calculations:



The probability of playing the tracks in order is (1/N) x (1/(N-1)^(N-1). That is, the probability of picking the first track first multiplied by the probability of playing all the others in order. The exponent is (N-1) because otherwise we'd be counting the first play too, which would make things FUBAR.

So for, let's say, a 15 track CD, this would be (1/15) x (1/14)^14.



My CD has 13 tracks...

Plugging '13' in, my calculator gives me "8.6274349834319295592983547055589e-15" (about 8.63 x 10^-15, or 0.00000000000000863).

This comes out to approximately 1 in 115,909,305,827,328 (that's 1 in 115 quadrillion, 909 trillion, 305 million, 827 thousand, 328).

So here's my question... has this ever happened to anyone????

-Canj ^..^