LogoAlan Craig Data Science Portfolio Architecture


R logo

Regression Modelling Automobile performace

In this progresion I investigate what variables determine the miles per gallon (MPG) value of a selection of automobiles? Using the ‘mtcars’ dataset the relationship between a variety of independant predictor variables is explored. The analysis shows that Number of cylinders (cyl), Gross horsepower (hp), and Weight (wt) (1000 lbs) to be the most important predictor variables. In addition, I also analyse this dataset to determine whether manual or automatic transmission cars can go the further than one another and we also quantify this.

The goal is to predict the manner in which they did the exercise which is represented in the classe variable in the training set. This variable is omitted in the test set. This report is describing how the model was built, how cross validation was used, what the expected out-of-sample error is, and what choices have been made. The prediction model derived in this report is finally used to predict 20 test cases.

Overview Assume that I work for Motor Trend, a magazine about the automobile industry. Looking at a data set of a collection of cars, they are interested in exploring the relationship between a set of variables and miles per gallon (MPG) (outcome) We ask the following questions:

Overview Using simple linear regression and multiple regression models an statistical infernce we conclude that manual transmission cars when compared against automatic transmission cars adjusted by number of cylinders, gross horsepower go a factor of 1.8 more miles per gallon.


Lets get in touch and talk about your next project.