In this report, we examine the impact of automatic transmission on mpg. Is there a hit to the mpg due to automatic transmission. Is manual transmission better? If so, how much better? We examine and conclude that the automatic transmission is not statistically significantly different from manual transmission in terms of its impact on mpg.
In this day and age, cars come with a variety of options. These include number of cylinders (4, 6 or 8), horsepower, performance and many others. Each of them have an potential impact on the mpg of the car.
One such option, the automatic transmission has become a popular choice for many car lovers. But does this come at the cost of mpg? Is there a hit to the mpg due to automatic transmission. We take a look at this report.
To do so, we use the mtcars data set, that was collected by Motor Trend in 1974. This dataset contains data for 32 cars and collects 10 variables such as number of cylinders, displacement, horsepower, weight, auto or manual transmission, etc and gets the mpg for the particular vehicle
First we look at a plot of mpg vs all the rest of the variables. This is reproduced in Figure 1. As seen it appears that all the variables do have some relationship with mpg. None of them can be discarded without futher analysis.
Then we look at the effect of transmission on mpg. As shown in Figure 2, there does appear to be relationship. Manual transmission are much better than automatic transmission.
To verify this formally, we construct a linear model. The model shows that there is indeed a relationship between mpg and transmission with a gain of 7.2 mpg when changing from automatic to manual transmission.
However, a look at the R.square value indicates that it is only 0.36. There is definitely more confounders that need to be considered.
We start off by including all the variables and construct the model
This on the other hand, does not produce any satistically signifcant relationship assuming that type I error rate (alpha) should be less than 0.5. Clearly, not all the variables have an impact on mpg
Further the transmission impact has disappeared and there is no significant relationship with mpg (p > 0.05)
So we construct models by removing one variable after another. By this process, we conclude that the key variables that impact performance are number of cylinders, horse power and weight of the car. Since we are specifically interested in transmission, we also include that in the model
This gives us the following choice of models
1. mpg vs cylinders, hp, weight and transmission
2. mpg vs hp, weight and transmission
3. mpg vs cylinders, weight and transmission
4. mpg vs hp, cylinders,weight, transmission and interaction between cylinders and weight
Running an anova test between the models, reveal that there is not much significant difference between the models. However, comparing model 3 with model reveals that leaving hp out in model 3 makes it worse. So we reject model 3.
Of course, we can guess that horsepower and number of cylinders are likely to be correlated and indeed we find that the correlation is 0.83
On plotting the residuals (Figure 3) for the model 2, we there seems a pattern in square root of residuals vs scale location plot. So we reject model 2.
There is no significance in using an interaction term so we reject model 4.
Having selected model 1 in comparison with other models, let us finally construct a new model (model 5) by excluding the tranmission variable from model 1
The model 1 predicts that the mpg goes up by 1.8 for changing from automatic tranmission to manual transmission assuming we keep the cylinders, horsepower and weight as constant.
However, comparing model 1 and model 5, We find that it does not make a difference (p > 0.05). Hence we reject model 1 as model 5 is more parsimonious and explains the mpg with fewer number of variables.
We verify model 5 by plotting the residuals (Figure 4)
From the available data, a parsimonious model for the mpg is arraived with number of cylinders, horsepower and weight. There is no statistically significant impact on mpg between manual and automatic transmission.