標本平均とブートストラップ平均を比較する
計算をしやすくするために、前の演習で作成した分布を tibble にまとめてあります。mean_popularity_2000_samp は sampling_distribution の sample_mean 列に、mean_popularity_2000_boot は bootstrap_distribution の resample_mean 列にあります。
spotify_population、spotify_sample、sampling_distribution、bootstrap_distribution が利用可能で、dplyr は読み込まれています。
この演習はコースの一部です
Rで学ぶサンプリング
実践的なインタラクティブ演習
このサンプルコードを完成させて、この演習に挑戦してみましょう。
# 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)