표본추출과 부트스트랩 평균 비교하기
계산을 쉽게 하려고, 이전 연습 문제에서 만든 분포를 tibble로 제공했어요. sampling_distribution의 sample_mean 열에는 mean_popularity_2000_samp가, bootstrap_distribution의 resample_mean 열에는 mean_popularity_2000_boot가 들어 있습니다.
spotify_population, spotify_sample, sampling_distribution, bootstrap_distribution를 사용할 수 있고, dplyr는 로드되어 있습니다.
이 연습은 강의의 일부입니다
R에서의 표본추출
실습형 인터랙티브 연습
이 예제를 이 샘플 코드를 완성하여 풀어보세요.
# 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)