開始使用免費開始

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

為了讓計算更容易,這裡提供了與上一題相似的分佈,不過這次的樣本大小是 5000

已提供 spotify_populationspotify_samplesampling_distributionbootstrap_distributionpandasnumpy 已以慣用別名載入。

本練習屬於課程

Python 中的抽樣

檢視課程

動手互動練習

試著完成這個範例程式碼,體驗一下這個練習。

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