Unlock the full potential of AI with Building LLMs for Production—our 470+ page guide to mastering LLMs with practical projects and expert insights!


Exploratory Data Analysis on Mercedes Benz Car Models
Latest   Machine Learning

Exploratory Data Analysis on Mercedes Benz Car Models

Last Updated on July 26, 2023 by Editorial Team

Author(s): Sarvesh Talele

Originally published on Towards AI.

Analysis of Mercedes Benz Models and some additional insights which assist in making business decisions.

Tableau Dashboard (Image by Author)

This article will analyze the important variables which go into determining a Mercedes Benz model automobile. The Exploratory Data Analysis of the Mercedes Benz Car Models dataset will be the focus of this article. As the name implies, EDA allows us to gain a better understanding of the data. We will study the statistical features of this data, generate visualizations, and test hypotheses throughout this stage. The article will try to answer the following questions from the dataset provided on Kaggle.

  1. What is each variable’s distribution?
  2. Are there any noticeable outliers?
  3. Are the maximum and minimum values for the variables reasonable? Do you see any values that appear to be invalid?
  4. The necessary statistics for analyzing a dataset visually, using python and its libraries.
  5. How to extract vital suggestions to address the business challenge from visuals using an in-depth analysis of metrics.
  6. Which Mercedes Benz car models are efficient based on Mileage, Miles/gallon (mpg), and prices (in Euros)
  7. What are the tax ratings for each Mercedes Benz Car model?
  8. Which car model would be a better choice based on fuel type and mileage.

Step 0: Install Libraries

In this step, we will be installing the required libraries for better comprehension of our dataset. The Exploratory Data Analysis has been performed with the help of the Sweetviz library. Sweetviz is an open-source Python package that creates elegant, high-density visuals with just two lines of code to jumpstart EDA (Exploratory Data Analysis). Output is a completely self-contained HTML application.

Step 1: Import Libraries

Importing libraries that are required to analyze desired data deductions, visualizations, and implementation of data-driven decisions for generating effective business models.

Step 2: Read Mercedes Used Car Listing Dataset

Step 3: Analyze Mercedes Used Car Listing Dataset

1) An Overview of Mercedes Used Car Listing Dataset using Sweetviz library

The sub-step incorporates a short overview of the dataset. This specifies specific visuals and statistics to swiftly comprehend data and make efficient data-driven decisions. For Overview Analysis click here

2) The Deduction show

This is an important step in exploratory data analysis; this step can retrieve the most innovative and intriguing deductions to make data-driven decisions.

Visualizations and Analysis

A) Model v/s Miles per gallon

Model V/s Miles per gallon (Image by Author)


The objective of using the mean of all data is to show the overall performance of automobile models in terms of miles per gallon. We may derive the following assertions from the data provided:

  1. There are about 15 automobile models that get higher miles per gallon than the average.
  2. In terms of miles per gallon, the E-class vehicle outperforms the G-class model by more than 5.4 percent.
  3. When the miles/gallon mean value is greater, the automobile can drive further than when the mean value is lower.
  4. It may also be deduced that the Mercedes automobile models which are above average values, emit less carbon dioxide when compared to other models.

B) Model v/s Mileage

Model V/s Mileage (Image by Author)


  1. According to the median of the statistics, more than 11 Mercedes model automobiles had better mileage performance.
  2. However, when compared to the median value of our data, the Mercedes CLK model has approximately 12.51% higher miles, and altogether, the CLK model delivers 15.67% more mileage to the dataset.
  3. Subsequently, the overall fuel consumption of the CLK model is 3265.30 gallons at 33.6 miles per gallon.
  4. Hence, we can deduce that car models with higher mpg values have the following applications.
  • Fuel consumption is reduced.
  • Lower Maintenance Costs

C) Model v/s Price

Model v/s Price (Image by Author)

To know more click here

D) Year v/s Price

