HOMEWORK 6 iPod Shuffle - Revisited

Page created by Diana Snyder
 
CONTINUE READING
CATALST Project                                                                  iPod Shuffle Revisited
Unit 1: Chance Models and Simulation                                                     Homework 6

                                          HOMEWORK 6
                                       iPod Shuffle - Revisited

In the iPod Shuffle activity, we examined randomly generated playlists to come up with rules to
determine whether three suspicious play lists were not actually generated by a random process.
Some of the rules that were generated involved reasonable ranges of numbers of songs on a playlist
by the same artist, number of songs in a row by the same artists, and number of different artists on a
playlist. Some of the rules compared these numbers for the three suspicious playlists to the ranges
of values found when examining the 25 randomly generated playlists, and decisions were made
about three playlists.

A statistician might solve this problem by creating a model for producing randomly generated
playlists, and then using this model to generate many playlists to get an indication of the
characteristics of playlists that occur just by chance. For example, two characteristics that were
examined by Froelich, Duckworth & Culhane (2009)1 were the number of songs by all groups and
the length of time before Steely Dan (LTBSD). Then, the data from a suspicious playlist could be
compared to the randomly generated data.

Using the results of two simulations carried out in TinkerPlots, you will gather evidence to
provide an answer to the following research question:

                                 Research Question
        Is there convincing evidence that Mr. Hoffman’s iPod Shuffle feature
         is producing playlists which are not randomly generated, based on
            (1) the maximum number of songs that appear on a randomly
        generated playlist for all artists played; and (2) the typical number
        of songs played until a certain artist is played (length of time until
                                      Radiohead).

1
 Froelich, A., Duckworth, W. D., & Culhane, J. (2009). Does your iPod really play favorites?. The
American Statistician, 63(3), 263-268.
                                                                                                     1
CATALST Project                                                                      iPod Shuffle Revisited
Unit 1: Chance Models and Simulation                                                         Homework 6

Setting Up the Model
                                                               Setting Up the Model
Rather than taking the time to enter in the artists for each
                                                               •   Open up the TinkerPlot file HW-06-
of the 80 songs in Mr. Hoffman’s library, the data has             iPod-Revisited.tp containing Mr.
been put into a sampler for you. Although only the artist          Hoffmanʼs artist data in the sampler.
labels are provided, each case represents a song in Mr.            The sampler has 80 elements,
Hoffman’s iTunes library. Be sure that there are 10 songs          representing 10 songs for each of the 8
                                                                   artists.
for each of the 8 artists.                                     •   The Draw value is set at 1 and the
                                                                   Repeat value is 20 (this simulates
1. Set up the model to draw a random playlist of 20                playing 20 songs from Albert Hoffmanʼs
   songs from Mr. Hoffman’s library (see instructions in           library).
                                                               •   Since the iPod shuffle feature will not
   margin). After you have set up the model, click the             repeat songs, once a song has been
   Run button to run a single trial of the simulation.             played, we want to make sure that we
                                                                   donʼt play it again. (We will be sampling
                                                                   without replacement.) Click on the
                                                                   device menu and select
                                                                   Replacement > Without
                                                                   Replacement.

                                                                                                               2
CATALST Project                                                                      iPod Shuffle Revisited
Unit 1: Chance Models and Simulation                                                         Homework 6

                                                              Computing the Maximum Number of
                                                              Songs for an Artist in one Playlist
Computing the Maximum Number of Songs Played by an            •   Create a plot of the Artist attribute.
Artist in one Playlist                                        •   Count the number of songs played by
                                                                  each artist using Case Count (N).
Use the results from many trials of the simulation to         •   For each artist, collect the number of
                                                                  songs played for that playlist. There
determine the maximum number of songs played by an                should be 8 attributes (8 columns) in
artist in a playlist that was randomly generated (the             your set of collection window. If not,
TinkerPlots instructions are in the margin).                     then rerun the sampler until a playlist
                                                                  has at least one song by each artist.
                                                              •   Create a new attribute called
By now, you have conducted several simulations using              Concatenate. Note: This attribute will
TinkerPlots, so recall the basic steps for conducting a          combine all of the artistsʼ counts into
                                                                  one list. We will then sort this list and
simulation study:
                                                                  finally retrieve the maximum number of
                                                                  songs for an artist in one playlist.
•   Plot the results from a single trial of the simulation;   •   Bring up the formula window for
                                                                  Concatenate and click Function.
•   Collect results from many trials of the simulation; and       Then click Text. Finally, double-click
                                                                  concat. This should put an concat
•   Plot those results.                                           statement in your formula editor. (A
                                                                  quicker way is to initially just type
                                                                  concat() directly into the formula
2.    Carry out 100 trials of the simulation. Copy and            editor.)
paste the plot of the maximum number of songs played by       •   Next, click Attributes and double-
an artist in one playlist into your word-processed                click count_Artist_... and put a
                                                                  comma after the attribute in the fomula.
