Apartado a) > diam <- c(8.3, 8.6, 8.8, 10.5, 10.5, 10.8, 11, 11) > alt <- c(70, 65, 63, 72, 81, 83, 66, 75) > vol <- c(10.3, 10.3, 10.2, 16.4, 18.8, 19.7, 15.6, 16.3) > Cerezos <- data.frame(diam, alt, vol) Apartado b) > plot(Cerezos$alt, Cerezos$vol) Apartado c) > reg_lin <- lm(alt ~ vol, data = Cerezos) > reg_lin Apaatado d) > summary(reg_lin) Apartado e) > cor(Cerezos$alt, Cerezos$vol) [1] 0.8488805 > cor.test(Cerezos$alt, Cerezos$vol) Pearson's product-moment correlation data: Cerezos$alt and Cerezos$vol t = 3.9338, df = 6, p-value = 0.00768 alternative hypothesis: true correlation is not equal to 0 95 percent confidence interval: 0.3588886 0.9720747 sample estimates: cor 0.8488805 Apartado f) > reg_lin_mul <- lm(alt ~ vol + diam) > reg_lin_mul Call: lm(formula = alt ~ vol + diam) Coefficients: (Intercept) vol diam 85.340 3.231 -6.135 Apartado f) > diam2 <- diam^2 > reg_cuad <- lm(alt ~ vol + diam2) > reg_cuad Call: lm(formula = alt ~ vol + diam2) Coefficients: (Intercept) vol diam2 55.830 3.158 -0.304