Created
July 29, 2017 20:06
-
-
Save JoFrhwld/dc10760324f8a2a4838908c16023b169 to your computer and use it in GitHub Desktop.
Using purrr to do bootstrap estimation of the mean
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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