Executive Summary

This report analyses cars data collected on 10 aspects of automobile design and performance for 32 automobiles (1973-74 modles) so as to find a relationship between the collected aspects of automobile design and find answers to below questions:

From our analysis described below we found that manual transmission is better from MPG with an average increase of 2.78 MPG value for manula transimission cars

Analysis Report

The below graph shows density plots for all features (except ‘vs’). The red line is for ‘manual transmission’ and ‘blue line’ is for auto transmission. plot of chunk unnamed-chunk-1

As can be seen from the distribution, average value of MPG for manual transmission cars is better than automatic cars. And also most manual transmission cars have MPG value greater than average of auto tranmission cars.

Model

To quantify the difference of MPG between automatic and manual transmissions considering all other varibales (cyl, disp, hp etc), we regress MPG against other variables.

plot of chunk unnamed-chunk-2

From the above scatter plot of regressors we can see that there exists a strong co-relation between ‘wt’ & ‘disp’ and ‘cyl’ and ‘disp’. Hence one from each pair could be excluded from the model. Variance inflation factors for various models are shown below. As expected removal of the regressor ‘wt’ decreases vif of ‘disp’ significantly while removal of qsec decreases vif of ‘cyl’ significantly.

## lm(formula = mpg ~ ., data = data)
##    cyl   disp     hp   drat     wt   qsec     vs     am   gear   carb 
## 15.374 21.620  9.832  3.375 15.165  7.528  4.966  4.648  5.357  7.909
## lm(formula = mpg ~ . - wt, data = data)
##    cyl   disp     hp   drat   qsec     vs     am   gear   carb 
## 15.178  8.824  9.264  3.279  5.593  4.930  4.607  5.181  4.088
## lm(formula = mpg ~ . - wt - qsec, data = data)
##    cyl   disp     hp   drat     vs     am   gear   carb 
## 12.900  8.505  8.562  3.212  4.236  3.959  4.966  4.013

plot of chunk unnamed-chunk-4

The resultant model is a good fit as can seen from the above residual plot as residuals are independent of fitted values. It can be inffered from the model coefficients (see below) that change in transmission mode (from auto to manual) results in an increase of 2.7 in MPG.

## (Intercept)         cyl        disp          hp        drat         vs1 
##    17.92971     0.05961    -0.01328    -0.01209     1.29269     0.78545 
##         am1        gear        carb 
##     2.78583     1.14166    -1.31707
##                2.5 %   97.5 %
## (Intercept) -3.48729 39.34670
## cyl         -1.99948  2.11871
## disp        -0.03738  0.01081
## hp          -0.05578  0.03161
## drat        -2.13905  4.72444
## vs1         -3.39569  4.96658
## am1         -1.29702  6.86868
## gear        -1.95074  4.23407
## carb        -2.58697 -0.04716

The 95% confidence interval of ‘am’ regressor tells us that difference in MPG value between auto and manual transmission will fluctuate between -1.29 to 6.86 for 95% of the manufactured automobiles.