Year v/s Price (Image by Author)


  1. The price graph follows the trend line y = 1.3 + 2.5x ( x $10⁸$).
    The Least Square Method was used to estimate the trend line. This approach may be used to forecast future prices and provide a quick overview of historical sales as well as development opportunities.
  2. The slope of the trend line is (m) = 2.5. With a positive slope, sales are growing from left to right.
  3. From left to right, sales are growing. However, a price reduction from 2019 to 2020 has a greater influence on company profit margins, since sales of motor manufacturers were halted owing to the pandemic, resulting in a price drop.
    (Mercedes stocks are owned by Daimler AG)
  4. The firm was in a loss of -2.53 % with a volume of 13M to 24M during the severe pandemic, i.e., from 10th January 2020 to 6th November 2020.

E) Mileage v/s Transmission

Mileage v/s Transmission (Image by Author)


  1. Manual Transmission has the most mileage of the three most recent transmission systems when compared to the other transmission systems.
  • Manual transmissions include more gears and a simpler design, resulting in a lighter transmission system.
  • A simpler design decreases the car’s annual fuel consumption and, as a result, the cost of maintenance.

2. The other category may include the following transmission systems (these are some of the examples of transmission systems)

  • Tiptronic Transmission: A Tiptronic is a type of automatic transmission that allows for fully automatic gear shifting or manual gear shifting by the driver. Tiptronic uses a torque converter rather than a clutch.
  • Dual Clutch Transmission (DCT): A dual-clutch transmission has two gear shafts with a clutch for each. The dual system allows for faster and smoother gear changes.

F) Model v/s Tax

Model v/s Tax (Image by Author)


Road Tax Description:

  1. It is a tax that must be paid by anybody who purchases a car. The Road Tax is a state-level tax, meaning that it is imposed at the state level by the governments of several states.
  2. For charging road taxes, each state has its own set of rules and regulations. The amount of tax varies due to the varied percentages charged by different states. According to the Central Motor Vehicles Act, if a vehicle is operated for more than a year, the entire amount of road tax must be paid at once.
  3. Individuals purchasing a vehicle pay the road tax which is based on the ex-showroom price of the vehicle. The calculation of road tax depends on the following things:

a. Seating capacity of the vehicle
b. The engine capacity of the vehicle
c. Age of the vehicle
d. Weight of the Vehicle
Note: This is according to Indian Rules and Regulations


  1. Although the Mercedes C class has more advanced built-in technology, making the C class interface more user-friendly, it has a far higher road tax than the Mercedes A-class, by 9.29 percent.
  2. When it comes to miles per gallon and price, an A-class vehicle would be a better choice than a C-class model.

G) Fuel-type v/s Mileage

Fuel-type v/s Mileage (Image by Author)


  1. For long-distance travel, diesel engines are recommended. For those who are Hodophile, Mercedes automobile models with Diesel engines have a 79 percent probability of being their first preference.
  2. Diesel engines are limited for vehicles that have a high frequency of travel, such as trucks, buses, and off-road vehicles, despite having higher efficiency and lower costs than petroleum. Because of the increased greenhouse gases, diesel engines are limited for vehicles that have a high frequency of travel, such as trucks, buses, and off-road vehicles.


The deduction and statistical analysis were determined with the full consideration of metrics of Mercedes Model cars using the dataset. The notebook has explored Transmission, Miles/gallon, Mileage, and road tax metrics for better comprehension of our dataset.

  1. For those who want to buy a car for travel or daily use, the miles per gallon number should be greater than 30 mpg.
  2. Mileage is another element that influences a vehicle’s fuel usage. The cost of maintaining a car is determined by its mileage.
  3. Manual transmissions have more gears and a simpler design, making them lighter.
  4. Diesel engines are restricted for vehicles that travel often, such as trucks, buses, and off-road vehicles, due to higher greenhouse gas emissions

Social Accounts:

  1. Github here
  2. Kaggle here

Join thousands of data leaders on the AI newsletter. Join over 80,000 subscribers and keep up to date with the latest developments in AI. From research to projects and ideas. If you are building an AI startup, an AI-related product, or a service, we invite you to consider becoming a sponsor.

Published via Towards AI

Feedback ↓