Статистический вывод для числовых данных в R
Mine Cetinkaya-Rundel
Associate Professor of the Practice, Duke University
В один из дней на Craigslist Manhattan были случайно выбраны двадцать однокомнатных квартир, размещённых в разделе «от владельца» (в отличие от объявлений агентств).
Что лучше отражает типичную арендную плату в Манхэттене — среднее или медиана?

медиана выборки = $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