始める無料で始める

標本平均とブートストラップ平均を比較する

計算しやすいように、前の演習で計算したものと同様の分布を、今回はサンプルサイズ 5000 を用いて用意しました。

spotify_populationspotify_samplesampling_distributionbootstrap_distribution が利用可能で、pandasnumpy は通常のエイリアスで読み込まれています。

この演習はコースの一部です

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])
コードを編集して実行