Bắt đầu ngayBắt đầu miễn phí

So sánh trung bình giữa sampling và bootstrap

Để tính toán thuận tiện hơn, các phân phối từ bài trước đã được đưa vào các tibble. mean_popularity_2000_samp nằm trong cột sample_mean của sampling_distribution, và mean_popularity_2000_boot nằm trong cột resample_mean của bootstrap_distribution.

spotify_population, spotify_sample, sampling_distribution, và bootstrap_distribution đã sẵn sàng; dplyr đã được nạp.

Bài tập này là một phần của khóa học

Lấy mẫu trong R

Xem khóa học

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 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)
Chỉnh sửa và Chạy Mã