October 27, 2026

The Question

Fuel efficiency is an important factor when choosing a car.

In this presentation, we explore the relationship between vehicle weight and fuel efficiency using the built-in mtcars dataset.

Our question: Do heavier cars tend to travel fewer miles per gallon?

Meet the Data

The mtcars dataset contains information about 32 car models from a 1970s-era automobile magazine.

##       mpg              wt              hp             cyl       
##  Min.   :10.40   Min.   :1.513   Min.   : 52.0   Min.   :4.000  
##  1st Qu.:15.43   1st Qu.:2.581   1st Qu.: 96.5   1st Qu.:4.000  
##  Median :19.20   Median :3.325   Median :123.0   Median :6.000  
##  Mean   :20.09   Mean   :3.217   Mean   :146.7   Mean   :6.188  
##  3rd Qu.:22.80   3rd Qu.:3.610   3rd Qu.:180.0   3rd Qu.:8.000  
##  Max.   :33.90   Max.   :5.424   Max.   :335.0   Max.   :8.000
  • MPG: Miles per US gallon; higher values mean better fuel efficiency.
  • Weight: Vehicle weight, measured in thousands of pounds.
  • Horsepower: Engine power.
  • Cylinders: Number of engine cylinders.

Explore the Relationship

Hover over individual points to inspect each car. Use the chart controls to zoom and explore the data.

What Do We Observe?

## [1] -0.87

The correlation measures the direction and strength of a linear relationship.

  • A negative correlation indicates that heavier cars tend to have lower MPG.
  • A positive correlation indicates that heavier cars tend to have higher MPG.
  • A correlation near zero indicates a weak linear relationship.

The correlation describes an association; it does not prove that weight alone causes lower fuel efficiency.

Key Takeaways

  1. Vehicle weight and fuel efficiency can be explored visually.
  2. Interactive charts help us inspect individual cars and compare groups.
  3. Engine design, horsepower, and other factors may also influence fuel consumption.

Conclusion: Data visualization helps us identify patterns and ask better questions about vehicle performance.

Thank you!