Skip to content

Instantly share code, notes, and snippets.

@jmunozal
Created October 16, 2017 13:52
Show Gist options
  • Save jmunozal/0c3acbf4f692f8f750abc2bfc8eacaed to your computer and use it in GitHub Desktop.
Save jmunozal/0c3acbf4f692f8f750abc2bfc8eacaed to your computer and use it in GitHub Desktop.
CLT sampling 5 values from normal distribution and histogram (R)
s <- NULL
for (i in 1:5000) {
# 5 values normal distribution mean 40 sd 6
t<-sum(rnorm(5, 40, 6))
s[i] <- t
}
hist(s)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment