1a

zoop

1b

100

1c

10

2a
2b
2c
3a
3b
Forecast 1
Regression Model

Call:
lm(formula = mpg ~ wt + carb, data = dat)

Residuals:
       1        2        3        4        5        6        7        8 
-0.04186  1.10968 -1.95258  0.68910 -0.20952 -1.50452 -2.45181  4.36152 

Coefficients:
            Estimate Std. Error t value Pr(>|t|)   
(Intercept)  36.0147     7.0481   5.110  0.00374 **
wt           -4.5158     2.1869  -2.065  0.09384 . 
carb         -0.7853     0.6885  -1.141  0.30571   
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 2.564 on 5 degrees of freedom
Multiple R-squared:  0.5209,    Adjusted R-squared:  0.3292 
F-statistic: 2.718 on 2 and 5 DF,  p-value: 0.1589
Classification Model

Call:
glm(formula = species ~ sepal.length + sepal.width, data = iris)

Coefficients:
             Estimate Std. Error t value Pr(>|t|)    
(Intercept)   0.77529    0.19117   4.055 8.09e-05 ***
sepal.length -0.37444    0.02185 -17.135  < 2e-16 ***
sepal.width   0.57109    0.04152  13.756  < 2e-16 ***
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

(Dispersion parameter for gaussian family taken to be 0.04811265)

    Null deviance: 33.3333  on 149  degrees of freedom
Residual deviance:  7.0726  on 147  degrees of freedom
AIC: -24.48

Number of Fisher Scoring iterations: 2
Confusion Matrix and Statistics

          Reference
Prediction FALSE TRUE
     FALSE   100    1
     TRUE      0   49
                                          
               Accuracy : 0.9933          
                 95% CI : (0.9634, 0.9998)
    No Information Rate : 0.6667          
    P-Value [Acc > NIR] : <2e-16          
                                          
                  Kappa : 0.9849          
                                          
 Mcnemar's Test P-Value : 1               
                                          
            Sensitivity : 1.0000          
            Specificity : 0.9800          
         Pos Pred Value : 0.9901          
         Neg Pred Value : 1.0000          
             Prevalence : 0.6667          
         Detection Rate : 0.6667          
   Detection Prevalence : 0.6733          
      Balanced Accuracy : 0.9900          
                                          
       'Positive' Class : FALSE