Inferență pentru date numerice în R
Mine Cetinkaya-Rundel
Associate Professor of the Practice, Duke University
Într-o zi dată, douăzeci de apartamente cu 1 cameră au fost selectate aleatoriu pe Craigslist Manhattan, dintre cele listate ca „de la proprietar".
Care este o măsură mai bună a chiriei tipice în Manhattan: media sau mediana?

mediana eșantionului = $2.350


Extrageți un eșantion bootstrap - un eșantion aleatoriu cu înlocuire din eșantionul original, de aceeași dimensiune.
Calculați statistica bootstrap - o statistică precum medie, mediană, proporție etc., calculată pe eșantioanele bootstrap.
Repetați pașii (1) și (2) de multe ori pentru a crea o distribuție bootstrap - o distribuție a statisticilor bootstrap.
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

Inferență pentru date numerice în R