MPG Calculator

Pengyi Sun
9/16/2014

Why Do You Need MPG Calculator?

  1. Knowing the MPG of your car can help you better estimate the cost of driving

    • Really control the cost and make better budget
  2. It gives you an exact estimates instead of a range given by the car makers

    • The range is generally very wide and your real MPG is usually at the lower end
  3. It can help you make better decisions while comparing different cars

    • Just remember to incorporate the cost of gas to the retail price

How it works?

  1. Very easy to use

  2. Can use anywhere you have internet access

  3. Just 3 clicks and you will get your results

How to use it?

  1. Input the weight of the car. The weight is in lb/1000 unit.

  2. Choose the transmission type, either automatic or manual.

  3. Choose how many cylinders of the engine from 4 to 8.

The model behind

  1. The model is based on mtcars database
  2. It build customized regression models real time based on your input
fit1<-lm(mpg~cyl+wt,data=subset1)
fit2<-lm(mpg~cyl+wt,data=subset2)

plot of chunk unnamed-chunk-3