So sánh trung bình của mẫu và của bootstrap
Để việc tính toán dễ dàng hơn, các phân phối tương tự như ở bài trước đã được cung cấp, lần này với cỡ mẫu 5000.
spotify_population, spotify_sample, sampling_distribution và bootstrap_distribution đã sẵn sàng; pandas và numpy đã được nạp với các bí danh quen thuộc.
Bài tập này là một phần của khóa học
Lấy mẫu trong Python
Bài tập tương tác thực hành trực tiếp
Hãy thử làm bài tập này bằng cách hoàn thành đoạn mã mẫu này.
# 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])