MPG Predictor: A Shiny App Pitch

Deepasre M.P
October 27, 2026

Predict a car's fuel efficiency in seconds, with no statistics background needed.

The Problem

  • Buying or comparing cars? Fuel economy matters.
  • Spec sheets are confusing for beginners.
  • Question: given a car's weight, cylinders and transmission, roughly how many miles per gallon will it get?

The Solution: Our Shiny App

  • Inputs: weight slider, cylinder radio buttons, manual transmission checkbox
  • Output: predicted MPG, a 95% prediction range, and a plot showing your car among real cars
  • Built-in Documentation tab so novices can start right away
  • Updates instantly as you change any input

Under the Hood (live R code)

The app fits a linear model on the mtcars dataset:

model <- lm(mpg ~ wt + cyl + am, data = mtcars)
round(coef(model), 2)
(Intercept)          wt         cyl          am 
      39.42       -3.13       -1.51        0.18 

Example: a 3,000 lb, 4-cylinder manual car is predicted at 24.2 MPG.

Try It Yourself