Slashdot Mirror


Crunching the Math On iTunes

markmcb writes "OmniNerd has posted an interesting article about the statistical math behind iTunes. The author makes some interesting observations concerning the same song playing twice in a row during party shuffle play, the impact that star ratings have on playback, and comparisons with plain old random play (star ratings not considered)." From the article: "To test the option's preference for 5-stars, I created a short playlist of six songs: one from each different star rating and a song left un-rated. The songs were from the same genre and artist and were changed to be only one second in duration. After resetting the play count to zero, I hit play and left my desk for the weekend. To satisfy a little more curiosity, I ran the same songs once more on a different weekend without selecting the option to play higher rated songs more often. Monday morning the play counts were as shown in Table 1."

12 of 276 comments (clear)

  1. Reminds me of... by Anonymous Coward · · Score: 5, Funny

    the time my 2G iPod seemed to have a liking for the Aphex Twin's Selected Ambient Works Vol. 2. It was playing a track off it pretty much every other song. Those of you who know the album can appreciate that it's not the kind of music that you'd maybe choose as everyday listening material.

    It became so annoying that I ended up removing the album from iTunes, at which point my iPod promptly died. The replacement was big on Roxy Music IIRC...

  2. that sucks by Anonymous Coward · · Score: 5, Funny

    I can't tell you how many Christian record stores I'm permanently banned from.

  3. Finally by Ed+Thomson · · Score: 5, Funny

    Someone to show how cool mathematics is

  4. Re:Ok... by QuantumG · · Score: 5, Insightful

    Confirming something instead of just assuming it is the case. What's that called again.. oh yeah, Science! Clearly this article is in the wrong section.

    --
    How we know is more important than what we know.
  5. Underlying formula by Pemdas · · Score: 5, Informative

    From their results, I'd venture a guess as to the underlying algorithm:

    Each song is given a number of points equal to (rating + 1). Then the probability of the song being played is (song rating)/(total points).

    Or, to put more succinctly:

    prob(song) = (rating)/(n + sum(i=1..n)(rating(i)))

    That yields probabilities in the given test case of:

    5 star - .285
    4 star - .238
    3 star - .190
    2 star - .143
    1 star - .095
    0 star - .048

    Which is reasonably close to what the author found. Heck, if I were implementing that feature, it's what I'd try first...

    1. Re:Underlying formula by ciroknight · · Score: 5, Interesting

      Your decimals look more like the pricing model than the weights for playing songs..

      5 star - .285 -- $299, iPod (full?) 20gb
      4 star - .238 -- $249, iPod mini 6gb
      3 star - .190 -- $199, iPod mini 4gb
      2 star - .143 -- $149, iPod shuffle 1gb
      1 star - .095 -- $99, iPod shuffle 512mb

      --
      "Victory means exit strategy, and it's important for the President to explain to us what the exit strategy is." G.W.Bush
  6. Some calculations errors in my opinion.. by Fr4ncis · · Score: 5, Informative
    If you have 2000 songs and 40 of them are from the same artist, there is always a 2% chance of hearing them next with random play. So right after one of their songs finishes, odds almost guarantee they will be played again within the next 50 songs and show a 50% chance they will play again within the next 25 songs. It's simply the mind's tendency to find a pattern that makes you think iTunes has a preference.

    A way to calculate the odds that 2% will be played in the next 50 songs doesn't work 50* (2/100) = 100% as the author does, and neither 25*(2*100) = 50% is correct.

    The correct calculations are: 1-(98/100)^50 = 63% and 1-(98/100)^25 = 39%.
    This way you calculate the odds a song will be played at least once in the next 50 or 25 songs.

    If you want to calculate the odds the song will be played exactly once in the next 50 or 25 songs:

    50 * (2/100) * ((98/100)^49) = 37% or 25 * (2/100) * ((98/100)^24) = 31%.

    I guess that's all..
  7. Re:Interesting by Feanturi · · Score: 5, Funny

    A public moderation system, cool. That never gets abused anywhere that I know of.

  8. Re:iTunes is a monopoly by PaulusMagnus · · Score: 5, Insightful

    Reads just like one of those anti piracy adverts the MPAA forces us to watch at the movies, or that FACT in the UK put on their DVDs.

    Piracy happens because technology happens. We pirate music because it's easy to copy and considerably less than buying it. We don't pirate books because it's frankly too expensive in photocopying charges but there's a whole collection of pirated PDFs out there, if you care to look.

    Technology changes the world we live in. I don't recall the Horse & Cart Association of America (HCAA) suing people that moved to cars which put them out of business. I also don't recall the MPAA or RIAA suing Intel, IBM or Microsoft for giving us these tools that enable us to pirate music.

    If piracy destroys the music business, so be it. Technology often destroys antiquated business models whether it's children cleaning chimneys, horse drawn carriages, coal mining or farming by hand. These people need to find a business model that works. An artist only makes around 5% from every track sold, the label and distributors cream off the rest. That's unfair, IMO.

    Why do we also need to have movie distributors for every corner of the world bidding for the distribution rights? Are we not one global market?

    I think it's about time that the movie and music industries were overhauled as they've had way too much power and too much of a monopoly for too long. After all, we're not killing people here with this technology, we're just changing lives. We're just hurting the profit margins, I thought this is what happened in a capitalist and democratic society. Why do we in the Western world create these societies with freedom to innovate and freedom to make money but then try to shackle them when it starts to backfire?

    Bring on the technology, lets keep changing the world!!!

  9. Modal Music by Johnny+Mozzarella · · Score: 5, Interesting

    A friend of mine who worked at a radio station that played a very diverse range of music told me how they select music.

    She said that research had shown that listeners would rate the same song higher if it followed other song of a similar genre. If they play songs of different genres randomly the listener does not enjoy the music as much.

    So their tendency is to play "blocks" of music.
    For example....
    4 Classic Rock songs
    3 Blues Songs
    3 Folk songs
    4 Female Rockers
    3 Grunge
    etc.

    This is common knowledge in the radio world. I wonder if Apple has incorporated this type of logic into it's iTunes algorithms?

    The radio station in question is WXPN and can be found under iTunes > Radio > Public > WXPN

  10. Re:Ok... by TheGavster · · Score: 5, Funny

    All lies! The play order is too complex to occur naturally; there must be some intelligence that selects the order of the songs!

    And, of course, looking into the origins of said intelligence is blasphemy.

    --
    "Because Science" is one step from "Because old book". Try "Because of my experiment testing my falsifiable assertion".
  11. the REAL underlying formula by Bert690 · · Score: 5, Interesting
    OK, after a bit more thinking, you were indeed very close. It appears the actual formula is:

    points(0 stars)=1
    points(1 stars)=3
    points(2 stars)=4
    points(3 stars)=5
    points(4 stars)=6
    points(5 stars)=7

    probability(X stars) = points(X stars) / 26

    This yields the following probabilities, listed along side the observed values from the article along with 95% condience intervals.

    p(5 star)=.2692 [.270 +- .0038]
    p(4 star)=.2308 [.230 +- .0036]
    p(3 star)=.1923 [.189 +- .0033]
    p(2 star)=.1538 [.154 +- .0031]
    p(1 star)=.1154 [.118 +- .0027]
    p(0 star)=.0385 [.039 +- .0016]

    As you can see each computed probability falls within the 95% confidence interval, so there's a good chance this is the correct forumla.

    Boy do I have too much time on my hands today.