Porównaj średnie z rozkładu próbkowania i rozkładu bootstrapowego
Aby ułatwić obliczenia, rozkłady z poprzedniego ćwiczenia zostały umieszczone w tiblach. mean_popularity_2000_samp znajduje się w kolumnie sample_mean tibla sampling_distribution, a mean_popularity_2000_boot – w kolumnie resample_mean tibla bootstrap_distribution.
Dostępne są: spotify_population, spotify_sample, sampling_distribution i bootstrap_distribution; załadowana jest biblioteka dplyr.
To ćwiczenie jest częścią kursu
Próbkowanie w R
Interaktywne ćwiczenie praktyczne
Spróbuj tego ćwiczenia, uzupełniając ten przykładowy kod.
# Calculate the true 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 <- ___
# See the results
c(pop = pop_mean, samp = samp_mean, sam_distn = samp_distn_mean, boot_distn = boot_distn_mean)