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.
This exercise is part of the course
Sampling in Python
Hands-on interactive exercise
Have a go at this exercise by completing this sample code.
# Calculate the population mean popularity
pop_mean = ____
# Calculate the original sample mean popularity
samp_mean = ____
# Calculate the sampling dist'n estimate of mean popularity
samp_distn_mean = ____
# Calculate the bootstrap dist'n estimate of mean popularity
boot_distn_mean = ____
# Print the means
print([pop_mean, samp_mean, samp_distn_mean, boot_distn_mean])