Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
#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
You can’t perform that action at this time.