R에서 수치형 데이터에 대한 추론
Mine Cetinkaya-Rundel
Associate Professor of the Practice, Duke University
특정 날, 크레이그리스트 맨해튼에서 "개인 임대" 아파트 중 방 1개짜리 20개가 무작위로 선택되었습니다.
맨해튼의 일반적인 임대료를 나타내는 데 평균과 중앙값 중 어느 것이 더 적합할까요?

표본 중앙값 = $2,350


부트스트랩 표본 추출 - 원래 표본과 동일한 크기로 복원 추출한 무작위 표본.
부트스트랩 통계량 계산 - 부트스트랩 표본에서 평균, 중앙값, 비율 등의 통계량 계산.
1단계와 2단계를 여러 번 반복하여 부트스트랩 분포 생성 - 부트스트랩 통계량의 분포.
library(infer)
___ %>% # start with data frame
specify(response = ___) %>% # specify the variable of interest
library(infer)
___ %>% # start with data frame
specify(response = ___) %>% # specify the variable of interest
generate(reps = ___, type = "bootstrap") %>% # generate bootstrap samples
library(infer)
___ %>% # start with data frame
specify(response = ___) %>% # specify the variable of interest
generate(reps = ___, type = "bootstrap") %>% # generate bootstrap samples
calculate(stat = "___") # calculate bootstrap statistic
library(infer)
___ %>% # start with data frame
specify(response = ___) %>% # specify the variable of interest
generate(reps = ___, type = "bootstrap") %>% # generate bootstrap samples
calculate(stat = "___") # calculate bootstrap statistic

library(infer)
___ %>% # start with data frame
specify(response = ___) %>% # specify the variable of interest
generate(reps = ___, type = "bootstrap") %>% # generate bootstrap samples
calculate(stat = "___") # calculate bootstrap statistic

R에서 수치형 데이터에 대한 추론