Fuel Economy Factors in Motor Vehicles

Javier Carrasco
September 06, 2017

Objectives

Explore the factors that influence fuel efficiency in cars using the Motor Trend data for 1973 and 1974 models available on the R dataset mtcars.

In particular answer the following questions:

  • “Is an automatic or manual transmission better for MPG (Miles-Per-Gallon)”
  • “Quantify the MPG difference between automatic and manual transmissions”

Linear Regression

Best Linear Regression Model for MPG:

model <- train(mpg~.,mtcars,method="lmStepAIC",direction="both",trace=F)
summary(model)$coef
             Estimate Std. Error   t value     Pr(>|t|)
(Intercept)  9.617781  6.9595930  1.381946 1.779152e-01
wt          -3.916504  0.7112016 -5.506882 6.952711e-06
qsec         1.225886  0.2886696  4.246676 2.161737e-04
amManual     2.935837  1.4109045  2.080819 4.671551e-02

  • wt (weight in 1000 lbs)
  • qsec (¼ mile time in sec)
  • amManual (Manual transmission)

Diagnostic Plots

plot of chunk unnamed-chunk-3

Diagnostic plots suggest residuals are normaly distributed and they are not correlated with the outcome variable.

Conclusions

Linear regression model shows:

  • Manual transmission cars are more fuel efficient than automatic transmission cars delivering more than 2.94 MPG in average.
  • MPG is negatively correlated with car weight (-3.92 MPG per 1000 lbs)
  • MPG is positively correlated with ¼ mile time (1.23 MPG per second) w