What are the odds?
March 16, 2006 2:35 PM   Subscribe

MathFilter: What are the odds? I have exactly 5,115 mp3's on my iPod. I was just sitting here at work listening to it shuffle through stuff. "Me, Myself, and I" by De La Soul came on, THEN when that was over it was immediately followed by "Freak" by George Clinton. The De La Soul track samples heavily from "Freak". What are the mathematical odds that the next track in a random playlist would be the sample source of the previous song?
posted by letterneversent to Science & Nature (34 answers total) 1 user marked this as a favorite
 
Depends how many songs were sampled in the source song, and how many of those target songs you had in your collection.
posted by neustile at 2:37 PM on March 16, 2006


Well, it would depend on how many songs you have on your iPod that sample from other songs on your iPod. How many is that?
posted by kindall at 2:38 PM on March 16, 2006


Response by poster: Okay, then how about for this specific scenario?
posted by letterneversent at 2:38 PM on March 16, 2006


Do you mean, 1 in 5,114?
posted by cribcage at 2:39 PM on March 16, 2006


I presume that since there were 5,114 other songs on your iPod, there was a 1 in 5,114 chance, or 0.019554%.
posted by WCityMike at 2:40 PM on March 16, 2006


If M,M&I sampled just one song, and you had it in your collection, the chances it would hit it are the same it would have played "Save a Prayer" by Duran Duran if you had that too. 1 in 5,114, assuming the iPod doesn't repeat in random mode (i.e. it's a true shuffle.)
posted by neustile at 2:40 PM on March 16, 2006


Response by poster: It's not just 1 in 5115, I don't think. Let's say any two songs could be related to one another... I don't think it would simply be 1 in 5115 would it? Because you're not just taking the odds that the one song would play, you're have to take into account that the exact related song would play immediately following.
posted by letterneversent at 2:41 PM on March 16, 2006


Now that I rethink my answer, it really depends on Apple's iPod OS's randomization algorithm, too — and that's probably proprietary, so I think we'd probably only have observational knowledge of that.
posted by WCityMike at 2:41 PM on March 16, 2006


You haven't given enough information to answer your question.

How many of the 5115 songs have samples in them?
How many of the sample sources are also represented in your mp3 collection?

(Also, some of these songs presumably have more than one recognizable sample, which will complicate matters. Even worse, if memory serves, iPod random isn't really random, and Apple hasn't revealed all the details about the algorithm they use.)
posted by box at 2:41 PM on March 16, 2006


Best answer: IANAM. It depends a bit on the rules of the shuffle program, but the odds are no greater than one in 5,115 that a certain song will be played at any given time. I think the way to figure out the odds that two specific songs will be played in a row are 1 in (5,115*5,114), or 1 in 26,158,110 (assuming that the shuffle program won't allow the same song to be played twice in a row).
posted by syzygy at 2:42 PM on March 16, 2006


Response by poster: If syzygy is correct, it's not exactly astronomical, although it is highly unusual. Thank you. Btw, I got an error when trying to unmark an answer. I assume this is a known issue.
posted by letterneversent at 2:47 PM on March 16, 2006


syzygy: That's the odds that two specific songs are played in a row.. which wasn't the question. The ? was what are the odds that any song is played and then some related song to the source song is played right after. Still not enough info, as you need to define "related" and count the # of relations. But given that any song can be related, 1 in 5,114.
posted by neustile at 2:48 PM on March 16, 2006


I of course meant, given that 1 song is related, 1 in 5,114.
posted by neustile at 2:50 PM on March 16, 2006


syzygy is more-or-less right, if we're talking about playing exactly two songs and having them be MMI/Freak (it's 1/5115 * 1/5115, not 1/(5115*5115), but in this case the product is the same).

As I see it, though, you describe a situation where MMI is already playing. And if it's already playing, then the odds of that event happening are 1/1. 1/1 * 1/5115 = 1/5115.

(This still isn't the right answer, though, because of the iPod shuffle algorithm. And because 'Freak' isn't the only sample in 'Me, Myself and I.')

