Does a bigger engine means more fuel consumption?
Does fuel economy vary across cars with four, six, and eight cylinders, and how does it change as engine size increases?
2026-10-18
Does a bigger engine means more fuel consumption?
Does fuel economy vary across cars with four, six, and eight cylinders, and how does it change as engine size increases?
mtcars, built into R (32 cars, 1974 Motor Trend road test)mpg: fuel efficiency (miles per gallon)disp: engine size (displacement, cubic inches)wt: weight (thousands of pounds)| mpg | disp | wt | |
|---|---|---|---|
| Mazda RX4 | 21.0 | 160 | 2.620 |
| Mazda RX4 Wag | 21.0 | 160 | 2.875 |
| Datsun 710 | 22.8 | 108 | 2.320 |
At first glance, it is evident that fuel efficiency decreases with engine size. About 34 mpg is the maximum for 4-cylinder vehicles, 21 mpg for 6-cylinder vehicles, and less than 20 mpg for 8-cylinder vehicles.
Simple linear regression describes how one variable changes with another:
\[y_i = \beta_0 + \beta_1 x_i + \varepsilon_i\]
mpg) of car \(i\)disp) of car \(i\)We select the line that minimizes the squared errors:
\[\min_{\beta_0,\,\beta_1} \sum_{i=1}^{n} \left(y_i - \beta_0 - \beta_1 x_i\right)^2\]
The solution is:
\[\hat{\beta}_1 = \frac{\sum_{i=1}^{n}(x_i - \bar{x})(y_i - \bar{y})}{\sum_{i=1}^{n}(x_i - \bar{x})^2}, \qquad \hat{\beta}_0 = \bar{y} - \hat{\beta}_1 \bar{x}\]
To put it another way, we measure each car’s vertical distance, square that distance, and total the results. The line that reduces this sum as much as feasible is the optimal one.
model <- lm(mpg ~ disp, data = mtcars) coef(model)
## (Intercept) disp ## 29.59985476 -0.04121512
summary(model)$r.squared
## [1] 0.7183433
Slope ≈ -0.041: every additional cubic inch reduces mpg by roughly 0.04, translating to about 4 mpg for every 100 cubic inches.
R2 = 0.72 : engine size accounts for approximately 72% of the differences in mpg.
A few small-engine vehicles are positioned significantly above the line, indicating that the relationship is not entirely linear.
Larger vehicles generally come with more powerful engines, and in a 3D view, 4-cylinder cars are positioned higher (offering better fuel efficiency) compared to the lower stance of 8-cylinder cars.
Our question: Indeed, a larger engine consumes more fuel. For every additional cubic inch, fuel efficiency decreases by approximately 0.04 mpg (around 4 mpg for every 100 cubic inches).
Strength: The size of the engine accounts for approximately 72% of the variation in mpg (\(R^2 = 0.72\)), making it a reliable predictor.
Cylinders: Cars with 4-cylinder engines are more fuel-efficient and have smaller engines, whereas 8-cylinder cars feature larger engines but are less efficient in terms of miles per gallon.
Limits: The pattern is not entirely linear, and the analysis included just 32 vehicles from 1974. This indicates a correlation, but does not confirm that engine size by itself reduces mpg.