Session Ready
Exercise

Sampling distribution vs. bootstrap distribution

The sampling distribution and bootstrap distribution are closely linked. In situations where you can repeatedly sample from a population (these occasions are rare) and as you learn about both, it's helpful to generate both the sampling distribution and the bootstrap distribution, one after the other, to see how they are related.

Here, the statistic you are interested in is the mean popularity score of the songs.

spotify_population (the whole dataset) and spotify_sample (500 rows only representing an original sample) are available; dplyr is loaded.

Instructions 1/2
undefined XP
  • 1
    • Generate a sampling distribution of 2000 replicates.
    • Each sample should contain 500 rows of the population.
    • The statistic of interest is the mean popularity.
    • Pull out the statistic so it is a single numeric value (not a tibble).
    • 2
      • Generate a bootstrap distribution of 2000 replicates.
      • Each sample should contain the same number of rows as the original sample.
      • The statistic of interest is the mean popularity.
      • Pull out the statistic so it is a single numeric value (not a tibble).