Inférence pour des données numériques en R
Mine Cetinkaya-Rundel
Associate Professor of the Practice, Duke University
Un jour donné, vingt appartements 1 chambre ont été sélectionnés au hasard sur Craigslist Manhattan parmi les annonces « by owner » (et non par une agence).
La moyenne ou la médiane : quelle est la meilleure mesure du loyer typique à Manhattan ?

médiane échantillonnale = 2 350 $


Prendre un échantillon bootstrap — un tirage aléatoire avec remise à partir de l’échantillon initial, de même taille que celui-ci.
Calculer la statistique de bootstrap — une statistique (moyenne, médiane, proportion, etc.) sur les échantillons bootstrap.
Répéter (1) et (2) de nombreuses fois pour créer une distribution bootstrap — la distribution des statistiques de 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

Inférence pour des données numériques en R