document.                                                     •   Then type “,”, . This will separate the
                                                                  counts by a comma.
                                                              •   Repeat the last two steps until all artist
                                                                  song counts are recorded. The formula
                                                                  should look like the following:

                                                              •   In the collection window, create a new
                                                                  attribute called Sorted.
                                                              •   Bring up the formula window for Sorted
                                                                  and click Function. Then click List.
                                                                  Finally, double-click sortItems. This
                                                                  will sort all of the artist song counts in
                                                                  the concatenated list from least to
                                                                  greatest.
                                                              •   Next, click Attributes and double-
                                                                  click Concatenate.
                                                              •   The final step is to obtain the last count
                                                                  (the largest artist song count) from the
                                                                  Sorted attribute. Create a new attribute
                                                                  called Maximum.
                                                              •   Create a function for Maximum that will
                                                                  grab the last item in the Sorted attribute
                                                                  (Hint: the function is called
                                                                  lastItem).                                   3
CATALST Project                                                                          iPod Shuffle Revisited
Unit 1: Chance Models and Simulation                                                             Homework 6

Computing the Length of Time until a Certain Artist                 Computing the Length of Time until an
(Length of Time before Radiohead)                                   Artist is Played in one Playlist

Use the results from many trials of the simulation to               •   Click on the sampler Options menu
                                                                        button and select Sampler
determine the how many songs are played until an artist,                Options…
Radiohead, is played in a playlist that was randomly                •   Repeat until pattern matches the artist
generated (the TinkerPlots instructions are in the                     Radiohead in the playlist.
margin).                                                            •   Collect the number of songs played until
                                                                        Radiohead appears in the playlist.

Recall the basic steps for conducting a simulation study:

•   Plot the results from a single trial of the simulation;
•   Collect results from many trials of the simulation; and
•   Plot those results.

3. Carry out 100 trials of the simulation. Copy and paste a plot of the length of time until
   Radiohead appears in one playlist into your word-processed document.

Evaluate the Results and Answer the Research Questions

One of Mr. Hoffman’s suspicious playlists is provided below.
                (Hoffman) Track                 Artist                             Album     Year
               Out On The Tiles           Led Zeppelin                  Led Zeppelin III     1970
                        Tornado          Damien Jurado          Rehearsals For Departure     1999
            The Fox In The Snow      Belle & Sebastian        If You're Feeling Sinister     1996
     If You're Feeling Sinister      Belle & Sebastian        If You're Feeling Sinister     1996
                     Acony Bell          Gillian Welch                           Revival     1996
              Only One And Only          Gillian Welch                           Revival     1996
                One More Dollar          Gillian Welch                           Revival     1996
                Celebration Day           Led Zeppelin                  Led Zeppelin III     1970
                 That's The Way           Led Zeppelin                  Led Zeppelin III     1970
                       In Limbo              Radiohead                             Kid A     2000
 Everything In It's Right Place              Radiohead                             Kid A     2000
                        Tragedy          Damien Jurado          Rehearsals For Departure     1999
     Since I've Been Loving You           Led Zeppelin                  Led Zeppelin III     1970
   The Stars Of Track And Field      Belle & Sebastian        If You're Feeling Sinister     1996
                           Ohio          Damien Jurado          Rehearsals For Departure     1999
                 Immigrant Song           Led Zeppelin                  Led Zeppelin III     1970
                    Pass You By          Gillian Welch                           Revival     1996
                  Back In Black                  AC/DC                     Back In Black     1980
                    Shake A Leg                  AC/DC                     Back In Black     1980
                       Saturday          Damien Jurado          Rehearsals For Departure     1999

4. In Mr. Hoffman’s suspicious playlist, the maximum number of songs played by one artist is 5
                                                                                                                   4
CATALST Project                                                                  iPod Shuffle Revisited
Unit 1: Chance Models and Simulation                                                     Homework 6

   (Led Zeppelin). Find the simulated p-value for this observed result using the results of your first
   simulation. Explain how you obtained this p-value.

5. In Mr. Hoffman’s suspicious playlist, the length of time until a Radiohead song was played was
   10. Find the simulated p-value for this observed result using the results of your second
   simulation. Explain how you obtained this p-value.

6. Use the answers to the two previous questions to provide an answer to the research question
   posed at the beginning of this section: Is there convincing evidence that Mr. Hoffman’s iPod
   Shuffle feature is producing playlists which are not randomly generated, based on (1) the
   maximum number of songs that appear on a randomly generated playlist for all artists played;
   and (2) the typical number of songs played before a certain artist is played (length of time
   before Radiohead). Explain your answer.

                                                                                                     5
You can also read