開始使用免費開始

比較抽樣與自助法的平均值

為了讓計算更容易,前一題產生的分佈已整理成 tibbles。sampling_distributionsample_mean 欄位放的是 mean_popularity_2000_samp,而 bootstrap_distributionresample_mean 欄位放的是 mean_popularity_2000_boot

已提供 spotify_populationspotify_samplesampling_distributionbootstrap_distributiondplyr 已經載入。

本練習屬於課程

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)
編輯並執行程式碼