Skip to content

Instantly share code, notes, and snippets.

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
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