title: “Comparing Manual and Automatic Cars by The MPG”
author: “Gredy Garrido”
date: “December 21, 2014”
output: html_document

Executive Summary:

This report addresses 2 questions. a) What is Better in MPG Manual or Automatic? b)Can the difference be measured?

Conclusion: The results shown that Manual is better in MPG than Automatic. The Manual has a mean of 24 MPG , while Automatic shows only 17 MPG.Likewise, The variables wt and sqe, am are selected as the ones having the greast contribution.

Data Source:

The dataset mtcars is used to do the analysis

create factors

Factor Variables were created to initiate the process.

Multiple Boxplots

This First plot shows the 2 groups the Manual and Automatic.Note, the Manual has a mean and median values greater than the Automatic transmission.

## Selecting Explanatory Variables

Using the Step_wise the variables wt,am,sqe were selected to model the MPG Coefficients and r.squared

##              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
## [1] 0.8496636

Coefficient of Correlation:

##              Estimate Std. Error   t value     Pr(>|t|)
## (Intercept)  9.617781  6.9595930  1.381946 1.779152e-01
## amManual     2.935837  1.4109045  2.080819 4.671551e-02
## qsec         1.225886  0.2886696  4.246676 2.161737e-04
## wt          -3.916504  0.7112016 -5.506882 6.952711e-06
## [1] 0.8496636

Appendix

Boxplots of mpg by am observations (points) are overlayed and jittered

The relations among variables in mtcars are shownin the panel.

MPG vs Transmission