Using Excel, or some other graphing software, plot the values of y as a function of x. (You will not submit this spreadsheet. However, the results will be needed later in this problem.) Hint x y 1 1.9 2 3.5 3 3.7 4 5.1 5 6.0 (b) Use the trendline option to draw the best fit line for the above data and use it to determine the slope and y-intercept. Hint slope Incorrect: Your answer is incorrect. y-intercept

Respuesta :

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

Otras preguntas