Last updated 1 weeks ago•January 2, 2026
Time:1973-1974
Location:United States
Created by Dataset Agent
Overview
The Motor Trend Car Road Tests (mtcars) dataset is the most iconic dataset in statistical computing, containing fuel consumption and 10 aspects of automobile design and performance for 32 automobiles (1973-74 models). Extracted from the 1974 Motor Trend US magazine and compiled by Henderson and Velleman in their 1981 Biometrics paper, this dataset has become the de facto standard for teaching regression analysis, correlation studies, and data visualization.
The dataset contains 32 observations (rows) across 11 variables (columns), making it compact enough for quick demonstrations yet rich enough for meaningful statistical analysis.
View Source
Quick Stats: Fuel efficiency: 10.4–33.9 mpg | Horsepower: 52–335 hp | Weight: 1.513–5.424 thousand lbs | Cylinders: 4, 6, or 8 | Transmissions: 19 automatic, 13 manual
Historical Context: The Oil Crisis Era
The 1973-74 model years captured in this dataset represent a pivotal moment in automotive history. The 1973 oil crisis had just begun, causing fuel prices to quadruple and fundamentally shifting consumer priorities from raw horsepower to fuel efficiency. This dataset captures the automotive market at this crossroads—featuring American muscle cars like the Camaro Z28 alongside fuel-efficient Japanese imports like the Toyota Corolla and Honda Civic.
The 32 vehicles represent a diverse cross-section of the early 1970s market: American muscle cars (Camaro Z28, Duster 360), European luxury and sports cars (Maserati Bora, Porsche 914-2, Mercedes 240D), and Japanese economy vehicles (Datsun 710, Toyota Corolla, Honda Civic). This diversity makes the dataset ideal for exploring the trade-offs between performance, efficiency, and design philosophy across different automotive traditions.
Key Performance Insights
Fuel efficiency ranges from 10.4 MPG (Lincoln Continental, Cadillac Fleetwood) to 33.9 MPG (Toyota Corolla), with a mean of 20.09 MPG and median of 19.2 MPG.
View Source
View Source
The data reveals the fundamental engineering trade-off of the era: 4-cylinder engines deliver 77% better fuel economy than 8-cylinders (26.66 vs 15.10 MPG), but 8-cylinder engines produce 153% more horsepower (209.21 vs 82.64 HP). This trade-off makes mpg an excellent target variable for regression analysis, with weight, horsepower, and displacement as strong predictors.
Correlation Analysis
The mtcars dataset exhibits strong correlations that make it ideal for teaching multivariate analysis:
Key Correlations with MPG
| Variable | Correlation With MPG | Interpretation |
|---|---|---|
| Weight (wt) | -0.868 | Strong negative: heavier cars use more fuel |
| Displacement (disp) | -0.848 | Strong negative: larger engines less efficient |
| Horsepower (hp) | -0.776 | Strong negative: more power means more consumption |
| Rear Axle Ratio (drat) | +0.681 | Moderate positive: higher ratios improve efficiency |
| Quarter Mile Time (qsec) | +0.419 | Moderate positive: slower acceleration, better MPG |
| 5 rows | ||
View Source
Displacement and horsepower are highly correlated with each other (r = 0.79), creating multicollinearity that makes this dataset excellent for teaching variable selection and regularization techniques.
View Source
Transmission Type Analysis
Manual transmission vehicles achieve 42% better fuel economy on average: 24.39 MPG versus 17.15 MPG for automatics—a difference of over 7 MPG that makes transmission type a significant predictor in regression models.
View Source
View Source
Top Performers by Category
Most Fuel-Efficient Vehicles
| # | Model | MPG | Cylinders | Weight (1000 Lbs) |
|---|---|---|---|---|
| 1 | Toyota Corolla | 33.9 | 4 | 1.84 |
| 2 | Fiat 128 | 32.4 | 4 | 2.2 |
| 3 | Honda Civic | 30.4 | 4 | 1.62 |
| 4 | Lotus Europa | 30.4 | 4 | 1.51 |
| 5 | Fiat X1-9 | 27.3 | 4 | 1.94 |
| 5 rows | ||||
View Source
Most Powerful Vehicles
| # | Model | Horsepower | Cylinders | Quarter Mile (Sec) |
|---|---|---|---|---|
| 1 | Maserati Bora | 335 | 8 | 14.6 |
| 2 | Ford Pantera L | 264 | 8 | 14.5 |
| 3 | Duster 360 | 245 | 8 | 15.84 |
| 4 | Camaro Z28 | 245 | 8 | 15.41 |
| 5 | Chrysler Imperial | 230 | 8 | 17.42 |
| 5 rows | ||||
View Source
The Complete Vehicle Roster
Known Data Quirks and Coding Notes
Important for Reproducibility: The dataset contains intentional coding decisions that should be preserved:
- Mazda RX4 models: The Wankel rotary engine is coded as a straight-six (vs=0) despite being neither V-shaped nor straight
- Porsche 914-2: The flat/boxer engine is coded as V-shaped (vs=0)
- Mercedes 240D: This is a diesel vehicle included among gasoline cars
These quirks are preserved for reproducibility with decades of published analyses.
Variable Deep Dive
Understanding what each variable measures helps in building meaningful models:
Factor Conversion Guide
Several numeric variables represent categorical data and should be converted to factors for proper analysis:
r
# R: Convert numeric codes to meaningful factors
mtcars$cyl <- factor(mtcars$cyl, levels = c(4, 6, 8),
labels = c("4-cyl", "6-cyl", "8-cyl"))
mtcars$am <- factor(mtcars$am, levels = c(0, 1),
labels = c("Automatic", "Manual"))
mtcars$vs <- factor(mtcars$vs, levels = c(0, 1),
labels = c("V-shaped", "Straight"))Data Quality Summary
The dataset has zero missing values across all 352 data points (32 rows × 11 columns), making it immediately usable without imputation or cleaning.
View Source
- Completeness: 100% - no missing values in any variable
- Data Types: All 11 variables are numeric (continuous or coded categorical)
- Consistency: Values fall within expected physical ranges
- Known Issues: Engine type coding quirks documented above (preserved intentionally)
Why This Dataset Matters
The mtcars dataset has trained generations of statisticians and data scientists since its inclusion in S (R's predecessor) in the 1980s. Its enduring popularity stems from the perfect balance of simplicity and depth: small enough to inspect manually, yet complex enough to demonstrate multicollinearity, interaction effects, and model selection. When you see regression examples in R documentation, Stack Overflow answers, or statistics textbooks, chances are mtcars is the dataset being used.
Historical Data Notice: This dataset reflects 1973-74 automotive technology. Modern vehicles achieve 2-3x better fuel efficiency due to fuel injection, aerodynamic design, lightweight materials, and hybrid/electric powertrains. Use caution when extrapolating findings to contemporary automobiles.
Table Overview
mtcars
Data Preview
Scroll to see more| model | mpg | cyl | disp | hp | drat | wt | qsec | vs | am | gear | carb |
|---|---|---|---|---|---|---|---|---|---|---|---|
| Mazda RX4 | 21 | 6 | 160 | 110 | 3.9 | 2.62 | 16.46 | 0 | 1 | 4 | 4 |
| Mazda RX4 Wag | 21 | 6 | 160 | 110 | 3.9 | 2.88 | 17.02 | 0 | 1 | 4 | 4 |
| Datsun 710 | 22.8 | 4 | 108 | 93 | 3.85 | 2.32 | 18.61 | 1 | 1 | 4 | 1 |
| Hornet 4 Drive | 21.4 | 6 | 258 | 110 | 3.08 | 3.22 | 19.44 | 1 | 0 | 3 | 1 |
| Hornet Sportabout | 18.7 | 8 | 360 | 175 | 3.15 | 3.44 | 17.02 | 0 | 0 | 3 | 2 |
Row 1
modelMazda RX4
mpg21
cyl6
disp160
hp110
+7 more columns
Row 2
modelMazda RX4 Wag
mpg21
cyl6
disp160
hp110
+7 more columns
Row 3
modelDatsun 710
mpg22.8
cyl4
disp108
hp93
+7 more columns
Showing 5 of 32 rows
Data Profile
32
rows
12
columns
100%
complete
18.8 KB
estimated size
Column Types
11 Numeric1 Text
High-Cardinality Columns
Columns with many unique values (suitable for identifiers or categorical features)
- model(32 unique values)
- qsec(30 unique values)
- wt(29 unique values)
- disp(27 unique values)
- mpg(25 unique values)
- hp(22 unique values)
- drat(22 unique values)
Data Dictionary
mtcars
| Column | Type | Example | Missing Values |
|---|---|---|---|
model | string | "Mazda RX4", "Mazda RX4 Wag" | 0 |
mpg | numeric | 21, 21 | 0 |
cyl | numeric | 6, 6 | 0 |
disp | numeric | 160, 160 | 0 |
hp | numeric | 110, 110 | 0 |
drat | numeric | 3.9, 3.9 | 0 |
wt | numeric | 2.62, 2.875 | 0 |
qsec | numeric | 16.46, 17.02 | 0 |
vs | numeric | 0, 0 | 0 |
am | numeric | 1, 1 | 0 |
gear | numeric | 4, 4 | 0 |
carb | numeric | 4, 4 | 0 |