2025-10-30

Slide 1 — Title

Miles per Gallon Predictor App

Created: 2025-10-30
Author: Kuladeep D.
Course: Coursera - Developing Data Products

Launch the App

Slide 2 — Problem & Goal

  • Estimate fuel efficiency (MPG) simply and interactively.
  • Use mtcars dataset; predict MPG from horsepower (hp).
  • Goal: let users explore and get an immediate MPG estimate.

Slide 3 — Inputs & Outputs

Inputs (widgets): - Slider: Horsepower
- Checkbox: Show data points

Outputs: - Predicted MPG (text) - Reactive plot showing regression and point

Slide 4 — Evaluated R Code (model output)

model <- lm(mpg ~ hp, data = mtcars)
coef_table <- summary(model)$coefficients
coef_table
##                Estimate Std. Error   t value     Pr(>|t|)
## (Intercept) 30.09886054  1.6339210 18.421246 6.642736e-18
## hp          -0.06822828  0.0101193 -6.742389 1.787835e-07