Skip to content

Instantly share code, notes, and snippets.

@Harshit1694
Last active May 3, 2019 07:24
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save Harshit1694/b783ef74464a8baab396a390b19fcd22 to your computer and use it in GitHub Desktop.
#We will take sample size=10, samples=9000
#Calculate the arithmetice mean and plot the mean of sample 9000 times
s10<-c()
n=9000
for (i in 1:n) {
s10[i] = mean(sample(data$Wall.Thickness,10, replace = TRUE))}
hist(s10, col ="lightgreen", main="Sample size =10",xlab = "wall thickness")
abline(v = mean(s10), col = "Red")
abline(v = 12.8, col = "blue")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment