比較抽樣與自助法的標準差
就像你先前比較抽樣分配與自助法分配如何用來估計母體平均數一樣,現在要看看它們如何用來估計變異程度,更精確地說,是估計母體的標準差。
請記得樣本大小為 5000。
已提供 spotify_population、spotify_sample、sampling_distribution 與 bootstrap_distribution;pandas 與 numpy 也已以上述慣用別名載入。
本練習屬於課程
Python 中的抽樣
動手互動練習
試著完成這個範例程式碼,體驗一下這個練習。
# Calculate the population std dev popularity
pop_sd = ____
# Calculate the original sample std dev popularity
samp_sd = ____
# Calculate the sampling dist'n estimate of std dev popularity
samp_distn_sd = ____
# Calculate the bootstrap dist'n estimate of std dev popularity
boot_distn_sd = ____
# Print the standard deviations
print([pop_sd, samp_sd, samp_distn_sd, boot_distn_sd])