Skip to content

Instantly share code, notes, and snippets.

@Akiyah
Last active August 29, 2015 14:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Akiyah/1b3e7390a06aaeabe492 to your computer and use it in GitHub Desktop.
Save Akiyah/1b3e7390a06aaeabe492 to your computer and use it in GitHub Desktop.
u <- c()
for (i in 1:10000) {
j <- sample(data, 10000)
u <- c(u, mean(j))
}
sqrt(var(u)) #=> 10.06759
quantile(u, c(0.05, 0.95))
#=> 5% 95%
#=> 26.65 59.10
hist(u)
sqrt(var(data)) #=> 1053.286
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment