Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

A pumpkin farmer weighed a simple random sample of size n = 20 pumpkins, with th

ID: 3247449 • 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)

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote