The big picture

The mtcars dataset contains fuel-economy and engineering information for 32 automobiles. This short interactive presentation explores how vehicle weight, horsepower, and engine size relate to miles per gallon (mpg).

Main finding: heavier cars tend to have lower fuel economy. The relationship is strong in this sample, although these observational data do not establish cause and effect.

1. Weight and fuel economy

Hover over a point to identify the car and inspect its weight, horsepower, and fuel economy. Use the toolbar to zoom, pan, or save the chart.

The downward pattern indicates that heavier vehicles generally achieve fewer miles per gallon. Point size represents horsepower, and color identifies the number of cylinders. These characteristics overlap: heavier cars often have larger, more powerful engines.

2. Compare engine sizes

In this sample, four-cylinder cars average about 26.7 mpg, six-cylinder cars 19.7 mpg, and eight-cylinder cars 15.1 mpg. Cylinder count is a useful broad grouping, but it should not be treated as the only explanation for a car’s efficiency.

3. Takeaways

  • Weight is strongly associated with fuel economy. In a simple linear regression, each additional 1,000 lb is associated with about 5.34 fewer mpg.
  • Engine characteristics are related. Weight, horsepower, displacement, and cylinder count overlap, so a model’s coefficients can change when multiple predictors are included.
  • Association is not causation. The dataset is small and historical; findings should not be generalized uncritically to modern vehicles.

Created on October 24, 2026 using R Markdown and Plotly. Data: the built-in R dataset mtcars.