Aan de slagGa gratis aan de slag

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.

Deze oefening maakt deel uit van de cursus

Sampling in Python

Cursus bekijken

Praktische interactieve oefening

Probeer deze oefening eens door deze voorbeeldcode in te vullen.

# 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])
Code bewerken en uitvoeren