A prediction model for mpg

Wenjun

2025-04-17

Introduction

This is a prediction model for mpg based on mtcars data set. I used weight and transmission type of a car to predict its miles per gallon (mpg). Shiny web application was applied to present the results. You should enter a value of car’s weight in the sidebar, and then you would see the predicted mpg for automatic and manual cars separately in corresponding tabs.

First part

In automatic cars tab, you would see the prediction model for automatic cars. The plot would present as this (use weight=3 as an predicted example).

Second part

In manual cars tab, you would see the prediction model for manual cars. The plot would present as this (use weight=3 as an predicted example).

Conclusion

This is a assignment given by Coursera Developing Data Tools. Please leave your comments. I would appreciate that. Thank you!