Executive Summary

Recent readers of Motor Trend have been curious what characteristics of a car influence its fuel consumption, specificially if automatic or manual transmission has a significant effect on miles per gallon on a car.

We here at AxLewis have a long history of automobile evaluation. While we do understand the readers concern about transmission and its effects on fuel consumption, we would like to present other factors affecting fuel consumption.

A data set, mtcars, was used to draw some conclusions. It has data on 32 vehicles and 11 variables. For the purpose of this exploration, we will only be looking at 6 of the variables - fuel consumption, number of cylinders, horsepower, weight of the vehicle, engine layout, and transmission.

General Information

Exploratory Data Analysis

Although readers are keen about transmission, the correlation of fuel consumption with each of number of cylinders, horsepower, weight of the vehicle, and even engine layout is greater than that of the correlation of fuel consumption and transmission. For this reason, we will be comparing several models to create a more clear picture for the readers.

Notice the high correlation between cylinders, horsepower, and weight of the vehicle. Size of the engine was an ignored variable, but also related to these. Notice that all of these have a negative relationship with fuel consumption.

Looking at the 32 vehicles’ information, we can see the spread of values for fuel consumption, horsepower, and weight. The number of cylinders in the vehicles is either 4, 6, or 8. The engine layout is either v-shaped or straight, and the transmission is either automatic or manual.

Coefficients

Intercepts and slopes for regression fits of each variable have been compiled to a table.

For Cylinders, a car has a fuel efficiency of 37.88 mpg, and each cylinder the car has decreases the fuel efficiency by 2.88 mpg.

For Weight, a car has a fuel efficiency of 37.29 mpg, and for every 1000lbs the car weighs the fuel efficiency decreases by 5.34 mpg.

For Horsepower, a car has a fuel efficiency of 30.10 mpg, and for every horsepower the car has decreases the fuel efficiency by .068 mpg.

For Engine Layout, a car with V-shaped has a fuel efficiency of 16.62 mpg, and being a straight layout increases the fuel efficiency by 7.94 mpg.

Finally, for Transmission, a car with automatic has a fuel efficiency of 17.15 mpg, and being a manual increases the fuel efficiency by 7.24 mpg.

Models

A table of p-Values has been included. Each of the five aspects of the cars is significant and we can safely reject the null hypothesis. However, Weight and Horsepower, and to an extent Cylinders and Transmission, seem to have more influence on Fuel Efficiency than Transmission. This also agrees with our Correlation Table and Plots

Fuel Efficiency vs each of Cylinders, Horsepower, Weight, Engine, and Transmission have been shown, while emphasizing Transmission. Each model, and thus variable, has a noticeable relationship with fuel efficiency.

Regression lines of Weight and Horsepower are shown. Since Cylinders, Engine, and Transmission are categorical variables, the model points have been included.

Residual Plots

The residual plots of each model are shown. A table of the Root Mean Square Error is also included. Weight, Cylinder, and Horsepower have the smallest RMSE values.

Diagnostics

The diagnostics plots are based on a single model of Fuel Efficiency vs all 5 variables discussed thus far.

Residuals vs Fitted

More cars tested would clarify if the residuals follow a linear or non-linear pattern.

Normal Q-Q

The residuals seem to follow the straight line. There are a few that deviate slightly on either end. Again, more cars tested would provide more clarity.

Scale-Location

The residuals appear to be randomly spread.

Residuals vs Leverage

There are no points on the top right or bottom right that would be excessively influential.

Conclusion

In our analysis of the 32 cars tested, vehicles with manual transmission had on average 7.24 mpg better fuel efficiency than vehicles with automatic transmission. The p-value is ~.001, which is extremely significant.

However, we are not going to make an absolute statement at this time. It is clear that Cylinders, Horsepower, Weight, and Engine Layout are also significant in affecting fuel efficiency, and quite possibly more significant than Transmission.

We would also like to increase the sample size of cars tested to a larger number over a greater span of years. Our cars tested were only from 1973 - 1974.

Appendix

R Figure and Table outputs.

Exploratory Data Analysis

Correlation

##            mpg        cyl         hp         wt         vs         am
## mpg  1.0000000 -0.8521620 -0.7761684 -0.8676594  0.6640389  0.5998324
## cyl -0.8521620  1.0000000  0.8324475  0.7824958 -0.8108118 -0.5226070
## hp  -0.7761684  0.8324475  1.0000000  0.6587479 -0.7230967 -0.2432043
## wt  -0.8676594  0.7824958  0.6587479  1.0000000 -0.5549157 -0.6924953
## vs   0.6640389 -0.8108118 -0.7230967 -0.5549157  1.0000000  0.1683451
## am   0.5998324 -0.5226070 -0.2432043 -0.6924953  0.1683451  1.0000000

Summary

##       mpg             cyl              hp              wt       
##  Min.   :10.40   Min.   :4.000   Min.   : 52.0   Min.   :1.513  
##  1st Qu.:15.43   1st Qu.:4.000   1st Qu.: 96.5   1st Qu.:2.581  
##  Median :19.20   Median :6.000   Median :123.0   Median :3.325  
##  Mean   :20.09   Mean   :6.188   Mean   :146.7   Mean   :3.217  
##  3rd Qu.:22.80   3rd Qu.:8.000   3rd Qu.:180.0   3rd Qu.:3.610  
##  Max.   :33.90   Max.   :8.000   Max.   :335.0   Max.   :5.424  
##        vs               am        
##  Min.   :0.0000   Min.   :0.0000  
##  1st Qu.:0.0000   1st Qu.:0.0000  
##  Median :0.0000   Median :0.0000  
##  Mean   :0.4375   Mean   :0.4062  
##  3rd Qu.:1.0000   3rd Qu.:1.0000  
##  Max.   :1.0000   Max.   :1.0000

Coefficients

##         Variable Intercept       Slope
## cyl    Cylinders  37.88458 -2.87579014
## wt        Weight  37.28513 -5.34447157
## hp    Horsepower  30.09886 -0.06822828
## vs        Engine  16.61667  7.94047619
## am  Transmission  17.14737  7.24493927

Models

P-Values

##          Variable      p_Value
## 1 4 & 6 Cylinders 4.048495e-04
## 2 4 & 8 Cylinders 1.641348e-06
## 3 6 & 8 Cylinders 4.540355e-05
## 4          Weight 1.293959e-10
## 5      Horsepower 1.787835e-07
## 6          Engine 1.098368e-04
## 7    Transmission 1.373638e-03

Plots

Residual Plots

Root Mean Square Error

##       Variable Root_Mean_Square_Error
## 1    Cylinders               3.104101
## 2       Weight               2.949163
## 3   Horsepower               3.740297
## 4       Engine               4.435367
## 5 Transmission               4.746369

Diagnostics