15. Engineers for a car manufacturer wanted to analyze the relationship between the speed x of their new model (The Bullet) and its gas mileage y for regular unleaded gasoline. The car was test driven at different speeds in the laboratory, and the data below were collected Speed x ||| 30 40 50 60 70 80 90 Mpg y ||| 39 38 36 32 27 24 22
i. Present a scatter plot for the data
ii. Determine the correlation coefficient for the data, and interpret the value.
iii. Determine the least-squares regression line.
iv. Estimate the gas mileage at 65 mph.
> x<-c(30,40,50,60,70,80,90)
> y<-c(39, 38, 36, 32, 27, 24, 22)
> plot(x,y)
> plot(x,y,xlab='Speed',ylab='Mileage')
> cor(x,y)
[1] -0.985349
> lmod1<-lm(y~x)
> lmod1
Call:
lm(formula = y ~ x)
Coefficients:
(Intercept) x
50.0000 -0.3143
ii. Correlation coefficient is = -0.985, (as found by R-code of part i)
Interpretation : With increase in speed, mileage decreases and the strength of this negative relation is very high equal to
- 0.985
iii. Least squares regression line is obtained by previous R-code , and obtained equation is :
y = 50 - 0.3143*x
iv. Now for x = 65, from above equation , estimate for y = 29.5705
Get Answers For Free
Most questions answered within 1 hours.