Skip to content

Instantly share code, notes, and snippets.

@JoFrhwld
Created July 29, 2017 20:06
Show Gist options
  • Save JoFrhwld/0aeec38b76e56e7b2e7aca14aaba9311 to your computer and use it in GitHub Desktop.
Save JoFrhwld/0aeec38b76e56e7b2e7aca14aaba9311 to your computer and use it in GitHub Desktop.
Using purrr to do bootstrap estimation of the mean
library(tidyverse)
replicates <- (1:100000)%>%
map(~sample(faithful$waiting, replace = T))%>%
map(mean)%>%
simplify()
data_frame(replicates = replicates)%>%
ggplot(aes(replicates))+
stat_density()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment