In the 32-car mtcars data, manual-transmission cars have
higher observed fuel economy than automatic cars: 24.39 versus
17.15 MPG, a raw difference of 7.24 MPG. A
Welch two-sample t-test estimates a 95% confidence interval of
3.21 to 11.28 MPG for manual minus automatic, with
p = 0.00137.
That raw comparison does not account for differences in vehicle design. After adjusting for weight and horsepower, the estimated manual-transmission difference is smaller and statistically uncertain. Adding quarter-mile time yields a manual coefficient of 2.93 MPG (95% CI 0.06 to 5.79; p = 0.0458). This final estimate is borderline and sensitive to model specification. The data favor higher MPG among manual cars descriptively, but do not establish a large, model-independent causal benefit from transmission type.
The dataset contains 32 automobiles: 19 automatic and 13 manual. Mean MPG and variability by transmission are:
| Transmission | n | Mean_MPG | SD_MPG |
|---|---|---|---|
| Automatic | 19 | 17.15 | 3.83 |
| Manual | 13 | 24.39 | 6.17 |
MPG by transmission and the relationship between MPG and vehicle weight.
The boxplot shows a higher MPG distribution for manuals, but the scatterplot also shows that heavier cars tend to have lower MPG. Transmission type is associated with other vehicle characteristics, so a raw comparison can confound transmission with the types of cars equipped with each transmission.
I compared three nested linear models. M0 is the unadjusted
transmission comparison. M1 adds weight (wt) and horsepower
(hp), two plausible predictors of fuel use. M2 adds
quarter-mile time (qsec) as a rough performance-related
covariate. With only 32 observations, I kept the model compact and did
not search over every variable in mtcars. I compared
adjusted R-squared and AIC, while also checking whether the transmission
estimate changed materially.
| Model | Predictors | Adjusted_R2 | AIC |
|---|---|---|---|
| M0: transmission only | Transmission | 0.338 | 196.48 |
| M1: + weight and horsepower | Transmission, weight, horsepower | 0.823 | 156.13 |
| M2: + 1/4-mile time | Transmission, weight, horsepower, 1/4-mile time | 0.837 | 154.33 |
| Model | Manual minus automatic (MPG) | 95% confidence interval | p-value |
|---|---|---|---|
| M0: transmission only | 7.24 | 3.64 to 10.85 | 0.000285 |
| M1: + weight and horsepower | 2.08 | -0.74 to 4.90 | 0.141268 |
| M2: + 1/4-mile time | 2.93 | 0.06 to 5.79 | 0.045791 |
M2 has the lowest AIC among these candidates (AIC 154.33), so it is used as the primary adjusted model. Against the same weight/horsepower/quarter-mile controls, adding transmission improves fit only modestly (nested-model comparison p = 0.0458). AIC differences are not decisive evidence by themselves, and the small sample makes selection uncertain.
1. Is an automatic or manual transmission better for MPG? In these data, manual cars have higher observed MPG on average. The unadjusted difference is clear statistically. However, once weight and horsepower are held constant, the estimated difference falls to 2.08 MPG (95% CI -0.74 to 4.90). With quarter-mile time included, the estimate is 2.93 MPG. The adjusted conclusion is therefore less certain than the raw averages suggest.
2. How large is the MPG difference? The descriptive manual-minus-automatic difference is 7.24 MPG (Welch 95% CI 3.21 to 11.28). In the selected adjusted model, the conditional difference is 2.93 MPG (95% CI 0.06 to 5.79). The first figure is an observed group difference; the second compares cars with the same modeled weight, horsepower and quarter-mile time. Neither should be interpreted as a causal effect because this is an observational sample, not a randomized experiment.
mtcars is a small historical dataset, not a
representative sample of modern vehicles. Several predictors are
correlated, and the adjusted transmission coefficient is sensitive to
which covariates are included. Confidence intervals reflect model
assumptions and sampling variability, not all possible sources of bias.
The findings are descriptive and should not be generalized to all
cars.
The following standard diagnostic plots are provided for M2. Inspect the residual-versus-fitted plot for curvature or changing variance, the Q-Q plot for substantial tail departures, the scale-location plot for non-constant spread, and the residuals-versus-leverage plot for influential cars. With 32 observations, any high-leverage point can have a noticeable effect, so diagnostics should temper confidence in the adjusted estimate.
Standard linear-model diagnostics for M2: mpg ~ transmission + wt + hp + qsec.
| Car | Cook_Distance |
|---|---|
| Chrysler Imperial | 0.270 |
| Toyota Corolla | 0.154 |
| Fiat 128 | 0.117 |
All analyses use R’s built-in mtcars dataset and
standard linear-model functions. To reproduce the report, open this
.Rmd file in RStudio and select Knit. The
document uses knitr and ggplot2 is not
required; the exploratory and diagnostic graphics use base R.