A pumpkin farmer weighed a simple random sample of size n = 20 pumpkins, with th
ID: 3262155 • Letter: A
Question
A pumpkin farmer weighed a simple random sample of size n = 20 pumpkins, with these results: 9.6, 8.8, 5.1, 9.7, 9.1, 8.9, 8, 9.2, 2.7, 9.1, 8.5, 7.3, 9.3, 9.6, 4.1, 9.9, 7.6, 9, 7.2, 8.5 (a) Create a QQ plot of the weights. Do you think it is reasonable to assume that the population distribution is normal? Explain your answer. (There isn't a unique "right" answer to this problem.) (b) Regardless of your answer to (a), use R to perform the bootstrap with 2000 resamplings to create a 90% CI for mu. (Show your R code and its output.)Explanation / Answer
save the data in a csv file under the column name sample
read the data in r,then use the command qqnorm() to generate a qqplot
qqnorm(data$sample)
qqplot(data$sample) #to genrate a straight line
The deviations from the straight line are minimal. This indicates normal distribution.
The deviations from the straight line are miximum .This indicates non- normal distribution.
2.
data<-read.csv("qq.csv")
x<-data[1]
#Here’s the R-code:
bstrap <- c()
for (i in 1:2000){
# First take the sample
bsample <- sample(x,20,replace=T)
#now calculate the bootstrap estimate
bestimate <- mean(bsample)
bstrap <- c(bstrap,bestimate)}
#lower bound
quantile(bstrap,.05)
#upper bound
quantile(bstrap,.95)
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.