cherry <- read.table(file.choose(), header = F)
names(cherry) <- c("diameter", "height", "volume")
  1. The plot
plot(cherry$diameter, cherry$volume, xlab = "diametr", ylab = "volume")

  1. The estimated total volume
mvol <- mean(cherry$volume)
mdia <- mean(cherry$diameter)
Bhat <- mvol/mdia
Bhat
## [1] 2.277331
estimated.total.volume <- Bhat * 41835
estimated.total.volume
## [1] 95272.16
regg <- lm(volume ~ 1 + diameter, cherry )
summary(regg)
## 
## Call:
## lm(formula = volume ~ 1 + diameter, data = cherry)
## 
## Residuals:
##    Min     1Q Median     3Q    Max 
## -8.065 -3.107  0.152  3.495  9.587 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept) -36.9435     3.3651  -10.98 7.62e-12 ***
## diameter      5.0659     0.2474   20.48  < 2e-16 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 4.252 on 29 degrees of freedom
## Multiple R-squared:  0.9353, Adjusted R-squared:  0.9331 
## F-statistic: 419.4 on 1 and 29 DF,  p-value: < 2.2e-16