(On preview: I really shouldn't take so long to compose these replies.)
posted by box at 2:53 PM on March 16, 2006


IANAMoP*, but the only reason "Freak" after "Me, Myself and I" is notable is because of external, subjective stuff. That is, not mathematical. It's like the odds of rolling two 6s in a row w/ dice — same as rolling 1-2, 5-4 or any other combination. Only notable because we happen to know that 6 and 6 are the same number — the dice don't.

Given the first occurrence ("M,M&I" or 6), the odds of hitting a notable second occurrence ("Freak" or 6 again) are the same as hitting an uninteresting one ("Pinball Wizard" or 2). However, the probability of hitting *both* songs on a given press of the "play" button is, I think, the square of the probability of hitting one: 1 in 10,228 or 0.00038236%.

*Master of Probability
posted by drewbeck at 2:53 PM on March 16, 2006


I meant 1 in 26,158,110
posted by drewbeck at 2:54 PM on March 16, 2006


Yeah - syzygy is right if the question is "what are the chances that I turn on my ipod and those two songs play in that order". But if the question is "I happen to be listening to MM&I - what are the chances that its sample source will come on next", then the answer is 5114.
posted by metaculpa at 2:54 PM on March 16, 2006


Response by poster: What are the other samples in MMI?
posted by letterneversent at 2:54 PM on March 16, 2006


The-breaks.com says 'Funky Worm,' Edwin Birdsong's 'Rapper Dapper Snapper' and a few others.
posted by box at 3:03 PM on March 16, 2006


neustile: You're correct. My answer gives the odds that "Me Myslelf and I" and "Freak" will play, in that order. In order to figure out the answer to the question, "what are the mathematical odds that the next track in a random playlist would be the sample source of the previous song?", we would have to know how many songs (A) in the playlist use how many other songs (B) in the playlist as sample sources. I think the full equation would look something like this:

(A / 5,115) * ([B / A] / 5,114)
B/A takes care of the chance that any song in list A may have samples from more than one song in list B. Again, I never took statistics, so I'm probably wrong.
posted by syzygy at 3:10 PM on March 16, 2006


Yeah, the "say it now" bit (about 0:09 into the track and throughout) that can be heard in about 80% of that era hip-hop is the awesome "Funky Worm" -- "ME AND THE OHIO PLAYERS ARE GOING TO TELL YOU ABOUT A WORM, HE'S THE FUNKIEST WORM IN THE WORLD!"
posted by neustile at 3:11 PM on March 16, 2006


i.e. if you had Funky Worm in your iPod, this probability would be about .85 instead of 0.00019 :)
posted by neustile at 3:12 PM on March 16, 2006


The correct question to ask is probably "What are the odds of two songs coming up that make me want to post to AskMe?", or even possibly "What are the odds of two songs coming up on somebody's iPod that make said person want to post to AskMe?"

The answer to this is distinctly unclear, but there is certainly no reason to believe your iPod is anything other than random.
posted by edd at 3:15 PM on March 16, 2006


It's important(?) to note that B, in my above equation, can contain a sampled song more than once. That is, if "Freak" is sampled by two songs on the playlist, then it should be counted twice in B.
posted by syzygy at 3:20 PM on March 16, 2006


(Technical aside)
The sample in Me Myself & I is actually Funkadelic's "(Knot Just) Knee Deep", from Uncle Jam Wants You. The song found in p2p networks called "George Clinton - Freak" is either "Knee Deep (Midnight Mix)" from Greatest Funkin' Hits or "Knee Deep (The Deeper Mix)" from the Good Burger soundtrack.
posted by modofo at 3:35 PM on March 16, 2006


The iPod uses a neural wave algorithm that senses which songs you subconsciously need to hear. Thus the odds are much higher than the others have noted.
posted by yclipse at 3:40 PM on March 16, 2006


No, syzygy is wrong. those are the odds that you would have heard two songs if you just started listening to songs on your ipod. but you already heard the first song The chances that the next song after that one would be the one that samples it would be 1/5115.

Of course the odds that it did happen, knowing that it already has are 1/1.
posted by Paris Hilton at 4:09 PM on March 16, 2006


Remember, the iPod's "random" system will not play the same track twice until you reset the session. Thus, in this particular instance we need to know how many songs you'd already listened to as they will be removed from the total available songs. Also, if one of the two has already been played it's game over.

For example, I'm currently on song 185 of 1885 (wow, what are the odds of that? ;) The chance of my, for example, two songs that are both called "Entropy" being the next two songs are something like 1:(1700*1699/2), as long as neither have already been played, in which case it's zero. (I'm sure someone better at maths than I could merge those two cases together.)
posted by krisjohn at 4:27 PM on March 16, 2006


Paris: No, syzygy is wrong.

Not so fast. Now we're getting into semantics.

The question was, "What are the mathematical odds that the next track in a random playlist would be the sample source of the previous song?" You may choose to interpret the question as, "when song X is playing, what are the chances that song Y will follow?" I covered that interpretation in my first answer.

Another way to interpret the question is, "what is the probability that 'MMAI' and 'Freak' will be played consecutively?" I also answered that question correctly in my first post.

After more consideration, I think the most correct (and interesting) interpretation is, "what is the probability that, at any time, two songs will play consecutively, such that the first song contains a sample of the second song?" I believe my second comment contains the correct answer to this interpretation of the poster's question (taking into account my admitted limited knowledge of the iPod's shuffle algorithms).
posted by syzygy at 5:27 PM on March 16, 2006


Paris Hilton's got it. Let's say you always listen to your iPod on shuffle, and always shuffle the full listing. The odds that "Freak" will follow your next listening of "Me, Myself, and I" are 1 in 5115.

But I'm guessing you would have posted a similar question if "Me, Myself, and I" had followed "Freak" (i.e., it would have seemed as much of a coincidence to you). So the odds of a "Freak/Me,Myself and I" combo are 1 in 2557.5-- more likely than drawing a full house in straight poker.
posted by justkevin at 5:35 PM on March 16, 2006


I love this quote too much not to pass it on:
You know, the most amazing thing happened to me tonight. I was coming here, on the way to the lecture, and I came in through the parking lot. And you won't believe what happened. I saw a car with the license plate ARW 357. Can you imagine? Of all the millions of license plates in the state, what was the chance that I would see that particular one tonight? Amazing!
— Richard Feynman
posted by Johnny Assay at 5:49 PM on March 16, 2006


neighbor.
posted by Satapher at 6:43 PM on March 16, 2006


I can't decide how to model this problem. My first assumption is that the shuffling has just occurred so that all songs have an equal probability of being the first one played. The second assumption is that there is a one-to-one mapping for each sampler/source pair (i.e., one song doesn't take source from more than one other song).

Let's say that you have K sampler/source pairs and you have N songs on your iPod. The probability that any given song is going to play is 1/N, which is also the probability that any given sampler is going to play. The probability that any of the samplers will play (i.e., if you have samplers A, B, and C, A or B or C can play and you would have success in this part) is given by P = 1 - [(N-1)/N]**K.

So now you have the probability that any one of your sampler songs will play first. The probability that the corresponding source file will play next is the probability of any given song playing (adjusted by the fact that one song has already played): 1/(N-1).

In order to get these two events to happen in order, you have to multiply the probability of the first by the probability of the second. P=[1/(N-1)]{1-[(N-1)/N]**K}.

The problem with this is that I have another model that is just as plausible. Say that you have K sampler/source pairs and N songs. The probability of any one of these occurring in order is 1/[N(N-1)]. The probability that any of these pairs will play is the OR of all their probabilities as described above: P = 1 - [(N(N-1)-1)/(N(N-1))]**K.

Both of these models give reasonable answers in some examples I've looked at, but the answers are different. One model is wrong. Intuitively, I'd say that the first model I described is the correct one.

How 'bout we just say "pretty frickin' small?"
posted by forrest at 8:37 PM on March 16, 2006


I just read your comment about "this particular case". syzygy is on the right track, but I have a couple of refinements:

1) If the iPod shuffle plays all songs before repeating, the probability that a song will play is a function of how many songs there are minus the number of songs already played. So P = 1/(N-A), where N is the number of songs and A is the number of songs already played.

2) The probability that you will have your sampler/source pair played in order is therefore P = 1/[(N-A)(N-A-1)]

3) The exception to #2 is the degenerative case where the source song has already played before the sampler song plays. In that case, the probability of the pair playing in order is obviously zero.
posted by forrest at 8:45 PM on March 16, 2006


« Older switching to dvorak on OS X   |   <frink>How does a _person_ use REST... Newer »
This thread is closed to new comments.