Predicting annual fuel cost and analyzing the impact of vehicle characteristics on fuel efficiency using the 2025 EPA Fuel Economy dataset.
Author: Samay Suratwala
This project analyzes the 2025 EPA Fuel Economy Guide dataset to understand what vehicle characteristics are associated with annual fuel cost and whether transmission type is associated with combined fuel efficiency.
The dataset contains 868 vehicle configurations across 23 manufacturers and 20 vehicle classes. Each observation represents a specific vehicle configuration, including engine displacement, cylinder count, transmission type, drivetrain, vehicle class, fuel efficiency ratings, and EPA-estimated annual fuel cost.
The project includes exploratory data analysis, statistical testing, multiple linear regression, and a multi-model predictive benchmark comparing linear and tree-based machine learning models.
-
Can a parsimonious set of measurable vehicle characteristics reliably predict a vehicle's annual fuel cost?
-
Is there a statistically significant association between transmission type and combined fuel efficiency?
The dataset used in this project is:
2025 Fuel Economy Dataset(FEguide).csv
Source: 2025 EPA Fuel Economy Guide.
Key variables include:
annual_fuel_cost: EPA-estimated annual fuel cost, used as the target variable.comb_fe: combined fuel efficiency in miles per gallon.city_fe: city fuel efficiency.hwy_fe: highway fuel efficiency.engine_displacement: engine size in liters.num_of_cylinders: number of cylinders.trans_description: transmission type.drive_desc: drivetrain type.carline_class_desc: EPA vehicle class.air_aspiration: engine aspiration type, such as naturally aspirated, turbocharged, or supercharged.stop_start_system_status: whether the vehicle has a stop/start system.
The EPA annual fuel cost estimates are based on the assumption that the vehicle is driven 15,000 miles per year, with 55% city driving and 45% highway driving. Fuel price assumptions used by the EPA include approximately $3.99 per gallon for regular unleaded gasoline, $4.98 per gallon for mid-grade unleaded gasoline, and $5.61 per gallon for premium unleaded gasoline.
Raw 2025 EPA Fuel Economy Guide dataset used for the entire project.
Contains 868 vehicle configurations and 27 columns, including:
Model YearMfr NameDivisionCarlineEngine DisplacementNum of CylindersCity FEHwy FEComb FECity Unadj FEHwy Unadj FEComb Unadj FETrans DescriptionNum GearsLockup Torque ConverterTrans Creeper GearDrive DescMax Ethanol PercentMax Biodiesel PercentFuel Usage DescRelease DateDescriptor Model TypeCarline Class DescAnnual Fuel CostGHG RatingStop/Start System Status4Dr Pass VolAir Aspiration
This file is the source data for both the exploratory data analysis and the final predictive modeling paper.
R Markdown source file for the exploratory data analysis.
This file contains the reproducible R code and written analysis for:
- Loading and cleaning the dataset.
- Converting character variables to factors.
- Creating numeric and categorical data quality reports.
- Identifying missing data issues.
- Exploring fuel efficiency, engine displacement, cylinders, drivetrain, transmission type, stop/start systems, and air aspiration.
- Producing correlation analysis and visualizations.
- Investigating follow-up questions about stop/start systems and turbocharging.
This file is intended to be opened and run in RStudio.
Rendered HTML output of the exploratory data analysis R Markdown file.
This file allows the exploratory analysis to be viewed directly in a web browser without opening RStudio. It contains:
- Data cleaning code.
- Data quality tables.
- Visualizations.
- Written observations.
- Follow-up EDA questions and summaries.
R Markdown source file for the final analysis and modeling paper.
This file contains the reproducible R code and written analysis for:
- Data cleaning and preparation.
- Correlation analysis.
- One-way ANOVA testing transmission type against combined fuel efficiency.
- Multiple linear regression predicting annual fuel cost.
- Simplification of vehicle class into interpretable groups.
- Random Forest variable importance.
- Multi-model benchmarking using OLS, Elastic Net, Quantile Regression, Bayesian Regression, Decision Tree, Random Forest, and XGBoost.
- Final conclusions, limitations, and practical implications.
This file is intended to be opened and run in RStudio.
Rendered HTML output of the final paper R Markdown file.
This file allows the final analysis to be viewed directly in a web browser without opening RStudio. It contains:
- Introduction and research questions.
- Dataset description.
- Cleaning summary.
- Statistical results.
- Regression tables.
- ANOVA results.
- Random Forest variable importance.
- Final model comparison scorecard.
- Conclusions and limitations.
Presentation slide deck summarizing the project.
This PDF contains:
- Project motivation.
- Research questions.
- Dataset overview.
- Key summary statistics.
- Exploratory data analysis highlights.
- Multiple linear regression results.
- Important predictors of annual fuel cost.
- Model performance comparison.
- Key takeaways, implications, limitations, and future work.
This documentation file.
It explains the purpose of the repository, the dataset, the analysis, the file contents, and how to reproduce the work.
MIT License for this project.
This file defines the permissions, conditions, and limitations for using, modifying, and distributing the project code and analysis materials.
The workflow of the project is:
2025 Fuel Economy Dataset(FEguide).csvprovides the raw data.EPA Fuel Economy EDA - Samay Suratwala.Rmdperforms the initial exploratory analysis.EPA-Fuel-Economy-EDA---Samay-Suratwala.htmldisplays the rendered exploratory analysis.Annual_Fuel_Cost_Prediction_Final_Paper_SamaySuratwala.Rmdperforms the final statistical and predictive modeling analysis.Annual_Fuel_Cost_Prediction_Final_Paper_SamaySuratwala.htmldisplays the rendered final paper.Fuel_Cost_Prediction_Presentation - Samay Suratwala.pdfpresents the project in slide format.
Combined fuel efficiency is the strongest predictor of annual fuel cost. Each additional MPG of combined fuel efficiency is associated with about $73 lower annual fuel cost, holding other variables constant.
Number of cylinders, drivetrain type, and vehicle class also provide meaningful explanatory power.
The ANOVA results show that transmission type is significantly associated with combined fuel efficiency, with an F-statistic of about 111.48 and a p-value less than 0.0001.
Tree-based models outperformed linear models. XGBoost produced the best overall predictive performance, followed closely by Random Forest.
Approximate test-set results:
| Model | RMSE | R-squared | MAPE |
|---|---|---|---|
| XGBoost | 183.48 | 0.9425 | 5.16% |
| Random Forest | 184.86 | 0.9417 | 4.76% |
| Decision Tree | 193.07 | 0.9366 | 5.59% |
| Elastic Net | 266.42 | 0.8794 | 8.75% |
| OLS | 266.59 | 0.8797 | 8.81% |
| Quantile Regression | 278.91 | 0.8732 | 9.10% |
| Bayesian Regression | 1964.71 | 0.7866 | 74.09% |
To reproduce the analysis:
- Install R and RStudio.
- Clone or download this repository.
- Make sure the dataset file
2025 Fuel Economy Dataset(FEguide).csvis in the same folder as the R Markdown files. - Open
EPA Fuel Economy EDA - Samay Suratwala.RmdorAnnual_Fuel_Cost_Prediction_Final_Paper_SamaySuratwala.Rmdin RStudio. - Knit the document to reproduce the HTML output.
Required R packages include:
tidyverse, janitor, funModeling, skimr, readxl, readr, lubridate, DataExplorer, dlookr, knitr, gt, ggridges, PerformanceAnalytics, tidymodels, vip, rpart.plot, ranger, xgboost, rstanarm, quantreg, kableExtra, randomForest, broom, and cowplot.
This analysis has several limitations.
- The dataset does not include vehicle weight, which is an important determinant of fuel consumption.
- Aerodynamic drag, tire rolling resistance, and detailed transmission gear ratios are not available.
- The analysis is limited to the 2025 model year.
- EPA laboratory test values may not perfectly reflect real-world driving behavior.
- Engine displacement and cylinder count are highly correlated, so careful feature selection was needed.
- The Bayesian regression model used relatively tight priors for this data scale, which affected its performance.
Possible extensions include:
- Adding interaction terms such as combined fuel efficiency by cylinder count or combined fuel efficiency by drivetrain.
- Testing stacking or blending methods that combine linear model interpretability with tree-based predictive strength.
- Incorporating multiple years of EPA fuel economy data to study trends over time.
- Expanding the analysis to include electrified vehicles.
- Incorporating real-world fuel prices, driving patterns, and regional cost differences.
Combined fuel efficiency is the single most useful specification for estimating annual fuel cost. Cylinder count, drivetrain type, and vehicle class add meaningful explanatory power even after controlling for fuel efficiency.
Transmission type is significantly associated with combined fuel efficiency, with CVTs and automated manual transmissions generally showing stronger efficiency performance.
Tree-based models, especially XGBoost and Random Forest, outperform linear models, indicating that nonlinear relationships and interactions improve prediction of annual fuel cost.
This project is licensed under the MIT License. See LICENSE for details.
The EPA Fuel Economy dataset is included for analysis and reproducibility and may be subject to its own data terms.