2025-03-25

Slide 1: Title

Welcome to the Presentation for the MTCARS MPG Predictor App

Slide 2: Overview

This application uses the ‘mtcars’ dataset to predict the miles per gallon (mpg) based on the car weight (wt) using a linear regression model.
It offers real-time predictions and is designed for user friendliness.

Slide 3: How to Use

  • Use the slider to adjust the car’s weight (in 1000 lbs).
  • The predicted mpg value updates automatically.
  • Built-in documentation guides new users on app features.

Slide 4: Demonstration

Below is an example predicting mpg for a car weight of 3.0 (in 1000 lbs).
This R code chunk runs during slide rendering.

# Build the linear regression model using the mtcars dataset
linearModel <- lm(mpg ~ wt, data = mtcars)
# Predict mpg for a weight of 3.0
predicted_value <- predict(linearModel, newdata = data.frame(wt = 3.0))
predicted_value
##        1 
## 21.25171

Slide 5: Conclusion

The MTCARS MPG Predictor demonstrates Shiny’s reactive programming by providing immediate feedback.
Thank you for your attention!