Skip to content
Kudos AI

Auto fuel economy

Fuel consumption and engine characteristics for a few hundred cars - the worked example behind simple and polynomial regression.

CSVISLR2 R package (James, Witten, Hastie & Tibshirani)Open on ISLR2 R package (James, Witten, Hastie & Tibshirani) ↗

Gas mileage in miles per gallon alongside horsepower, weight, displacement, and other engine characteristics. An Introduction to Statistical Learning uses it throughout its regression chapters: the mpg-against-horsepower scatter is visibly curved, which is exactly why a straight-line fit underperforms a quadratic one, and why the bias-variance discussion needs a real dataset rather than a contrived one.

Key columns

Representative fields, refer to the source for the full, authoritative schema.

ColumnTypeDescription
mpgnumberFuel consumption in miles per gallon - the usual response variable.
horsepowernumberEngine horsepower; its relationship to mpg is clearly non-linear.
weightnumberVehicle weight in pounds.
displacementnumberEngine displacement in cubic inches.
cylindersintegerNumber of cylinders.
yearintegerModel year.

License: Distributed with the book’s companion R package; see the source page for terms.