1. Learn
  2. /
  3. Courses
  4. /
  5. Sampling in Python

Connected

Exercise

Compare sampling and bootstrap means

To make calculation easier, distributions similar to those calculated from the previous exercise have been included, this time using a sample size of 5000.

spotify_population, spotify_sample, sampling_distribution, and bootstrap_distribution are available; pandas and numpy are loaded with their usual aliases.

Instructions 1/2

undefined XP
    1
    2

Calculate the mean popularity in 4 ways:

  • Population: from spotify_population, take the mean of popularity.
  • Sample: from spotify_sample, take the mean of popularity.
  • Sampling distribution: from sampling_distribution, take its mean.
  • Bootstrap distribution: from bootstrap_distribution, take its mean.