
Answer:
a) > x<-c(1,2,3,4,5)
> y<-c(1.9,3.5,3.7,5.1,6)
> linearmodel<-lm(y~x)
And the output is given by:
> linearmodel
Call:
lm(formula = y ~ x)
Coefficients:
(Intercept) Â Â Â Â Â Â x Â
   1.10     0.98 Â
b) [tex] y = 0.98 x +1.10 [/tex]
And if we compare this with the general model [tex] y = mx +b[/tex]
We see that the slope is m= 0.98 and the intercept b = 1.10
Explanation:
Part a
For this case we have the following data:
x: 1,2,3,4,5
y: 1.9,3.5,3.7,5.1, 6
For this case we can use the following R code:
> x<-c(1,2,3,4,5)
> y<-c(1.9,3.5,3.7,5.1,6)
> linearmodel<-lm(y~x)
And the output is given by:
> linearmodel
Call:
lm(formula = y ~ x)
Coefficients:
(Intercept) Â Â Â Â Â Â x Â
   1.10     0.98 Â
Part b
For this case we have the following trend equation given:
[tex] y = 0.98 x +1.10 [/tex]
And if we compare this with the general model [tex] y = mx +b[/tex]
We see that the slope is m= 0.98 and the intercept b = 1.10